From 825a7dc724cbd24588b2b4d6533eff2875a3218b Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 17 Dec 2024 17:30:47 +0000 Subject: [PATCH] Releasing version 65.81.0 --- CHANGELOG.md | 24 + aivision/aivision_aiservicevision_client.go | 176 ++++ aivision/analyze_video_result.go | 73 ++ aivision/cancel_video_job_request_response.go | 94 ++ aivision/create_video_job_details.go | 109 ++ aivision/create_video_job_request_response.go | 100 ++ aivision/get_video_job_request_response.go | 93 ++ aivision/object_property.go | 44 + aivision/video_face.go | 39 + aivision/video_face_detection_feature.go | 61 ++ aivision/video_face_frame.go | 50 + aivision/video_face_segment.go | 43 + aivision/video_feature.go | 147 +++ aivision/video_job.go | 265 +++++ aivision/video_label.go | 42 + aivision/video_label_detection_feature.go | 61 ++ aivision/video_label_segment.go | 40 + aivision/video_metadata.go | 48 + aivision/video_object.go | 42 + aivision/video_object_detection_feature.go | 61 ++ aivision/video_object_frame.go | 44 + aivision/video_object_segment.go | 43 + aivision/video_object_tracking_feature.go | 61 ++ aivision/video_segment.go | 42 + aivision/video_text.go | 42 + aivision/video_text_detection_feature.go | 55 + aivision/video_text_frame.go | 44 + aivision/video_text_segment.go | 43 + aivision/video_tracked_object.go | 47 + aivision/video_tracked_object_properties.go | 39 + aivision/video_tracked_object_segment.go | 43 + aivision/video_tracking_frame.go | 47 + ...ate_iam_user_sync_configuration_details.go | 42 + ...ser_sync_configuration_request_response.go | 110 ++ bds/activate_upst_configuration_details.go | 45 + ...ate_upst_configuration_request_response.go | 110 ++ bds/batching_based_odh_patching_config.go | 3 + bds/bds_api_key.go | 3 + bds/bds_client.go | 764 +++++++++++++- bds/bds_cluster_version_summary.go | 42 + bds/bds_instance.go | 2 + bds/create_bds_api_key_details.go | 3 + bds/create_bds_instance_details.go | 2 + bds/create_identity_configuration_details.go | 52 + ...identity_configuration_request_response.go | 100 ++ ...ate_iam_user_sync_configuration_details.go | 39 + ...ser_sync_configuration_request_response.go | 110 ++ bds/deactivate_upst_configuration_details.go | 39 + ...ate_upst_configuration_request_response.go | 110 ++ ...identity_configuration_request_response.go | 100 ++ bds/domain_based_odh_patching_config.go | 3 + ...identity_configuration_request_response.go | 198 ++++ bds/iam_user_sync_configuration.go | 109 ++ bds/iam_user_sync_configuration_details.go | 39 + bds/identity_configuration.go | 106 ++ bds/identity_configuration_summary.go | 48 + ...t_bds_cluster_versions_request_response.go | 190 ++++ ...dentity_configurations_request_response.go | 209 ++++ bds/node_type_shape_config.go | 46 + bds/operation_types.go | 36 + ...efresh_confidential_application_details.go | 39 + ...nfidential_application_request_response.go | 110 ++ ...resh_upst_token_exchange_keytab_details.go | 39 + ..._token_exchange_keytab_request_response.go | 110 ++ bds/start_bds_instance_details.go | 2 + bds/start_cluster_shape_configs.go | 39 + bds/update_bds_instance_details.go | 2 + bds/update_identity_configuration_details.go | 43 + ...identity_configuration_request_response.go | 110 ++ bds/upst_configuration.go | 124 +++ bds/upst_configuration_details.go | 42 + blockchain/blockchain_platform.go | 50 +- blockchain/work_request.go | 58 +- blockchain/work_request_summary.go | 58 +- .../analyze_assets_request_response.go | 8 + cloudbridge/asset.go | 8 + cloudbridge/asset_source.go | 4 + cloudbridge/asset_source_credentials.go | 7 +- cloudbridge/asset_source_credentials_type.go | 10 +- cloudbridge/asset_source_summary.go | 4 + cloudbridge/asset_source_type.go | 4 + cloudbridge/asset_type.go | 8 + cloudbridge/aws_asset_source.go | 192 ++++ cloudbridge/aws_asset_source_summary.go | 171 +++ cloudbridge/aws_ebs_asset.go | 166 +++ cloudbridge/aws_ebs_asset_details.go | 37 + cloudbridge/aws_ebs_properties.go | 69 ++ cloudbridge/aws_ec2_asset.go | 174 +++ cloudbridge/aws_ec2_asset_details.go | 45 + cloudbridge/aws_ec2_properties.go | 133 +++ cloudbridge/cloudbridge_discovery_client.go | 58 + cloudbridge/create_asset_details.go | 8 + cloudbridge/create_asset_source_details.go | 4 + .../create_aws_asset_source_details.go | 150 +++ cloudbridge/create_aws_ebs_asset_details.go | 121 +++ cloudbridge/create_aws_ec2_asset_details.go | 129 +++ .../create_vm_ware_asset_source_details.go | 2 +- cloudbridge/create_vmware_vm_asset_details.go | 16 +- cloudbridge/disk.go | 3 + cloudbridge/group_identifier.go | 42 + .../import_inventory_via_assets_details.go | 8 +- cloudbridge/instance_network_interface.go | 78 ++ .../instance_network_interface_association.go | 51 + .../instance_network_interface_attachment.go | 54 + cloudbridge/instance_private_ip_address.go | 46 + cloudbridge/instance_state.go | 42 + cloudbridge/list_assets_request_response.go | 8 + ...upported_cloud_regions_request_response.go | 241 +++++ cloudbridge/monthly_cost_summary.go | 42 + cloudbridge/operation_type.go | 130 ++- cloudbridge/placement.go | 60 ++ .../supported_cloud_region_collection.go | 39 + .../supported_cloud_region_lifecycle_state.go | 56 + cloudbridge/supported_cloud_region_summary.go | 61 ++ cloudbridge/tag.go | 42 + cloudbridge/update_asset_details.go | 8 + cloudbridge/update_asset_source_details.go | 16 +- .../update_aws_asset_source_details.go | 119 +++ cloudbridge/update_aws_ebs_asset_details.go | 89 ++ cloudbridge/update_aws_ec2_asset_details.go | 97 ++ cloudbridge/update_plugin_details.go | 4 +- cloudbridge/update_plugin_request_response.go | 9 +- .../update_vm_ware_asset_source_details.go | 13 +- cloudbridge/vm_asset.go | 8 +- cloudbridge/vm_ware_asset_source.go | 2 +- cloudbridge/vm_ware_asset_source_summary.go | 2 +- cloudbridge/vmware_vm_asset.go | 16 +- cloudbridge/volume_attachment.go | 51 + common/version.go | 2 +- database/autonomous_database.go | 6 + database/autonomous_database_summary.go | 6 + database/create_autonomous_database_base.go | 10 + ...reate_autonomous_database_clone_details.go | 11 + .../create_autonomous_database_details.go | 11 + ...autonomous_database_from_backup_details.go | 11 + ..._database_from_backup_timestamp_details.go | 11 + ..._autonomous_database_data_guard_details.go | 11 + ..._cross_region_disaster_recovery_details.go | 11 + ...cross_tenancy_disaster_recovery_details.go | 11 + ...hable_autonomous_database_clone_details.go | 11 + .../undelete_autonomous_database_details.go | 11 + .../update_autonomous_database_details.go | 6 + datascience/create_job_run_details.go | 4 +- datascience/data_science_resource_type.go | 4 + datascience/instance_configuration.go | 3 + datascience/job_run.go | 6 +- datascience/job_run_summary.go | 10 +- datascience/job_summary.go | 2 +- ...ence_private_endpoints_request_response.go | 4 + datascience/metadata.go | 4 +- generativeaiagent/action_type.go | 2 - generativeaiagent/agent.go | 5 +- generativeaiagent/agent_collection.go | 5 +- generativeaiagent/agent_endpoint.go | 5 +- .../agent_endpoint_collection.go | 5 +- generativeaiagent/agent_endpoint_summary.go | 5 +- generativeaiagent/agent_summary.go | 5 +- generativeaiagent/basic_auth_secret.go | 5 +- .../change_agent_compartment_details.go | 5 +- ...ange_agent_endpoint_compartment_details.go | 5 +- ...ange_knowledge_base_compartment_details.go | 5 +- .../content_moderation_config.go | 2 - generativeaiagent/create_agent_details.go | 5 +- .../create_agent_endpoint_details.go | 5 +- .../create_data_ingestion_job_details.go | 5 +- .../create_data_source_details.go | 5 +- .../create_knowledge_base_details.go | 5 +- generativeaiagent/data_ingestion_job.go | 8 +- .../data_ingestion_job_collection.go | 5 +- .../data_ingestion_job_statistics.go | 5 +- .../data_ingestion_job_summary.go | 5 +- generativeaiagent/data_source.go | 5 +- generativeaiagent/data_source_collection.go | 5 +- generativeaiagent/data_source_config.go | 19 +- generativeaiagent/data_source_summary.go | 5 +- generativeaiagent/database_connection.go | 5 +- generativeaiagent/database_function.go | 5 +- generativeaiagent/database_tool_connection.go | 5 +- generativeaiagent/default_index_config.go | 5 +- generativeaiagent/generativeaiagent_client.go | 101 +- generativeaiagent/idcs_secret.go | 5 +- generativeaiagent/index.go | 5 +- generativeaiagent/index_config.go | 5 +- generativeaiagent/index_schema.go | 5 +- generativeaiagent/knowledge_base.go | 34 +- .../knowledge_base_collection.go | 5 +- .../knowledge_base_statistics.go | 43 + generativeaiagent/knowledge_base_summary.go | 5 +- generativeaiagent/object_storage_prefix.go | 5 +- generativeaiagent/oci_database_config.go | 5 +- .../oci_object_storage_data_source_config.go | 15 +- .../oci_open_search_index_config.go | 5 +- generativeaiagent/operation_status.go | 2 - generativeaiagent/operation_type.go | 14 +- generativeaiagent/secret_detail.go | 5 +- generativeaiagent/session_config.go | 5 +- generativeaiagent/sort_order.go | 2 - generativeaiagent/update_agent_details.go | 5 +- .../update_agent_endpoint_details.go | 5 +- .../update_data_source_details.go | 5 +- .../update_knowledge_base_details.go | 5 +- generativeaiagent/work_request.go | 5 +- generativeaiagent/work_request_error.go | 5 +- .../work_request_error_collection.go | 5 +- generativeaiagent/work_request_log_entry.go | 5 +- .../work_request_log_entry_collection.go | 5 +- generativeaiagent/work_request_resource.go | 5 +- .../work_request_resource_metadata_key.go | 2 - generativeaiagent/work_request_summary.go | 5 +- .../work_request_summary_collection.go | 5 +- generativeaiagentruntime/chat_details.go | 2 +- generativeaiagentruntime/citation.go | 18 + .../generativeaiagentruntime_client.go | 2 +- .../change_pipeline_compartment_details.go | 39 + ...e_pipeline_compartment_request_response.go | 109 ++ goldengate/create_mysql_connection_details.go | 2 +- goldengate/create_pipeline_details.go | 171 +++ .../create_pipeline_request_response.go | 103 ++ .../create_zero_etl_pipeline_details.go | 129 +++ goldengate/default_start_pipeline_details.go | 51 + goldengate/default_stop_pipeline_details.go | 51 + ...efault_test_pipeline_connection_details.go | 55 + .../delete_pipeline_request_response.go | 100 ++ goldengate/get_pipeline_request_response.go | 93 ++ goldengate/goldengate_client.go | 993 ++++++++++++++++-- goldengate/initial_data_load.go | 90 ++ goldengate/initial_load_action.go | 64 ++ ...e_initialization_steps_request_response.go | 93 ++ ...line_running_processes_request_response.go | 199 ++++ ...pipeline_schema_tables_request_response.go | 208 ++++ .../list_pipeline_schemas_request_response.go | 202 ++++ goldengate/list_pipelines_request_response.go | 271 +++++ goldengate/list_recipes_request_response.go | 249 +++++ goldengate/mapping_rule.go | 50 + goldengate/mapping_type.go | 56 + goldengate/operation_type.go | 24 + goldengate/pipeline.go | 335 ++++++ goldengate/pipeline_collection.go | 66 ++ goldengate/pipeline_initialization_step.go | 59 ++ goldengate/pipeline_initialization_steps.go | 39 + goldengate/pipeline_lifecycle_sub_state.go | 68 ++ .../pipeline_running_process_collection.go | 39 + .../pipeline_running_process_summary.go | 58 + goldengate/pipeline_schema_collection.go | 39 + goldengate/pipeline_schema_summary.go | 44 + .../pipeline_schema_table_collection.go | 45 + goldengate/pipeline_schema_table_summary.go | 44 + goldengate/pipeline_summary.go | 273 +++++ goldengate/process_options.go | 87 ++ goldengate/process_status_type.go | 60 ++ goldengate/process_type.go | 56 + goldengate/recipe_summary.go | 57 + goldengate/recipe_summary_collection.go | 39 + goldengate/recipe_type.go | 52 + goldengate/replicate_ddl_error_action.go | 60 ++ goldengate/replicate_dml_error_action.go | 60 ++ goldengate/replicate_schema_change.go | 96 ++ goldengate/severity_type.go | 60 ++ .../source_pipeline_connection_details.go | 40 + goldengate/start_pipeline_details.go | 77 ++ goldengate/start_pipeline_request_response.go | 109 ++ goldengate/start_pipeline_type.go | 52 + goldengate/step_message.go | 55 + goldengate/step_status_type.go | 64 ++ goldengate/stop_pipeline_details.go | 77 ++ goldengate/stop_pipeline_request_response.go | 109 ++ goldengate/stop_pipeline_type.go | 52 + .../target_pipeline_connection_details.go | 40 + .../test_pipeline_connection_details.go | 77 ++ goldengate/test_pipeline_connection_error.go | 48 + ...st_pipeline_connection_request_response.go | 108 ++ goldengate/test_pipeline_connection_result.go | 90 ++ goldengate/test_pipeline_connection_type.go | 52 + goldengate/update_mysql_connection_details.go | 2 +- goldengate/update_pipeline_details.go | 133 +++ .../update_pipeline_request_response.go | 103 ++ .../update_zero_etl_pipeline_details.go | 102 ++ goldengate/zero_etl_pipeline.go | 220 ++++ goldengate/zero_etl_pipeline_summary.go | 217 ++++ stackmonitoring/http_protocol_types.go | 56 + stackmonitoring/http_query_properties.go | 68 ++ .../http_response_content_types.go | 64 ++ stackmonitoring/http_script_file_details.go | 42 + .../http_update_query_properties.go | 68 ++ ...list_metric_extensions_request_response.go | 25 +- .../metric_extension_collection_methods.go | 4 + .../metric_extension_query_properties.go | 4 + stackmonitoring/metric_extension_sort_by.go | 16 +- ...etric_extension_update_query_properties.go | 4 + stackmonitoring/script_file_details.go | 2 +- stackmonitoring/sql_out_param_details.go | 7 +- stackmonitoring/sql_out_param_types.go | 16 +- .../update_http_script_file_details.go | 42 + 293 files changed, 16053 insertions(+), 615 deletions(-) create mode 100644 aivision/analyze_video_result.go create mode 100644 aivision/cancel_video_job_request_response.go create mode 100644 aivision/create_video_job_details.go create mode 100644 aivision/create_video_job_request_response.go create mode 100644 aivision/get_video_job_request_response.go create mode 100644 aivision/object_property.go create mode 100644 aivision/video_face.go create mode 100644 aivision/video_face_detection_feature.go create mode 100644 aivision/video_face_frame.go create mode 100644 aivision/video_face_segment.go create mode 100644 aivision/video_feature.go create mode 100644 aivision/video_job.go create mode 100644 aivision/video_label.go create mode 100644 aivision/video_label_detection_feature.go create mode 100644 aivision/video_label_segment.go create mode 100644 aivision/video_metadata.go create mode 100644 aivision/video_object.go create mode 100644 aivision/video_object_detection_feature.go create mode 100644 aivision/video_object_frame.go create mode 100644 aivision/video_object_segment.go create mode 100644 aivision/video_object_tracking_feature.go create mode 100644 aivision/video_segment.go create mode 100644 aivision/video_text.go create mode 100644 aivision/video_text_detection_feature.go create mode 100644 aivision/video_text_frame.go create mode 100644 aivision/video_text_segment.go create mode 100644 aivision/video_tracked_object.go create mode 100644 aivision/video_tracked_object_properties.go create mode 100644 aivision/video_tracked_object_segment.go create mode 100644 aivision/video_tracking_frame.go create mode 100644 bds/activate_iam_user_sync_configuration_details.go create mode 100644 bds/activate_iam_user_sync_configuration_request_response.go create mode 100644 bds/activate_upst_configuration_details.go create mode 100644 bds/activate_upst_configuration_request_response.go create mode 100644 bds/bds_cluster_version_summary.go create mode 100644 bds/create_identity_configuration_details.go create mode 100644 bds/create_identity_configuration_request_response.go create mode 100644 bds/deactivate_iam_user_sync_configuration_details.go create mode 100644 bds/deactivate_iam_user_sync_configuration_request_response.go create mode 100644 bds/deactivate_upst_configuration_details.go create mode 100644 bds/deactivate_upst_configuration_request_response.go create mode 100644 bds/delete_identity_configuration_request_response.go create mode 100644 bds/get_identity_configuration_request_response.go create mode 100644 bds/iam_user_sync_configuration.go create mode 100644 bds/iam_user_sync_configuration_details.go create mode 100644 bds/identity_configuration.go create mode 100644 bds/identity_configuration_summary.go create mode 100644 bds/list_bds_cluster_versions_request_response.go create mode 100644 bds/list_identity_configurations_request_response.go create mode 100644 bds/node_type_shape_config.go create mode 100644 bds/refresh_confidential_application_details.go create mode 100644 bds/refresh_confidential_application_request_response.go create mode 100644 bds/refresh_upst_token_exchange_keytab_details.go create mode 100644 bds/refresh_upst_token_exchange_keytab_request_response.go create mode 100644 bds/start_cluster_shape_configs.go create mode 100644 bds/update_identity_configuration_details.go create mode 100644 bds/update_identity_configuration_request_response.go create mode 100644 bds/upst_configuration.go create mode 100644 bds/upst_configuration_details.go create mode 100644 cloudbridge/aws_asset_source.go create mode 100644 cloudbridge/aws_asset_source_summary.go create mode 100644 cloudbridge/aws_ebs_asset.go create mode 100644 cloudbridge/aws_ebs_asset_details.go create mode 100644 cloudbridge/aws_ebs_properties.go create mode 100644 cloudbridge/aws_ec2_asset.go create mode 100644 cloudbridge/aws_ec2_asset_details.go create mode 100644 cloudbridge/aws_ec2_properties.go create mode 100644 cloudbridge/create_aws_asset_source_details.go create mode 100644 cloudbridge/create_aws_ebs_asset_details.go create mode 100644 cloudbridge/create_aws_ec2_asset_details.go create mode 100644 cloudbridge/group_identifier.go create mode 100644 cloudbridge/instance_network_interface.go create mode 100644 cloudbridge/instance_network_interface_association.go create mode 100644 cloudbridge/instance_network_interface_attachment.go create mode 100644 cloudbridge/instance_private_ip_address.go create mode 100644 cloudbridge/instance_state.go create mode 100644 cloudbridge/list_supported_cloud_regions_request_response.go create mode 100644 cloudbridge/monthly_cost_summary.go create mode 100644 cloudbridge/placement.go create mode 100644 cloudbridge/supported_cloud_region_collection.go create mode 100644 cloudbridge/supported_cloud_region_lifecycle_state.go create mode 100644 cloudbridge/supported_cloud_region_summary.go create mode 100644 cloudbridge/tag.go create mode 100644 cloudbridge/update_aws_asset_source_details.go create mode 100644 cloudbridge/update_aws_ebs_asset_details.go create mode 100644 cloudbridge/update_aws_ec2_asset_details.go create mode 100644 cloudbridge/volume_attachment.go create mode 100644 generativeaiagent/knowledge_base_statistics.go create mode 100644 goldengate/change_pipeline_compartment_details.go create mode 100644 goldengate/change_pipeline_compartment_request_response.go create mode 100644 goldengate/create_pipeline_details.go create mode 100644 goldengate/create_pipeline_request_response.go create mode 100644 goldengate/create_zero_etl_pipeline_details.go create mode 100644 goldengate/default_start_pipeline_details.go create mode 100644 goldengate/default_stop_pipeline_details.go create mode 100644 goldengate/default_test_pipeline_connection_details.go create mode 100644 goldengate/delete_pipeline_request_response.go create mode 100644 goldengate/get_pipeline_request_response.go create mode 100644 goldengate/initial_data_load.go create mode 100644 goldengate/initial_load_action.go create mode 100644 goldengate/list_pipeline_initialization_steps_request_response.go create mode 100644 goldengate/list_pipeline_running_processes_request_response.go create mode 100644 goldengate/list_pipeline_schema_tables_request_response.go create mode 100644 goldengate/list_pipeline_schemas_request_response.go create mode 100644 goldengate/list_pipelines_request_response.go create mode 100644 goldengate/list_recipes_request_response.go create mode 100644 goldengate/mapping_rule.go create mode 100644 goldengate/mapping_type.go create mode 100644 goldengate/pipeline.go create mode 100644 goldengate/pipeline_collection.go create mode 100644 goldengate/pipeline_initialization_step.go create mode 100644 goldengate/pipeline_initialization_steps.go create mode 100644 goldengate/pipeline_lifecycle_sub_state.go create mode 100644 goldengate/pipeline_running_process_collection.go create mode 100644 goldengate/pipeline_running_process_summary.go create mode 100644 goldengate/pipeline_schema_collection.go create mode 100644 goldengate/pipeline_schema_summary.go create mode 100644 goldengate/pipeline_schema_table_collection.go create mode 100644 goldengate/pipeline_schema_table_summary.go create mode 100644 goldengate/pipeline_summary.go create mode 100644 goldengate/process_options.go create mode 100644 goldengate/process_status_type.go create mode 100644 goldengate/process_type.go create mode 100644 goldengate/recipe_summary.go create mode 100644 goldengate/recipe_summary_collection.go create mode 100644 goldengate/recipe_type.go create mode 100644 goldengate/replicate_ddl_error_action.go create mode 100644 goldengate/replicate_dml_error_action.go create mode 100644 goldengate/replicate_schema_change.go create mode 100644 goldengate/severity_type.go create mode 100644 goldengate/source_pipeline_connection_details.go create mode 100644 goldengate/start_pipeline_details.go create mode 100644 goldengate/start_pipeline_request_response.go create mode 100644 goldengate/start_pipeline_type.go create mode 100644 goldengate/step_message.go create mode 100644 goldengate/step_status_type.go create mode 100644 goldengate/stop_pipeline_details.go create mode 100644 goldengate/stop_pipeline_request_response.go create mode 100644 goldengate/stop_pipeline_type.go create mode 100644 goldengate/target_pipeline_connection_details.go create mode 100644 goldengate/test_pipeline_connection_details.go create mode 100644 goldengate/test_pipeline_connection_error.go create mode 100644 goldengate/test_pipeline_connection_request_response.go create mode 100644 goldengate/test_pipeline_connection_result.go create mode 100644 goldengate/test_pipeline_connection_type.go create mode 100644 goldengate/update_pipeline_details.go create mode 100644 goldengate/update_pipeline_request_response.go create mode 100644 goldengate/update_zero_etl_pipeline_details.go create mode 100644 goldengate/zero_etl_pipeline.go create mode 100644 goldengate/zero_etl_pipeline_summary.go create mode 100644 stackmonitoring/http_protocol_types.go create mode 100644 stackmonitoring/http_query_properties.go create mode 100644 stackmonitoring/http_response_content_types.go create mode 100644 stackmonitoring/http_script_file_details.go create mode 100644 stackmonitoring/http_update_query_properties.go create mode 100644 stackmonitoring/update_http_script_file_details.go diff --git a/CHANGELOG.md b/CHANGELOG.md index c0f62843cc..bc8b05e948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.81.0 - 2024-12-17 +### Added +- Support for backup retention locks on autonomous database create and update operations in the Database service +- Support for multi-modality flags in data source in the Generative AI service +- Support for knowledge base statistics in the Generative AI service +- Support for document id, title and page numbers in citations in the Generative AI service +- Support for creating and updating Amazon Web Services (AWS) asset-sources, EC2 and Elastic Block Store (EBS) assets in the Cloud Bridge service +- Support for listing Amazon Web Services (AWS) regions available for discovery and migrations in the Cloud Bridge service +- Support for stored video analysis in the AI Vision service +- Support for HTTP or REST endpoint-based metric extensions in the OCI Monitoring service +- Support for metric extension filter in the list metric extensions operation in the OCI Monitoring service +- Support for creating and updating private endpoints for model deployments in the Data Science service +- Support for OCI Identity user integration in the Big Data service +- Support for user principal session tokens in the Big Data service +- Support for historical cluster versions in the Big Data service +- Support for new SKUs for digital assets editions in the Blockchain Platform service +- Support for Zero ETL pipelines in the GoldenGate service + +### Breaking Changes +- The properties `Plugin` and `Etag` were removed from the model `UpdatePluginResponse` in the Cloud Bridge service +- The property `DesiredState` was made mandatory in the request model `UpdatePluginDetails` in the Cloud Bridge service +- The properties `AssetType` and `Data` were made mandatory in the request model `ImportInventoryViaAssetsDetails` in the Cloud Bridge service +- The properties `Compute`, `Vm`, `VmwareVm`, and `VmwareVCenter` were made mandatory in the request model `CreateVmwareVmAssetDetails` in the Cloud Bridge service + ## 65.80.0 - 2024-12-10 ### Added - Support for Bring Your Own Key (BYOK) in the Database service diff --git a/aivision/aivision_aiservicevision_client.go b/aivision/aivision_aiservicevision_client.go index f4a2f8bebd..405505cd4d 100644 --- a/aivision/aivision_aiservicevision_client.go +++ b/aivision/aivision_aiservicevision_client.go @@ -321,6 +321,63 @@ func (client AIServiceVisionClient) cancelImageJob(ctx context.Context, request return response, err } +// CancelVideoJob Cancel a video analysis job. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CancelVideoJob.go.html to see an example of how to use CancelVideoJob API. +func (client AIServiceVisionClient) CancelVideoJob(ctx context.Context, request CancelVideoJobRequest) (response CancelVideoJobResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.cancelVideoJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CancelVideoJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CancelVideoJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CancelVideoJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CancelVideoJobResponse") + } + return +} + +// cancelVideoJob implements the OCIOperation interface (enables retrying operations) +func (client AIServiceVisionClient) cancelVideoJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/videoJobs/{videoJobId}/actions/cancel", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CancelVideoJobResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/vision/20220125/VideoJob/CancelVideoJob" + err = common.PostProcessServiceError(err, "AIServiceVision", "CancelVideoJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CancelWorkRequest Cancel the work request with the given ID. // // # See also @@ -740,6 +797,68 @@ func (client AIServiceVisionClient) createProject(ctx context.Context, request c return response, err } +// CreateVideoJob Create a video analysis job with given inputs and features. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CreateVideoJob.go.html to see an example of how to use CreateVideoJob API. +func (client AIServiceVisionClient) CreateVideoJob(ctx context.Context, request CreateVideoJobRequest) (response CreateVideoJobResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVideoJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVideoJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVideoJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVideoJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVideoJobResponse") + } + return +} + +// createVideoJob implements the OCIOperation interface (enables retrying operations) +func (client AIServiceVisionClient) createVideoJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/videoJobs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateVideoJobResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/vision/20220125/VideoJob/CreateVideoJob" + err = common.PostProcessServiceError(err, "AIServiceVision", "CreateVideoJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteModel Delete a model by identifier. // // # See also @@ -1082,6 +1201,63 @@ func (client AIServiceVisionClient) getProject(ctx context.Context, request comm return response, err } +// GetVideoJob Get details of a video analysis job. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/GetVideoJob.go.html to see an example of how to use GetVideoJob API. +func (client AIServiceVisionClient) GetVideoJob(ctx context.Context, request GetVideoJobRequest) (response GetVideoJobResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVideoJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVideoJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVideoJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVideoJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVideoJobResponse") + } + return +} + +// getVideoJob implements the OCIOperation interface (enables retrying operations) +func (client AIServiceVisionClient) getVideoJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/videoJobs/{videoJobId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetVideoJobResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/vision/20220125/VideoJob/GetVideoJob" + err = common.PostProcessServiceError(err, "AIServiceVision", "GetVideoJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetWorkRequest Gets the status of the work request with the given ID. // // # See also diff --git a/aivision/analyze_video_result.go b/aivision/analyze_video_result.go new file mode 100644 index 0000000000..468db355c0 --- /dev/null +++ b/aivision/analyze_video_result.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AnalyzeVideoResult Video analysis results. +type AnalyzeVideoResult struct { + VideoMetadata *VideoMetadata `mandatory:"true" json:"videoMetadata"` + + // Detected labels in a video. + VideoLabels []VideoLabel `mandatory:"false" json:"videoLabels"` + + // Detected objects in a video. + VideoObjects []VideoObject `mandatory:"false" json:"videoObjects"` + + // Tracked objects in a video. + VideoTrackedObjects []VideoTrackedObject `mandatory:"false" json:"videoTrackedObjects"` + + // Detected text in a video. + VideoText []VideoText `mandatory:"false" json:"videoText"` + + // Detected faces in a video. + VideoFaces []VideoFace `mandatory:"false" json:"videoFaces"` + + // The ontologyClasses of video labels. + OntologyClasses []OntologyClass `mandatory:"false" json:"ontologyClasses"` + + // Label Detection model version. + LabelDetectionModelVersion *string `mandatory:"false" json:"labelDetectionModelVersion"` + + // Object Detection model version. + ObjectDetectionModelVersion *string `mandatory:"false" json:"objectDetectionModelVersion"` + + // Object Tracking model version. + ObjectTrackingModelVersion *string `mandatory:"false" json:"objectTrackingModelVersion"` + + // Text Detection model version. + TextDetectionModelVersion *string `mandatory:"false" json:"textDetectionModelVersion"` + + // Face Detection model version. + FaceDetectionModelVersion *string `mandatory:"false" json:"faceDetectionModelVersion"` + + // Array of possible errors. + Errors []ProcessingError `mandatory:"false" json:"errors"` +} + +func (m AnalyzeVideoResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AnalyzeVideoResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/cancel_video_job_request_response.go b/aivision/cancel_video_job_request_response.go new file mode 100644 index 0000000000..4990bf2c16 --- /dev/null +++ b/aivision/cancel_video_job_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CancelVideoJobRequest wrapper for the CancelVideoJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CancelVideoJob.go.html to see an example of how to use CancelVideoJobRequest. +type CancelVideoJobRequest struct { + + // Video job id. + VideoJobId *string `mandatory:"true" contributesTo:"path" name:"videoJobId"` + + // 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CancelVideoJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CancelVideoJobRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CancelVideoJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CancelVideoJobRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CancelVideoJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CancelVideoJobResponse wrapper for the CancelVideoJob operation +type CancelVideoJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A 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 CancelVideoJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CancelVideoJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/aivision/create_video_job_details.go b/aivision/create_video_job_details.go new file mode 100644 index 0000000000..29e0a398e0 --- /dev/null +++ b/aivision/create_video_job_details.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVideoJobDetails Details about the video analysis. +type CreateVideoJobDetails struct { + InputLocation InputLocation `mandatory:"true" json:"inputLocation"` + + // a list of video analysis features. + Features []VideoFeature `mandatory:"true" json:"features"` + + OutputLocation *OutputLocation `mandatory:"true" json:"outputLocation"` + + // Compartment identifier from the requester. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Video job display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. + // For example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateVideoJobDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVideoJobDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateVideoJobDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + InputLocation inputlocation `json:"inputLocation"` + Features []videofeature `json:"features"` + OutputLocation *OutputLocation `json:"outputLocation"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompartmentId = model.CompartmentId + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + nn, e = model.InputLocation.UnmarshalPolymorphicJSON(model.InputLocation.JsonData) + if e != nil { + return + } + if nn != nil { + m.InputLocation = nn.(InputLocation) + } else { + m.InputLocation = nil + } + + m.Features = make([]VideoFeature, len(model.Features)) + for i, n := range model.Features { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Features[i] = nn.(VideoFeature) + } else { + m.Features[i] = nil + } + } + m.OutputLocation = model.OutputLocation + + return +} diff --git a/aivision/create_video_job_request_response.go b/aivision/create_video_job_request_response.go new file mode 100644 index 0000000000..3bea1d2618 --- /dev/null +++ b/aivision/create_video_job_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVideoJobRequest wrapper for the CreateVideoJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CreateVideoJob.go.html to see an example of how to use CreateVideoJobRequest. +type CreateVideoJobRequest struct { + + // Details about the video analysis. + CreateVideoJobDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without the 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVideoJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVideoJobRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVideoJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVideoJobRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVideoJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVideoJobResponse wrapper for the CreateVideoJob operation +type CreateVideoJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VideoJob instance + VideoJob `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A 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 CreateVideoJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVideoJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/aivision/get_video_job_request_response.go b/aivision/get_video_job_request_response.go new file mode 100644 index 0000000000..e39fcf1158 --- /dev/null +++ b/aivision/get_video_job_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVideoJobRequest wrapper for the GetVideoJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/GetVideoJob.go.html to see an example of how to use GetVideoJobRequest. +type GetVideoJobRequest struct { + + // Video job id. + VideoJobId *string `mandatory:"true" contributesTo:"path" name:"videoJobId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVideoJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVideoJobRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVideoJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVideoJobRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVideoJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVideoJobResponse wrapper for the GetVideoJob operation +type GetVideoJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VideoJob instance + VideoJob `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A 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 GetVideoJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVideoJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/aivision/object_property.go b/aivision/object_property.go new file mode 100644 index 0000000000..8f88604edf --- /dev/null +++ b/aivision/object_property.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectProperty A property of a tracked object in a frame. +type ObjectProperty struct { + + // Property name + Name *string `mandatory:"true" json:"name"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` +} + +func (m ObjectProperty) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectProperty) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_face.go b/aivision/video_face.go new file mode 100644 index 0000000000..a939c68552 --- /dev/null +++ b/aivision/video_face.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFace Detected face in a video. +type VideoFace struct { + + // Face segments in a video. + Segments []VideoFaceSegment `mandatory:"true" json:"segments"` +} + +func (m VideoFace) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoFace) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_face_detection_feature.go b/aivision/video_face_detection_feature.go new file mode 100644 index 0000000000..798e807abb --- /dev/null +++ b/aivision/video_face_detection_feature.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFaceDetectionFeature Video face detection feature +type VideoFaceDetectionFeature struct { + + // The maximum number of results per frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // Whether or not return face landmarks. + IsLandmarkRequired *bool `mandatory:"false" json:"isLandmarkRequired"` + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` +} + +func (m VideoFaceDetectionFeature) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoFaceDetectionFeature) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VideoFaceDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoFaceDetectionFeature VideoFaceDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoFaceDetectionFeature + }{ + "FACE_DETECTION", + (MarshalTypeVideoFaceDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/aivision/video_face_frame.go b/aivision/video_face_frame.go new file mode 100644 index 0000000000..1ac80baaf6 --- /dev/null +++ b/aivision/video_face_frame.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFaceFrame A face frame. +type VideoFaceFrame struct { + + // Time offset(Milliseconds) in the video. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // The quality score of the face detected, between 0 and 1. + QualityScore *float32 `mandatory:"true" json:"qualityScore"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` + + // Face landmarks. + Landmarks []Landmark `mandatory:"false" json:"landmarks"` +} + +func (m VideoFaceFrame) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoFaceFrame) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_face_segment.go b/aivision/video_face_segment.go new file mode 100644 index 0000000000..5e7bbf612e --- /dev/null +++ b/aivision/video_face_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFaceSegment A face segment in a video. +type VideoFaceSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Face frames in a segment. + Frames []VideoFaceFrame `mandatory:"true" json:"frames"` +} + +func (m VideoFaceSegment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoFaceSegment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_feature.go b/aivision/video_feature.go new file mode 100644 index 0000000000..6f8f523cbb --- /dev/null +++ b/aivision/video_feature.go @@ -0,0 +1,147 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFeature Details about a video feature request. +type VideoFeature interface { +} + +type videofeature struct { + JsonData []byte + FeatureType string `json:"featureType"` +} + +// UnmarshalJSON unmarshals json +func (m *videofeature) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalervideofeature videofeature + s := struct { + Model Unmarshalervideofeature + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.FeatureType = s.Model.FeatureType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *videofeature) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.FeatureType { + case "OBJECT_DETECTION": + mm := VideoObjectDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "FACE_DETECTION": + mm := VideoFaceDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "TEXT_DETECTION": + mm := VideoTextDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "OBJECT_TRACKING": + mm := VideoObjectTrackingFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "LABEL_DETECTION": + mm := VideoLabelDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for VideoFeature: %s.", m.FeatureType) + return *m, nil + } +} + +func (m videofeature) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m videofeature) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VideoFeatureFeatureTypeEnum Enum with underlying type: string +type VideoFeatureFeatureTypeEnum string + +// Set of constants representing the allowable values for VideoFeatureFeatureTypeEnum +const ( + VideoFeatureFeatureTypeLabelDetection VideoFeatureFeatureTypeEnum = "LABEL_DETECTION" + VideoFeatureFeatureTypeObjectDetection VideoFeatureFeatureTypeEnum = "OBJECT_DETECTION" + VideoFeatureFeatureTypeTextDetection VideoFeatureFeatureTypeEnum = "TEXT_DETECTION" + VideoFeatureFeatureTypeFaceDetection VideoFeatureFeatureTypeEnum = "FACE_DETECTION" + VideoFeatureFeatureTypeObjectTracking VideoFeatureFeatureTypeEnum = "OBJECT_TRACKING" +) + +var mappingVideoFeatureFeatureTypeEnum = map[string]VideoFeatureFeatureTypeEnum{ + "LABEL_DETECTION": VideoFeatureFeatureTypeLabelDetection, + "OBJECT_DETECTION": VideoFeatureFeatureTypeObjectDetection, + "TEXT_DETECTION": VideoFeatureFeatureTypeTextDetection, + "FACE_DETECTION": VideoFeatureFeatureTypeFaceDetection, + "OBJECT_TRACKING": VideoFeatureFeatureTypeObjectTracking, +} + +var mappingVideoFeatureFeatureTypeEnumLowerCase = map[string]VideoFeatureFeatureTypeEnum{ + "label_detection": VideoFeatureFeatureTypeLabelDetection, + "object_detection": VideoFeatureFeatureTypeObjectDetection, + "text_detection": VideoFeatureFeatureTypeTextDetection, + "face_detection": VideoFeatureFeatureTypeFaceDetection, + "object_tracking": VideoFeatureFeatureTypeObjectTracking, +} + +// GetVideoFeatureFeatureTypeEnumValues Enumerates the set of values for VideoFeatureFeatureTypeEnum +func GetVideoFeatureFeatureTypeEnumValues() []VideoFeatureFeatureTypeEnum { + values := make([]VideoFeatureFeatureTypeEnum, 0) + for _, v := range mappingVideoFeatureFeatureTypeEnum { + values = append(values, v) + } + return values +} + +// GetVideoFeatureFeatureTypeEnumStringValues Enumerates the set of values in String for VideoFeatureFeatureTypeEnum +func GetVideoFeatureFeatureTypeEnumStringValues() []string { + return []string{ + "LABEL_DETECTION", + "OBJECT_DETECTION", + "TEXT_DETECTION", + "FACE_DETECTION", + "OBJECT_TRACKING", + } +} + +// GetMappingVideoFeatureFeatureTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVideoFeatureFeatureTypeEnum(val string) (VideoFeatureFeatureTypeEnum, bool) { + enum, ok := mappingVideoFeatureFeatureTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/aivision/video_job.go b/aivision/video_job.go new file mode 100644 index 0000000000..64c369df2a --- /dev/null +++ b/aivision/video_job.go @@ -0,0 +1,265 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoJob Job details for a video analysis. +type VideoJob struct { + + // Id of the job. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that starts the job. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // a list of document analysis features. + Features []VideoFeature `mandatory:"true" json:"features"` + + // Job accepted time. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + OutputLocation *OutputLocation `mandatory:"true" json:"outputLocation"` + + // The current state of the batch document job. + LifecycleState VideoJobLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Video job display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + InputLocation InputLocation `mandatory:"false" json:"inputLocation"` + + // Job started time. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // Job finished time. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` + + // How much progress the operation has made, vs the total amount of work that must be performed. + PercentComplete *float32 `mandatory:"false" json:"percentComplete"` + + // Detailed status of FAILED state. + LifecycleDetails VideoJobLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. + // For example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // For example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m VideoJob) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoJob) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVideoJobLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVideoJobLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingVideoJobLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetVideoJobLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *VideoJob) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + InputLocation inputlocation `json:"inputLocation"` + TimeStarted *common.SDKTime `json:"timeStarted"` + TimeFinished *common.SDKTime `json:"timeFinished"` + PercentComplete *float32 `json:"percentComplete"` + LifecycleDetails VideoJobLifecycleDetailsEnum `json:"lifecycleDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + Features []videofeature `json:"features"` + TimeAccepted *common.SDKTime `json:"timeAccepted"` + OutputLocation *OutputLocation `json:"outputLocation"` + LifecycleState VideoJobLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + nn, e = model.InputLocation.UnmarshalPolymorphicJSON(model.InputLocation.JsonData) + if e != nil { + return + } + if nn != nil { + m.InputLocation = nn.(InputLocation) + } else { + m.InputLocation = nil + } + + m.TimeStarted = model.TimeStarted + + m.TimeFinished = model.TimeFinished + + m.PercentComplete = model.PercentComplete + + m.LifecycleDetails = model.LifecycleDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.Features = make([]VideoFeature, len(model.Features)) + for i, n := range model.Features { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Features[i] = nn.(VideoFeature) + } else { + m.Features[i] = nil + } + } + m.TimeAccepted = model.TimeAccepted + + m.OutputLocation = model.OutputLocation + + m.LifecycleState = model.LifecycleState + + return +} + +// VideoJobLifecycleStateEnum Enum with underlying type: string +type VideoJobLifecycleStateEnum string + +// Set of constants representing the allowable values for VideoJobLifecycleStateEnum +const ( + VideoJobLifecycleStateSucceeded VideoJobLifecycleStateEnum = "SUCCEEDED" + VideoJobLifecycleStateFailed VideoJobLifecycleStateEnum = "FAILED" + VideoJobLifecycleStateAccepted VideoJobLifecycleStateEnum = "ACCEPTED" + VideoJobLifecycleStateCanceled VideoJobLifecycleStateEnum = "CANCELED" + VideoJobLifecycleStateInProgress VideoJobLifecycleStateEnum = "IN_PROGRESS" + VideoJobLifecycleStateCanceling VideoJobLifecycleStateEnum = "CANCELING" +) + +var mappingVideoJobLifecycleStateEnum = map[string]VideoJobLifecycleStateEnum{ + "SUCCEEDED": VideoJobLifecycleStateSucceeded, + "FAILED": VideoJobLifecycleStateFailed, + "ACCEPTED": VideoJobLifecycleStateAccepted, + "CANCELED": VideoJobLifecycleStateCanceled, + "IN_PROGRESS": VideoJobLifecycleStateInProgress, + "CANCELING": VideoJobLifecycleStateCanceling, +} + +var mappingVideoJobLifecycleStateEnumLowerCase = map[string]VideoJobLifecycleStateEnum{ + "succeeded": VideoJobLifecycleStateSucceeded, + "failed": VideoJobLifecycleStateFailed, + "accepted": VideoJobLifecycleStateAccepted, + "canceled": VideoJobLifecycleStateCanceled, + "in_progress": VideoJobLifecycleStateInProgress, + "canceling": VideoJobLifecycleStateCanceling, +} + +// GetVideoJobLifecycleStateEnumValues Enumerates the set of values for VideoJobLifecycleStateEnum +func GetVideoJobLifecycleStateEnumValues() []VideoJobLifecycleStateEnum { + values := make([]VideoJobLifecycleStateEnum, 0) + for _, v := range mappingVideoJobLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVideoJobLifecycleStateEnumStringValues Enumerates the set of values in String for VideoJobLifecycleStateEnum +func GetVideoJobLifecycleStateEnumStringValues() []string { + return []string{ + "SUCCEEDED", + "FAILED", + "ACCEPTED", + "CANCELED", + "IN_PROGRESS", + "CANCELING", + } +} + +// GetMappingVideoJobLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVideoJobLifecycleStateEnum(val string) (VideoJobLifecycleStateEnum, bool) { + enum, ok := mappingVideoJobLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VideoJobLifecycleDetailsEnum Enum with underlying type: string +type VideoJobLifecycleDetailsEnum string + +// Set of constants representing the allowable values for VideoJobLifecycleDetailsEnum +const ( + VideoJobLifecycleDetailsPartiallySucceeded VideoJobLifecycleDetailsEnum = "PARTIALLY_SUCCEEDED" + VideoJobLifecycleDetailsCompletelyFailed VideoJobLifecycleDetailsEnum = "COMPLETELY_FAILED" +) + +var mappingVideoJobLifecycleDetailsEnum = map[string]VideoJobLifecycleDetailsEnum{ + "PARTIALLY_SUCCEEDED": VideoJobLifecycleDetailsPartiallySucceeded, + "COMPLETELY_FAILED": VideoJobLifecycleDetailsCompletelyFailed, +} + +var mappingVideoJobLifecycleDetailsEnumLowerCase = map[string]VideoJobLifecycleDetailsEnum{ + "partially_succeeded": VideoJobLifecycleDetailsPartiallySucceeded, + "completely_failed": VideoJobLifecycleDetailsCompletelyFailed, +} + +// GetVideoJobLifecycleDetailsEnumValues Enumerates the set of values for VideoJobLifecycleDetailsEnum +func GetVideoJobLifecycleDetailsEnumValues() []VideoJobLifecycleDetailsEnum { + values := make([]VideoJobLifecycleDetailsEnum, 0) + for _, v := range mappingVideoJobLifecycleDetailsEnum { + values = append(values, v) + } + return values +} + +// GetVideoJobLifecycleDetailsEnumStringValues Enumerates the set of values in String for VideoJobLifecycleDetailsEnum +func GetVideoJobLifecycleDetailsEnumStringValues() []string { + return []string{ + "PARTIALLY_SUCCEEDED", + "COMPLETELY_FAILED", + } +} + +// GetMappingVideoJobLifecycleDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVideoJobLifecycleDetailsEnum(val string) (VideoJobLifecycleDetailsEnum, bool) { + enum, ok := mappingVideoJobLifecycleDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/aivision/video_label.go b/aivision/video_label.go new file mode 100644 index 0000000000..91cc7c97d9 --- /dev/null +++ b/aivision/video_label.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoLabel Detected label in a video. +type VideoLabel struct { + + // Detected label name. + Name *string `mandatory:"true" json:"name"` + + // Label segments in a video. + Segments []VideoLabelSegment `mandatory:"true" json:"segments"` +} + +func (m VideoLabel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoLabel) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_label_detection_feature.go b/aivision/video_label_detection_feature.go new file mode 100644 index 0000000000..aee575fe01 --- /dev/null +++ b/aivision/video_label_detection_feature.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoLabelDetectionFeature Video label detection feature +type VideoLabelDetectionFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` + + // The maximum number of results per video frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // The custom model ID. + ModelId *string `mandatory:"false" json:"modelId"` +} + +func (m VideoLabelDetectionFeature) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoLabelDetectionFeature) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VideoLabelDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoLabelDetectionFeature VideoLabelDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoLabelDetectionFeature + }{ + "LABEL_DETECTION", + (MarshalTypeVideoLabelDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/aivision/video_label_segment.go b/aivision/video_label_segment.go new file mode 100644 index 0000000000..ca2955002a --- /dev/null +++ b/aivision/video_label_segment.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoLabelSegment A label segment in a video. +type VideoLabelSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` +} + +func (m VideoLabelSegment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoLabelSegment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_metadata.go b/aivision/video_metadata.go new file mode 100644 index 0000000000..0972b56118 --- /dev/null +++ b/aivision/video_metadata.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoMetadata Video information. +type VideoMetadata struct { + + // Total number of frames. + FrameCount *int `mandatory:"true" json:"frameCount"` + + // Video framerate. + FrameRate *float32 `mandatory:"true" json:"frameRate"` + + // Width of each frame. + FrameWidth *int `mandatory:"true" json:"frameWidth"` + + // Height of each frame. + FrameHeight *int `mandatory:"true" json:"frameHeight"` +} + +func (m VideoMetadata) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoMetadata) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_object.go b/aivision/video_object.go new file mode 100644 index 0000000000..79728d80d1 --- /dev/null +++ b/aivision/video_object.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObject Detected object in a video. +type VideoObject struct { + + // Detected object name. + Name *string `mandatory:"true" json:"name"` + + // Object segments in a video. + Segments []VideoObjectSegment `mandatory:"true" json:"segments"` +} + +func (m VideoObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_object_detection_feature.go b/aivision/video_object_detection_feature.go new file mode 100644 index 0000000000..e39ed35f7f --- /dev/null +++ b/aivision/video_object_detection_feature.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectDetectionFeature Video object detection feature +type VideoObjectDetectionFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` + + // The maximum number of results per frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // The custom model ID. + ModelId *string `mandatory:"false" json:"modelId"` +} + +func (m VideoObjectDetectionFeature) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoObjectDetectionFeature) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VideoObjectDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoObjectDetectionFeature VideoObjectDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoObjectDetectionFeature + }{ + "OBJECT_DETECTION", + (MarshalTypeVideoObjectDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/aivision/video_object_frame.go b/aivision/video_object_frame.go new file mode 100644 index 0000000000..1b7e2d9274 --- /dev/null +++ b/aivision/video_object_frame.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectFrame An object frame. +type VideoObjectFrame struct { + + // Time offset(Milliseconds) in the video. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` +} + +func (m VideoObjectFrame) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoObjectFrame) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_object_segment.go b/aivision/video_object_segment.go new file mode 100644 index 0000000000..d34feaff6c --- /dev/null +++ b/aivision/video_object_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectSegment An object segment in a video. +type VideoObjectSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Object frame in a segment. + Frames []VideoObjectFrame `mandatory:"true" json:"frames"` +} + +func (m VideoObjectSegment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoObjectSegment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_object_tracking_feature.go b/aivision/video_object_tracking_feature.go new file mode 100644 index 0000000000..bf73197b26 --- /dev/null +++ b/aivision/video_object_tracking_feature.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectTrackingFeature Video object tracking feature +type VideoObjectTrackingFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` + + // The maximum number of results per frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // The custom model ID. + ModelId *string `mandatory:"false" json:"modelId"` +} + +func (m VideoObjectTrackingFeature) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoObjectTrackingFeature) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VideoObjectTrackingFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoObjectTrackingFeature VideoObjectTrackingFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoObjectTrackingFeature + }{ + "OBJECT_TRACKING", + (MarshalTypeVideoObjectTrackingFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/aivision/video_segment.go b/aivision/video_segment.go new file mode 100644 index 0000000000..48793a9c63 --- /dev/null +++ b/aivision/video_segment.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoSegment A sequence of frames that was (or appears to be) continuously captured for a label/object/text?. +type VideoSegment struct { + + // Video start time offset(Milliseconds). + StartTimeOffsetMs *int `mandatory:"true" json:"startTimeOffsetMs"` + + // Video end time offset(Milliseconds). + EndTimeOffsetMs *int `mandatory:"true" json:"endTimeOffsetMs"` +} + +func (m VideoSegment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoSegment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_text.go b/aivision/video_text.go new file mode 100644 index 0000000000..460544ead1 --- /dev/null +++ b/aivision/video_text.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoText Detected text in a video. +type VideoText struct { + + // Detected text. + Text *string `mandatory:"true" json:"text"` + + // Text segments in a video. + Segments []VideoTextSegment `mandatory:"true" json:"segments"` +} + +func (m VideoText) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoText) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_text_detection_feature.go b/aivision/video_text_detection_feature.go new file mode 100644 index 0000000000..dbe85539dc --- /dev/null +++ b/aivision/video_text_detection_feature.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTextDetectionFeature Video text detection feature +type VideoTextDetectionFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` +} + +func (m VideoTextDetectionFeature) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoTextDetectionFeature) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VideoTextDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoTextDetectionFeature VideoTextDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoTextDetectionFeature + }{ + "TEXT_DETECTION", + (MarshalTypeVideoTextDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/aivision/video_text_frame.go b/aivision/video_text_frame.go new file mode 100644 index 0000000000..8be10d808e --- /dev/null +++ b/aivision/video_text_frame.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTextFrame A text frame. +type VideoTextFrame struct { + + // Time offset(Milliseconds) in the video. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` +} + +func (m VideoTextFrame) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoTextFrame) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_text_segment.go b/aivision/video_text_segment.go new file mode 100644 index 0000000000..27d962f972 --- /dev/null +++ b/aivision/video_text_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTextSegment A text segment in a video. +type VideoTextSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Text frame in a segment. + Frames []VideoTextFrame `mandatory:"true" json:"frames"` +} + +func (m VideoTextSegment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoTextSegment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_tracked_object.go b/aivision/video_tracked_object.go new file mode 100644 index 0000000000..3f2239f663 --- /dev/null +++ b/aivision/video_tracked_object.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackedObject Tracked object in a video. +type VideoTrackedObject struct { + + // Name of the object category label. + Name *string `mandatory:"true" json:"name"` + + // Unique identifier for the object. + ObjectId *int `mandatory:"true" json:"objectId"` + + // Segments for the tracked object. + Segments []VideoTrackedObjectSegment `mandatory:"true" json:"segments"` + + Properties *VideoTrackedObjectProperties `mandatory:"false" json:"properties"` +} + +func (m VideoTrackedObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoTrackedObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_tracked_object_properties.go b/aivision/video_tracked_object_properties.go new file mode 100644 index 0000000000..b6c74583d6 --- /dev/null +++ b/aivision/video_tracked_object_properties.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackedObjectProperties Properties of a tracked object in a video. +type VideoTrackedObjectProperties struct { + + // The axle count value of a tracked vehicle. + AxleCount *int `mandatory:"false" json:"axleCount"` +} + +func (m VideoTrackedObjectProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoTrackedObjectProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_tracked_object_segment.go b/aivision/video_tracked_object_segment.go new file mode 100644 index 0000000000..c98485961d --- /dev/null +++ b/aivision/video_tracked_object_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackedObjectSegment A segment of a tracked object in a video. +type VideoTrackedObjectSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Frames within the segment. + Frames []VideoTrackingFrame `mandatory:"true" json:"frames"` +} + +func (m VideoTrackedObjectSegment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoTrackedObjectSegment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aivision/video_tracking_frame.go b/aivision/video_tracking_frame.go new file mode 100644 index 0000000000..1a40aaa4d3 --- /dev/null +++ b/aivision/video_tracking_frame.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackingFrame A frame capturing a tracked object. +type VideoTrackingFrame struct { + + // Time offset(Milliseconds) of the frame. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` + + // Properties associated with the tracked object in the frame. + Properties []ObjectProperty `mandatory:"false" json:"properties"` +} + +func (m VideoTrackingFrame) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VideoTrackingFrame) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/activate_iam_user_sync_configuration_details.go b/bds/activate_iam_user_sync_configuration_details.go new file mode 100644 index 0000000000..9cfae80baf --- /dev/null +++ b/bds/activate_iam_user_sync_configuration_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActivateIamUserSyncConfigurationDetails Details for activating IAM user sync configuration +type ActivateIamUserSyncConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // whether posix attribute needs to be appended to users + IsPosixAttributesAdditionRequired *bool `mandatory:"false" json:"isPosixAttributesAdditionRequired"` +} + +func (m ActivateIamUserSyncConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ActivateIamUserSyncConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/activate_iam_user_sync_configuration_request_response.go b/bds/activate_iam_user_sync_configuration_request_response.go new file mode 100644 index 0000000000..6a4796d06a --- /dev/null +++ b/bds/activate_iam_user_sync_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ActivateIamUserSyncConfigurationRequest wrapper for the ActivateIamUserSyncConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateIamUserSyncConfiguration.go.html to see an example of how to use ActivateIamUserSyncConfigurationRequest. +type ActivateIamUserSyncConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for activating a new IAM user sync config. + ActivateIamUserSyncConfigurationDetails `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"` + + // 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ActivateIamUserSyncConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ActivateIamUserSyncConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ActivateIamUserSyncConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ActivateIamUserSyncConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ActivateIamUserSyncConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ActivateIamUserSyncConfigurationResponse wrapper for the ActivateIamUserSyncConfiguration operation +type ActivateIamUserSyncConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ActivateIamUserSyncConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ActivateIamUserSyncConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/activate_upst_configuration_details.go b/bds/activate_upst_configuration_details.go new file mode 100644 index 0000000000..9fc0813c63 --- /dev/null +++ b/bds/activate_upst_configuration_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActivateUpstConfigurationDetails Details for activating UPST config on the cluster +type ActivateUpstConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // OCID of the vault to store token exchange service principal keyta, required for creating UPST configb + VaultId *string `mandatory:"true" json:"vaultId"` + + // OCID of the master encryption key in vault for encrypting token exchange service principal keytab, required for creating UPST config + MasterEncryptionKeyId *string `mandatory:"true" json:"masterEncryptionKeyId"` +} + +func (m ActivateUpstConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ActivateUpstConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/activate_upst_configuration_request_response.go b/bds/activate_upst_configuration_request_response.go new file mode 100644 index 0000000000..51f95a1798 --- /dev/null +++ b/bds/activate_upst_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ActivateUpstConfigurationRequest wrapper for the ActivateUpstConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateUpstConfiguration.go.html to see an example of how to use ActivateUpstConfigurationRequest. +type ActivateUpstConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for activating UPST config + ActivateUpstConfigurationDetails `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"` + + // 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ActivateUpstConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ActivateUpstConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ActivateUpstConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ActivateUpstConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ActivateUpstConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ActivateUpstConfigurationResponse wrapper for the ActivateUpstConfiguration operation +type ActivateUpstConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ActivateUpstConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ActivateUpstConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/batching_based_odh_patching_config.go b/bds/batching_based_odh_patching_config.go index d8d63a9379..b6f7779fa9 100644 --- a/bds/batching_based_odh_patching_config.go +++ b/bds/batching_based_odh_patching_config.go @@ -24,6 +24,9 @@ type BatchingBasedOdhPatchingConfig struct { // The wait time between batches in seconds. WaitTimeBetweenBatchInSeconds *int `mandatory:"true" json:"waitTimeBetweenBatchInSeconds"` + + // Acceptable number of failed-to-be-patched nodes in each batch. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of non-utility and non-master nodes. + ToleranceThresholdPerBatch *int `mandatory:"false" json:"toleranceThresholdPerBatch"` } func (m BatchingBasedOdhPatchingConfig) String() string { diff --git a/bds/bds_api_key.go b/bds/bds_api_key.go index 8f5e511aca..2c5c3e18a0 100644 --- a/bds/bds_api_key.go +++ b/bds/bds_api_key.go @@ -46,6 +46,9 @@ type BdsApiKey struct { // The time the API key was created, shown as an RFC 3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Identity domain OCID ,where user is present. For default domain ,this field will be optional. + DomainOcid *string `mandatory:"false" json:"domainOcid"` } func (m BdsApiKey) String() string { diff --git a/bds/bds_client.go b/bds/bds_client.go index 9ebc455438..aa0a06b0ae 100644 --- a/bds/bds_client.go +++ b/bds/bds_client.go @@ -153,6 +153,130 @@ func (client BdsClient) activateBdsMetastoreConfiguration(ctx context.Context, r return response, err } +// ActivateIamUserSyncConfiguration Activate IAM user sync configuration for the given identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateIamUserSyncConfiguration.go.html to see an example of how to use ActivateIamUserSyncConfiguration API. +func (client BdsClient) ActivateIamUserSyncConfiguration(ctx context.Context, request ActivateIamUserSyncConfigurationRequest) (response ActivateIamUserSyncConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.activateIamUserSyncConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ActivateIamUserSyncConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ActivateIamUserSyncConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ActivateIamUserSyncConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ActivateIamUserSyncConfigurationResponse") + } + return +} + +// activateIamUserSyncConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) activateIamUserSyncConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/activateIamUserSyncConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ActivateIamUserSyncConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/ActivateIamUserSyncConfiguration" + err = common.PostProcessServiceError(err, "Bds", "ActivateIamUserSyncConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ActivateUpstConfiguration Activate UPST configuration for the given identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateUpstConfiguration.go.html to see an example of how to use ActivateUpstConfiguration API. +func (client BdsClient) ActivateUpstConfiguration(ctx context.Context, request ActivateUpstConfigurationRequest) (response ActivateUpstConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.activateUpstConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ActivateUpstConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ActivateUpstConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ActivateUpstConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ActivateUpstConfigurationResponse") + } + return +} + +// activateUpstConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) activateUpstConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/activateUpstConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ActivateUpstConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/ActivateUpstConfiguration" + err = common.PostProcessServiceError(err, "Bds", "ActivateUpstConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // AddAutoScalingConfiguration Add an autoscale configuration to the cluster. // // # See also @@ -1021,6 +1145,68 @@ func (client BdsClient) createBdsMetastoreConfiguration(ctx context.Context, req return response, err } +// CreateIdentityConfiguration Create an identity configuration for the cluster +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CreateIdentityConfiguration.go.html to see an example of how to use CreateIdentityConfiguration API. +func (client BdsClient) CreateIdentityConfiguration(ctx context.Context, request CreateIdentityConfigurationRequest) (response CreateIdentityConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createIdentityConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateIdentityConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateIdentityConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIdentityConfigurationResponse") + } + return +} + +// createIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) createIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateIdentityConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/CreateIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "CreateIdentityConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateNodeBackupConfiguration Add a node volume backup configuration to the cluster for an indicated node type or node. // // # See also @@ -1207,6 +1393,130 @@ func (client BdsClient) createResourcePrincipalConfiguration(ctx context.Context return response, err } +// DeactivateIamUserSyncConfiguration Deactivate the IAM user sync configuration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateIamUserSyncConfiguration.go.html to see an example of how to use DeactivateIamUserSyncConfiguration API. +func (client BdsClient) DeactivateIamUserSyncConfiguration(ctx context.Context, request DeactivateIamUserSyncConfigurationRequest) (response DeactivateIamUserSyncConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deactivateIamUserSyncConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeactivateIamUserSyncConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeactivateIamUserSyncConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeactivateIamUserSyncConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeactivateIamUserSyncConfigurationResponse") + } + return +} + +// deactivateIamUserSyncConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) deactivateIamUserSyncConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/deactivateIamUserSyncConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeactivateIamUserSyncConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/DeactivateIamUserSyncConfiguration" + err = common.PostProcessServiceError(err, "Bds", "DeactivateIamUserSyncConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeactivateUpstConfiguration Deactivate the UPST configuration represented by the provided ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateUpstConfiguration.go.html to see an example of how to use DeactivateUpstConfiguration API. +func (client BdsClient) DeactivateUpstConfiguration(ctx context.Context, request DeactivateUpstConfigurationRequest) (response DeactivateUpstConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deactivateUpstConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeactivateUpstConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeactivateUpstConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeactivateUpstConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeactivateUpstConfigurationResponse") + } + return +} + +// deactivateUpstConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) deactivateUpstConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/deactivateUpstConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeactivateUpstConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/DeactivateUpstConfiguration" + err = common.PostProcessServiceError(err, "Bds", "DeactivateUpstConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteBdsApiKey Deletes the user's API key represented by the provided ID. // // # See also @@ -1378,6 +1688,63 @@ func (client BdsClient) deleteBdsMetastoreConfiguration(ctx context.Context, req return response, err } +// DeleteIdentityConfiguration Delete the identity configuration represented by the provided ID. Deletion is only allowed if this identity configuration is not associated with any active IAM user sync configuration or UPST configuration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeleteIdentityConfiguration.go.html to see an example of how to use DeleteIdentityConfiguration API. +func (client BdsClient) DeleteIdentityConfiguration(ctx context.Context, request DeleteIdentityConfigurationRequest) (response DeleteIdentityConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteIdentityConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteIdentityConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteIdentityConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIdentityConfigurationResponse") + } + return +} + +// deleteIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) deleteIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteIdentityConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/DeleteIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "DeleteIdentityConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteNodeBackup Delete the NodeBackup represented by the provided ID. // // # See also @@ -1888,22 +2255,79 @@ func (client BdsClient) GetBdsInstance(ctx context.Context, request GetBdsInstan return } -// getBdsInstance implements the OCIOperation interface (enables retrying operations) -func (client BdsClient) getBdsInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getBdsInstance implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) getBdsInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetBdsInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetBdsInstance" + err = common.PostProcessServiceError(err, "Bds", "GetBdsInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBdsMetastoreConfiguration Returns the BDS Metastore configuration information for the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetBdsMetastoreConfiguration.go.html to see an example of how to use GetBdsMetastoreConfiguration API. +func (client BdsClient) GetBdsMetastoreConfiguration(ctx context.Context, request GetBdsMetastoreConfigurationRequest) (response GetBdsMetastoreConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBdsMetastoreConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBdsMetastoreConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBdsMetastoreConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBdsMetastoreConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBdsMetastoreConfigurationResponse") + } + return +} + +// getBdsMetastoreConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) getBdsMetastoreConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetBdsInstanceResponse + var response GetBdsMetastoreConfigurationResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetBdsInstance" - err = common.PostProcessServiceError(err, "Bds", "GetBdsInstance", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/GetBdsMetastoreConfiguration" + err = common.PostProcessServiceError(err, "Bds", "GetBdsMetastoreConfiguration", apiReferenceLink) return response, err } @@ -1911,12 +2335,12 @@ func (client BdsClient) getBdsInstance(ctx context.Context, request common.OCIRe return response, err } -// GetBdsMetastoreConfiguration Returns the BDS Metastore configuration information for the given ID. +// GetIdentityConfiguration Get details of one identity config on the cluster // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetBdsMetastoreConfiguration.go.html to see an example of how to use GetBdsMetastoreConfiguration API. -func (client BdsClient) GetBdsMetastoreConfiguration(ctx context.Context, request GetBdsMetastoreConfigurationRequest) (response GetBdsMetastoreConfigurationResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetIdentityConfiguration.go.html to see an example of how to use GetIdentityConfiguration API. +func (client BdsClient) GetIdentityConfiguration(ctx context.Context, request GetIdentityConfigurationRequest) (response GetIdentityConfigurationResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1925,42 +2349,42 @@ func (client BdsClient) GetBdsMetastoreConfiguration(ctx context.Context, reques if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getBdsMetastoreConfiguration, policy) + ociResponse, err = common.Retry(ctx, request, client.getIdentityConfiguration, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetBdsMetastoreConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetBdsMetastoreConfigurationResponse{} + response = GetIdentityConfigurationResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetBdsMetastoreConfigurationResponse); ok { + if convertedResponse, ok := ociResponse.(GetIdentityConfigurationResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBdsMetastoreConfigurationResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetIdentityConfigurationResponse") } return } -// getBdsMetastoreConfiguration implements the OCIOperation interface (enables retrying operations) -func (client BdsClient) getBdsMetastoreConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) getIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetBdsMetastoreConfigurationResponse + var response GetIdentityConfigurationResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/GetBdsMetastoreConfiguration" - err = common.PostProcessServiceError(err, "Bds", "GetBdsMetastoreConfiguration", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/GetIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "GetIdentityConfiguration", apiReferenceLink) return response, err } @@ -2553,6 +2977,63 @@ func (client BdsClient) listBdsApiKeys(ctx context.Context, request common.OCIRe return response, err } +// ListBdsClusterVersions Returns a list of cluster versions with associated odh and bds versions. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListBdsClusterVersions.go.html to see an example of how to use ListBdsClusterVersions API. +func (client BdsClient) ListBdsClusterVersions(ctx context.Context, request ListBdsClusterVersionsRequest) (response ListBdsClusterVersionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBdsClusterVersions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBdsClusterVersionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBdsClusterVersionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBdsClusterVersionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBdsClusterVersionsResponse") + } + return +} + +// listBdsClusterVersions implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) listBdsClusterVersions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsClusterVersions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListBdsClusterVersionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsClusterVersionSummary/ListBdsClusterVersions" + err = common.PostProcessServiceError(err, "Bds", "ListBdsClusterVersions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListBdsInstances Returns a list of all Big Data Service clusters in a compartment. // // # See also @@ -2667,6 +3148,63 @@ func (client BdsClient) listBdsMetastoreConfigurations(ctx context.Context, requ return response, err } +// ListIdentityConfigurations Returns a list of all identity configurations associated with this Big Data Service cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListIdentityConfigurations.go.html to see an example of how to use ListIdentityConfigurations API. +func (client BdsClient) ListIdentityConfigurations(ctx context.Context, request ListIdentityConfigurationsRequest) (response ListIdentityConfigurationsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIdentityConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIdentityConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIdentityConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIdentityConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIdentityConfigurationsResponse") + } + return +} + +// listIdentityConfigurations implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) listIdentityConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/identityConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListIdentityConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/ListIdentityConfigurations" + err = common.PostProcessServiceError(err, "Bds", "ListIdentityConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListNodeBackupConfigurations Returns information about the NodeBackupConfigurations. // // # See also @@ -3242,6 +3780,130 @@ func (client BdsClient) listWorkRequests(ctx context.Context, request common.OCI return response, err } +// RefreshConfidentialApplication Refresh confidential application for the given identity configuration in case of any update to the confidential application (e.g. regenerated client secret) +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshConfidentialApplication.go.html to see an example of how to use RefreshConfidentialApplication API. +func (client BdsClient) RefreshConfidentialApplication(ctx context.Context, request RefreshConfidentialApplicationRequest) (response RefreshConfidentialApplicationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.refreshConfidentialApplication, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RefreshConfidentialApplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RefreshConfidentialApplicationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RefreshConfidentialApplicationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RefreshConfidentialApplicationResponse") + } + return +} + +// refreshConfidentialApplication implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) refreshConfidentialApplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/refreshConfidentialApplication", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RefreshConfidentialApplicationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/RefreshConfidentialApplication" + err = common.PostProcessServiceError(err, "Bds", "RefreshConfidentialApplication", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RefreshUpstTokenExchangeKeytab Refresh token exchange kerberos principal keytab for the UPST enabled identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshUpstTokenExchangeKeytab.go.html to see an example of how to use RefreshUpstTokenExchangeKeytab API. +func (client BdsClient) RefreshUpstTokenExchangeKeytab(ctx context.Context, request RefreshUpstTokenExchangeKeytabRequest) (response RefreshUpstTokenExchangeKeytabResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.refreshUpstTokenExchangeKeytab, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RefreshUpstTokenExchangeKeytabResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RefreshUpstTokenExchangeKeytabResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RefreshUpstTokenExchangeKeytabResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RefreshUpstTokenExchangeKeytabResponse") + } + return +} + +// refreshUpstTokenExchangeKeytab implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) refreshUpstTokenExchangeKeytab(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/refreshUpstTokenExchangeKeytab", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RefreshUpstTokenExchangeKeytabResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/RefreshUpstTokenExchangeKeytab" + err = common.PostProcessServiceError(err, "Bds", "RefreshUpstTokenExchangeKeytab", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RemoveAutoScalingConfiguration Deletes an autoscale configuration. // // # See also @@ -4194,6 +4856,68 @@ func (client BdsClient) updateBdsMetastoreConfiguration(ctx context.Context, req return response, err } +// UpdateIdentityConfiguration Update the IAM user sync and UPST configuration for the specified identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/UpdateIdentityConfiguration.go.html to see an example of how to use UpdateIdentityConfiguration API. +func (client BdsClient) UpdateIdentityConfiguration(ctx context.Context, request UpdateIdentityConfigurationRequest) (response UpdateIdentityConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateIdentityConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateIdentityConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateIdentityConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIdentityConfigurationResponse") + } + return +} + +// updateIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) updateIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateIdentityConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/UpdateIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "UpdateIdentityConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateNodeBackupConfiguration Updates fields on NodeBackupConfiguration, including the name, the schedule. // // # See also diff --git a/bds/bds_cluster_version_summary.go b/bds/bds_cluster_version_summary.go new file mode 100644 index 0000000000..5cd1d111e9 --- /dev/null +++ b/bds/bds_cluster_version_summary.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BdsClusterVersionSummary Cluster version details including bds and odh version information. +type BdsClusterVersionSummary struct { + + // BDS version to be used for cluster creation + BdsVersion *string `mandatory:"true" json:"bdsVersion"` + + // ODH version to be used for cluster creation + OdhVersion *string `mandatory:"false" json:"odhVersion"` +} + +func (m BdsClusterVersionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BdsClusterVersionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/bds_instance.go b/bds/bds_instance.go index 572b2c8a4c..09276ee636 100644 --- a/bds/bds_instance.go +++ b/bds/bds_instance.go @@ -85,6 +85,8 @@ type BdsInstance struct { // Profile of the Big Data Service cluster. ClusterProfile BdsInstanceClusterProfileEnum `mandatory:"false" json:"clusterProfile,omitempty"` + + BdsClusterVersionSummary *BdsClusterVersionSummary `mandatory:"false" json:"bdsClusterVersionSummary"` } func (m BdsInstance) String() string { diff --git a/bds/create_bds_api_key_details.go b/bds/create_bds_api_key_details.go index 8d192dcdda..d6db1f9d84 100644 --- a/bds/create_bds_api_key_details.go +++ b/bds/create_bds_api_key_details.go @@ -31,6 +31,9 @@ type CreateBdsApiKeyDetails struct { // The name of the region to establish the Object Storage endpoint. See https://docs.oracle.com/en-us/iaas/api/#/en/identity/20160918/Region/ // for additional information. DefaultRegion *string `mandatory:"false" json:"defaultRegion"` + + // Identity domain OCID , where user is present. For default domain , this field will be optional. + DomainOcid *string `mandatory:"false" json:"domainOcid"` } func (m CreateBdsApiKeyDetails) String() string { diff --git a/bds/create_bds_instance_details.go b/bds/create_bds_instance_details.go index 9c509da157..0bcb2d6ad8 100644 --- a/bds/create_bds_instance_details.go +++ b/bds/create_bds_instance_details.go @@ -63,6 +63,8 @@ type CreateBdsInstanceDetails struct { // Profile of the Big Data Service cluster. ClusterProfile BdsInstanceClusterProfileEnum `mandatory:"false" json:"clusterProfile,omitempty"` + + BdsClusterVersionSummary *BdsClusterVersionSummary `mandatory:"false" json:"bdsClusterVersionSummary"` } func (m CreateBdsInstanceDetails) String() string { diff --git a/bds/create_identity_configuration_details.go b/bds/create_identity_configuration_details.go new file mode 100644 index 0000000000..06d1ddc65c --- /dev/null +++ b/bds/create_identity_configuration_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateIdentityConfigurationDetails Details for creating the identity configuration. +type CreateIdentityConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // Display name of the identity configuration, required for creating identity configuration. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Identity domain OCID to use for identity config, required for creating identity configuration + IdentityDomainId *string `mandatory:"true" json:"identityDomainId"` + + // Identity domain confidential application ID for the identity config, required for creating identity configuration + ConfidentialApplicationId *string `mandatory:"true" json:"confidentialApplicationId"` + + UpstConfigurationDetails *UpstConfigurationDetails `mandatory:"false" json:"upstConfigurationDetails"` + + IamUserSyncConfigurationDetails *IamUserSyncConfigurationDetails `mandatory:"false" json:"iamUserSyncConfigurationDetails"` +} + +func (m CreateIdentityConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateIdentityConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/create_identity_configuration_request_response.go b/bds/create_identity_configuration_request_response.go new file mode 100644 index 0000000000..6ef7182336 --- /dev/null +++ b/bds/create_identity_configuration_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateIdentityConfigurationRequest wrapper for the CreateIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CreateIdentityConfiguration.go.html to see an example of how to use CreateIdentityConfigurationRequest. +type CreateIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Details for creating an identity configuration + CreateIdentityConfigurationDetails `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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateIdentityConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateIdentityConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateIdentityConfigurationResponse wrapper for the CreateIdentityConfiguration operation +type CreateIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/deactivate_iam_user_sync_configuration_details.go b/bds/deactivate_iam_user_sync_configuration_details.go new file mode 100644 index 0000000000..845bc49d6e --- /dev/null +++ b/bds/deactivate_iam_user_sync_configuration_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeactivateIamUserSyncConfigurationDetails Details for deactivating an IAM user sync configuration +type DeactivateIamUserSyncConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m DeactivateIamUserSyncConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DeactivateIamUserSyncConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/deactivate_iam_user_sync_configuration_request_response.go b/bds/deactivate_iam_user_sync_configuration_request_response.go new file mode 100644 index 0000000000..71d8ff7543 --- /dev/null +++ b/bds/deactivate_iam_user_sync_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeactivateIamUserSyncConfigurationRequest wrapper for the DeactivateIamUserSyncConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateIamUserSyncConfiguration.go.html to see an example of how to use DeactivateIamUserSyncConfigurationRequest. +type DeactivateIamUserSyncConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for deactivating the IAM user sync config + DeactivateIamUserSyncConfigurationDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // 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"` + + // 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"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeactivateIamUserSyncConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeactivateIamUserSyncConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeactivateIamUserSyncConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeactivateIamUserSyncConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeactivateIamUserSyncConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeactivateIamUserSyncConfigurationResponse wrapper for the DeactivateIamUserSyncConfiguration operation +type DeactivateIamUserSyncConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeactivateIamUserSyncConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeactivateIamUserSyncConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/deactivate_upst_configuration_details.go b/bds/deactivate_upst_configuration_details.go new file mode 100644 index 0000000000..5daf66643b --- /dev/null +++ b/bds/deactivate_upst_configuration_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeactivateUpstConfigurationDetails Details for deleting UPST config from cluster +type DeactivateUpstConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m DeactivateUpstConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DeactivateUpstConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/deactivate_upst_configuration_request_response.go b/bds/deactivate_upst_configuration_request_response.go new file mode 100644 index 0000000000..22fe33fbd5 --- /dev/null +++ b/bds/deactivate_upst_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeactivateUpstConfigurationRequest wrapper for the DeactivateUpstConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateUpstConfiguration.go.html to see an example of how to use DeactivateUpstConfigurationRequest. +type DeactivateUpstConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for deactivating the UPST config + DeactivateUpstConfigurationDetails `contributesTo:"body"` + + // The client request ID for tracing. + 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. 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"` + + // 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"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeactivateUpstConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeactivateUpstConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeactivateUpstConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeactivateUpstConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeactivateUpstConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeactivateUpstConfigurationResponse wrapper for the DeactivateUpstConfiguration operation +type DeactivateUpstConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeactivateUpstConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeactivateUpstConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/delete_identity_configuration_request_response.go b/bds/delete_identity_configuration_request_response.go new file mode 100644 index 0000000000..cf7d43fecf --- /dev/null +++ b/bds/delete_identity_configuration_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteIdentityConfigurationRequest wrapper for the DeleteIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeleteIdentityConfiguration.go.html to see an example of how to use DeleteIdentityConfigurationRequest. +type DeleteIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // 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"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteIdentityConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteIdentityConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteIdentityConfigurationResponse wrapper for the DeleteIdentityConfiguration operation +type DeleteIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/domain_based_odh_patching_config.go b/bds/domain_based_odh_patching_config.go index bf9e25eb44..0afe509488 100644 --- a/bds/domain_based_odh_patching_config.go +++ b/bds/domain_based_odh_patching_config.go @@ -21,6 +21,9 @@ type DomainBasedOdhPatchingConfig struct { // The wait time between AD/FD in seconds. WaitTimeBetweenDomainInSeconds *int `mandatory:"true" json:"waitTimeBetweenDomainInSeconds"` + + // Acceptable number of failed-to-be-patched nodes in each domain. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of non-utility and non-master nodes. + ToleranceThresholdPerDomain *int `mandatory:"false" json:"toleranceThresholdPerDomain"` } func (m DomainBasedOdhPatchingConfig) String() string { diff --git a/bds/get_identity_configuration_request_response.go b/bds/get_identity_configuration_request_response.go new file mode 100644 index 0000000000..1fa9ed1ddf --- /dev/null +++ b/bds/get_identity_configuration_request_response.go @@ -0,0 +1,198 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIdentityConfigurationRequest wrapper for the GetIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetIdentityConfiguration.go.html to see an example of how to use GetIdentityConfigurationRequest. +type GetIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + SortBy GetIdentityConfigurationSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder GetIdentityConfigurationSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIdentityConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIdentityConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetIdentityConfigurationSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetGetIdentityConfigurationSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingGetIdentityConfigurationSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetGetIdentityConfigurationSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIdentityConfigurationResponse wrapper for the GetIdentityConfiguration operation +type GetIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of IdentityConfiguration instances + IdentityConfiguration `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 GetIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetIdentityConfigurationSortByEnum Enum with underlying type: string +type GetIdentityConfigurationSortByEnum string + +// Set of constants representing the allowable values for GetIdentityConfigurationSortByEnum +const ( + GetIdentityConfigurationSortByTimecreated GetIdentityConfigurationSortByEnum = "timeCreated" + GetIdentityConfigurationSortByDisplayname GetIdentityConfigurationSortByEnum = "displayName" +) + +var mappingGetIdentityConfigurationSortByEnum = map[string]GetIdentityConfigurationSortByEnum{ + "timeCreated": GetIdentityConfigurationSortByTimecreated, + "displayName": GetIdentityConfigurationSortByDisplayname, +} + +var mappingGetIdentityConfigurationSortByEnumLowerCase = map[string]GetIdentityConfigurationSortByEnum{ + "timecreated": GetIdentityConfigurationSortByTimecreated, + "displayname": GetIdentityConfigurationSortByDisplayname, +} + +// GetGetIdentityConfigurationSortByEnumValues Enumerates the set of values for GetIdentityConfigurationSortByEnum +func GetGetIdentityConfigurationSortByEnumValues() []GetIdentityConfigurationSortByEnum { + values := make([]GetIdentityConfigurationSortByEnum, 0) + for _, v := range mappingGetIdentityConfigurationSortByEnum { + values = append(values, v) + } + return values +} + +// GetGetIdentityConfigurationSortByEnumStringValues Enumerates the set of values in String for GetIdentityConfigurationSortByEnum +func GetGetIdentityConfigurationSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingGetIdentityConfigurationSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetIdentityConfigurationSortByEnum(val string) (GetIdentityConfigurationSortByEnum, bool) { + enum, ok := mappingGetIdentityConfigurationSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// GetIdentityConfigurationSortOrderEnum Enum with underlying type: string +type GetIdentityConfigurationSortOrderEnum string + +// Set of constants representing the allowable values for GetIdentityConfigurationSortOrderEnum +const ( + GetIdentityConfigurationSortOrderAsc GetIdentityConfigurationSortOrderEnum = "ASC" + GetIdentityConfigurationSortOrderDesc GetIdentityConfigurationSortOrderEnum = "DESC" +) + +var mappingGetIdentityConfigurationSortOrderEnum = map[string]GetIdentityConfigurationSortOrderEnum{ + "ASC": GetIdentityConfigurationSortOrderAsc, + "DESC": GetIdentityConfigurationSortOrderDesc, +} + +var mappingGetIdentityConfigurationSortOrderEnumLowerCase = map[string]GetIdentityConfigurationSortOrderEnum{ + "asc": GetIdentityConfigurationSortOrderAsc, + "desc": GetIdentityConfigurationSortOrderDesc, +} + +// GetGetIdentityConfigurationSortOrderEnumValues Enumerates the set of values for GetIdentityConfigurationSortOrderEnum +func GetGetIdentityConfigurationSortOrderEnumValues() []GetIdentityConfigurationSortOrderEnum { + values := make([]GetIdentityConfigurationSortOrderEnum, 0) + for _, v := range mappingGetIdentityConfigurationSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetGetIdentityConfigurationSortOrderEnumStringValues Enumerates the set of values in String for GetIdentityConfigurationSortOrderEnum +func GetGetIdentityConfigurationSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingGetIdentityConfigurationSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetIdentityConfigurationSortOrderEnum(val string) (GetIdentityConfigurationSortOrderEnum, bool) { + enum, ok := mappingGetIdentityConfigurationSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/iam_user_sync_configuration.go b/bds/iam_user_sync_configuration.go new file mode 100644 index 0000000000..16d4b2d29d --- /dev/null +++ b/bds/iam_user_sync_configuration.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IamUserSyncConfiguration Information about the IAM user sync configuration. +type IamUserSyncConfiguration struct { + + // whether to append POSIX attributes to IAM users + IsPosixAttributesAdditionRequired *bool `mandatory:"true" json:"isPosixAttributesAdditionRequired"` + + // Lifecycle state of the IAM user sync config + LifecycleState IamUserSyncConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Time when this IAM user sync config was created, shown as an RFC 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Time when this IAM user sync config was updated, shown as an RFC 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` +} + +func (m IamUserSyncConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IamUserSyncConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIamUserSyncConfigurationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetIamUserSyncConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IamUserSyncConfigurationLifecycleStateEnum Enum with underlying type: string +type IamUserSyncConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for IamUserSyncConfigurationLifecycleStateEnum +const ( + IamUserSyncConfigurationLifecycleStateCreating IamUserSyncConfigurationLifecycleStateEnum = "CREATING" + IamUserSyncConfigurationLifecycleStateActive IamUserSyncConfigurationLifecycleStateEnum = "ACTIVE" + IamUserSyncConfigurationLifecycleStateInactive IamUserSyncConfigurationLifecycleStateEnum = "INACTIVE" + IamUserSyncConfigurationLifecycleStateDeleting IamUserSyncConfigurationLifecycleStateEnum = "DELETING" + IamUserSyncConfigurationLifecycleStateUpdating IamUserSyncConfigurationLifecycleStateEnum = "UPDATING" + IamUserSyncConfigurationLifecycleStateFailed IamUserSyncConfigurationLifecycleStateEnum = "FAILED" +) + +var mappingIamUserSyncConfigurationLifecycleStateEnum = map[string]IamUserSyncConfigurationLifecycleStateEnum{ + "CREATING": IamUserSyncConfigurationLifecycleStateCreating, + "ACTIVE": IamUserSyncConfigurationLifecycleStateActive, + "INACTIVE": IamUserSyncConfigurationLifecycleStateInactive, + "DELETING": IamUserSyncConfigurationLifecycleStateDeleting, + "UPDATING": IamUserSyncConfigurationLifecycleStateUpdating, + "FAILED": IamUserSyncConfigurationLifecycleStateFailed, +} + +var mappingIamUserSyncConfigurationLifecycleStateEnumLowerCase = map[string]IamUserSyncConfigurationLifecycleStateEnum{ + "creating": IamUserSyncConfigurationLifecycleStateCreating, + "active": IamUserSyncConfigurationLifecycleStateActive, + "inactive": IamUserSyncConfigurationLifecycleStateInactive, + "deleting": IamUserSyncConfigurationLifecycleStateDeleting, + "updating": IamUserSyncConfigurationLifecycleStateUpdating, + "failed": IamUserSyncConfigurationLifecycleStateFailed, +} + +// GetIamUserSyncConfigurationLifecycleStateEnumValues Enumerates the set of values for IamUserSyncConfigurationLifecycleStateEnum +func GetIamUserSyncConfigurationLifecycleStateEnumValues() []IamUserSyncConfigurationLifecycleStateEnum { + values := make([]IamUserSyncConfigurationLifecycleStateEnum, 0) + for _, v := range mappingIamUserSyncConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetIamUserSyncConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for IamUserSyncConfigurationLifecycleStateEnum +func GetIamUserSyncConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "INACTIVE", + "DELETING", + "UPDATING", + "FAILED", + } +} + +// GetMappingIamUserSyncConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIamUserSyncConfigurationLifecycleStateEnum(val string) (IamUserSyncConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingIamUserSyncConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/iam_user_sync_configuration_details.go b/bds/iam_user_sync_configuration_details.go new file mode 100644 index 0000000000..240ada05f8 --- /dev/null +++ b/bds/iam_user_sync_configuration_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IamUserSyncConfigurationDetails Details for activating/updating an IAM user sync configuration +type IamUserSyncConfigurationDetails struct { + + // whether posix attribute needs to be appended to users, required for updating IAM user sync configuration + IsPosixAttributesAdditionRequired *bool `mandatory:"false" json:"isPosixAttributesAdditionRequired"` +} + +func (m IamUserSyncConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IamUserSyncConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/identity_configuration.go b/bds/identity_configuration.go new file mode 100644 index 0000000000..ffc00e99f7 --- /dev/null +++ b/bds/identity_configuration.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IdentityConfiguration Details about the identity configuration +type IdentityConfiguration struct { + + // The id of the UPST config + Id *string `mandatory:"true" json:"id"` + + // the display name of the identity configuration + DisplayName *string `mandatory:"true" json:"displayName"` + + // Identity domain to use for identity config + IdentityDomainId *string `mandatory:"true" json:"identityDomainId"` + + // identity domain confidential application ID for the identity config + ConfidentialApplicationId *string `mandatory:"true" json:"confidentialApplicationId"` + + // Lifecycle state of the identity configuration + LifecycleState IdentityConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Time when this identity configuration was created, shown as an RFC 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Time when this identity configuration config was updated, shown as an RFC 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + IamUserSyncConfiguration *IamUserSyncConfiguration `mandatory:"false" json:"iamUserSyncConfiguration"` + + UpstConfiguration *UpstConfiguration `mandatory:"false" json:"upstConfiguration"` +} + +func (m IdentityConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IdentityConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIdentityConfigurationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetIdentityConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IdentityConfigurationLifecycleStateEnum Enum with underlying type: string +type IdentityConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for IdentityConfigurationLifecycleStateEnum +const ( + IdentityConfigurationLifecycleStateActive IdentityConfigurationLifecycleStateEnum = "ACTIVE" + IdentityConfigurationLifecycleStateDeleted IdentityConfigurationLifecycleStateEnum = "DELETED" +) + +var mappingIdentityConfigurationLifecycleStateEnum = map[string]IdentityConfigurationLifecycleStateEnum{ + "ACTIVE": IdentityConfigurationLifecycleStateActive, + "DELETED": IdentityConfigurationLifecycleStateDeleted, +} + +var mappingIdentityConfigurationLifecycleStateEnumLowerCase = map[string]IdentityConfigurationLifecycleStateEnum{ + "active": IdentityConfigurationLifecycleStateActive, + "deleted": IdentityConfigurationLifecycleStateDeleted, +} + +// GetIdentityConfigurationLifecycleStateEnumValues Enumerates the set of values for IdentityConfigurationLifecycleStateEnum +func GetIdentityConfigurationLifecycleStateEnumValues() []IdentityConfigurationLifecycleStateEnum { + values := make([]IdentityConfigurationLifecycleStateEnum, 0) + for _, v := range mappingIdentityConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetIdentityConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for IdentityConfigurationLifecycleStateEnum +func GetIdentityConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + } +} + +// GetMappingIdentityConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIdentityConfigurationLifecycleStateEnum(val string) (IdentityConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingIdentityConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/identity_configuration_summary.go b/bds/identity_configuration_summary.go new file mode 100644 index 0000000000..a5e4a26ac4 --- /dev/null +++ b/bds/identity_configuration_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IdentityConfigurationSummary Summary of the identity config +type IdentityConfigurationSummary struct { + + // The id of the identity config + Id *string `mandatory:"true" json:"id"` + + // Display name of the identity config + DisplayName *string `mandatory:"true" json:"displayName"` + + // Lifecycle state of the identity config + LifecycleState IdentityConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +func (m IdentityConfigurationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IdentityConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIdentityConfigurationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetIdentityConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/list_bds_cluster_versions_request_response.go b/bds/list_bds_cluster_versions_request_response.go new file mode 100644 index 0000000000..d18e42155e --- /dev/null +++ b/bds/list_bds_cluster_versions_request_response.go @@ -0,0 +1,190 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBdsClusterVersionsRequest wrapper for the ListBdsClusterVersions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListBdsClusterVersions.go.html to see an example of how to use ListBdsClusterVersionsRequest. +type ListBdsClusterVersionsRequest struct { + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. If no value is specified bdsVersion is default. + SortBy ListBdsClusterVersionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListBdsClusterVersionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBdsClusterVersionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBdsClusterVersionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBdsClusterVersionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBdsClusterVersionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBdsClusterVersionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListBdsClusterVersionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListBdsClusterVersionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListBdsClusterVersionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListBdsClusterVersionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBdsClusterVersionsResponse wrapper for the ListBdsClusterVersions operation +type ListBdsClusterVersionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BdsClusterVersionSummary instances + Items []BdsClusterVersionSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 ListBdsClusterVersionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBdsClusterVersionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBdsClusterVersionsSortByEnum Enum with underlying type: string +type ListBdsClusterVersionsSortByEnum string + +// Set of constants representing the allowable values for ListBdsClusterVersionsSortByEnum +const ( + ListBdsClusterVersionsSortByBdsversion ListBdsClusterVersionsSortByEnum = "bdsVersion" +) + +var mappingListBdsClusterVersionsSortByEnum = map[string]ListBdsClusterVersionsSortByEnum{ + "bdsVersion": ListBdsClusterVersionsSortByBdsversion, +} + +var mappingListBdsClusterVersionsSortByEnumLowerCase = map[string]ListBdsClusterVersionsSortByEnum{ + "bdsversion": ListBdsClusterVersionsSortByBdsversion, +} + +// GetListBdsClusterVersionsSortByEnumValues Enumerates the set of values for ListBdsClusterVersionsSortByEnum +func GetListBdsClusterVersionsSortByEnumValues() []ListBdsClusterVersionsSortByEnum { + values := make([]ListBdsClusterVersionsSortByEnum, 0) + for _, v := range mappingListBdsClusterVersionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListBdsClusterVersionsSortByEnumStringValues Enumerates the set of values in String for ListBdsClusterVersionsSortByEnum +func GetListBdsClusterVersionsSortByEnumStringValues() []string { + return []string{ + "bdsVersion", + } +} + +// GetMappingListBdsClusterVersionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBdsClusterVersionsSortByEnum(val string) (ListBdsClusterVersionsSortByEnum, bool) { + enum, ok := mappingListBdsClusterVersionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListBdsClusterVersionsSortOrderEnum Enum with underlying type: string +type ListBdsClusterVersionsSortOrderEnum string + +// Set of constants representing the allowable values for ListBdsClusterVersionsSortOrderEnum +const ( + ListBdsClusterVersionsSortOrderAsc ListBdsClusterVersionsSortOrderEnum = "ASC" + ListBdsClusterVersionsSortOrderDesc ListBdsClusterVersionsSortOrderEnum = "DESC" +) + +var mappingListBdsClusterVersionsSortOrderEnum = map[string]ListBdsClusterVersionsSortOrderEnum{ + "ASC": ListBdsClusterVersionsSortOrderAsc, + "DESC": ListBdsClusterVersionsSortOrderDesc, +} + +var mappingListBdsClusterVersionsSortOrderEnumLowerCase = map[string]ListBdsClusterVersionsSortOrderEnum{ + "asc": ListBdsClusterVersionsSortOrderAsc, + "desc": ListBdsClusterVersionsSortOrderDesc, +} + +// GetListBdsClusterVersionsSortOrderEnumValues Enumerates the set of values for ListBdsClusterVersionsSortOrderEnum +func GetListBdsClusterVersionsSortOrderEnumValues() []ListBdsClusterVersionsSortOrderEnum { + values := make([]ListBdsClusterVersionsSortOrderEnum, 0) + for _, v := range mappingListBdsClusterVersionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListBdsClusterVersionsSortOrderEnumStringValues Enumerates the set of values in String for ListBdsClusterVersionsSortOrderEnum +func GetListBdsClusterVersionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListBdsClusterVersionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBdsClusterVersionsSortOrderEnum(val string) (ListBdsClusterVersionsSortOrderEnum, bool) { + enum, ok := mappingListBdsClusterVersionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/list_identity_configurations_request_response.go b/bds/list_identity_configurations_request_response.go new file mode 100644 index 0000000000..d4626ddf7a --- /dev/null +++ b/bds/list_identity_configurations_request_response.go @@ -0,0 +1,209 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIdentityConfigurationsRequest wrapper for the ListIdentityConfigurations operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListIdentityConfigurations.go.html to see an example of how to use ListIdentityConfigurationsRequest. +type ListIdentityConfigurationsRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + SortBy ListIdentityConfigurationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListIdentityConfigurationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The state of the identity config + LifecycleState IdentityConfigurationLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIdentityConfigurationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIdentityConfigurationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIdentityConfigurationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIdentityConfigurationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIdentityConfigurationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListIdentityConfigurationsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListIdentityConfigurationsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListIdentityConfigurationsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListIdentityConfigurationsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingIdentityConfigurationLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetIdentityConfigurationLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIdentityConfigurationsResponse wrapper for the ListIdentityConfigurations operation +type ListIdentityConfigurationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []IdentityConfigurationSummary instances + Items []IdentityConfigurationSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 ListIdentityConfigurationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIdentityConfigurationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListIdentityConfigurationsSortByEnum Enum with underlying type: string +type ListIdentityConfigurationsSortByEnum string + +// Set of constants representing the allowable values for ListIdentityConfigurationsSortByEnum +const ( + ListIdentityConfigurationsSortByTimecreated ListIdentityConfigurationsSortByEnum = "timeCreated" + ListIdentityConfigurationsSortByDisplayname ListIdentityConfigurationsSortByEnum = "displayName" +) + +var mappingListIdentityConfigurationsSortByEnum = map[string]ListIdentityConfigurationsSortByEnum{ + "timeCreated": ListIdentityConfigurationsSortByTimecreated, + "displayName": ListIdentityConfigurationsSortByDisplayname, +} + +var mappingListIdentityConfigurationsSortByEnumLowerCase = map[string]ListIdentityConfigurationsSortByEnum{ + "timecreated": ListIdentityConfigurationsSortByTimecreated, + "displayname": ListIdentityConfigurationsSortByDisplayname, +} + +// GetListIdentityConfigurationsSortByEnumValues Enumerates the set of values for ListIdentityConfigurationsSortByEnum +func GetListIdentityConfigurationsSortByEnumValues() []ListIdentityConfigurationsSortByEnum { + values := make([]ListIdentityConfigurationsSortByEnum, 0) + for _, v := range mappingListIdentityConfigurationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListIdentityConfigurationsSortByEnumStringValues Enumerates the set of values in String for ListIdentityConfigurationsSortByEnum +func GetListIdentityConfigurationsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListIdentityConfigurationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIdentityConfigurationsSortByEnum(val string) (ListIdentityConfigurationsSortByEnum, bool) { + enum, ok := mappingListIdentityConfigurationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListIdentityConfigurationsSortOrderEnum Enum with underlying type: string +type ListIdentityConfigurationsSortOrderEnum string + +// Set of constants representing the allowable values for ListIdentityConfigurationsSortOrderEnum +const ( + ListIdentityConfigurationsSortOrderAsc ListIdentityConfigurationsSortOrderEnum = "ASC" + ListIdentityConfigurationsSortOrderDesc ListIdentityConfigurationsSortOrderEnum = "DESC" +) + +var mappingListIdentityConfigurationsSortOrderEnum = map[string]ListIdentityConfigurationsSortOrderEnum{ + "ASC": ListIdentityConfigurationsSortOrderAsc, + "DESC": ListIdentityConfigurationsSortOrderDesc, +} + +var mappingListIdentityConfigurationsSortOrderEnumLowerCase = map[string]ListIdentityConfigurationsSortOrderEnum{ + "asc": ListIdentityConfigurationsSortOrderAsc, + "desc": ListIdentityConfigurationsSortOrderDesc, +} + +// GetListIdentityConfigurationsSortOrderEnumValues Enumerates the set of values for ListIdentityConfigurationsSortOrderEnum +func GetListIdentityConfigurationsSortOrderEnumValues() []ListIdentityConfigurationsSortOrderEnum { + values := make([]ListIdentityConfigurationsSortOrderEnum, 0) + for _, v := range mappingListIdentityConfigurationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListIdentityConfigurationsSortOrderEnumStringValues Enumerates the set of values in String for ListIdentityConfigurationsSortOrderEnum +func GetListIdentityConfigurationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListIdentityConfigurationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIdentityConfigurationsSortOrderEnum(val string) (ListIdentityConfigurationsSortOrderEnum, bool) { + enum, ok := mappingListIdentityConfigurationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/node_type_shape_config.go b/bds/node_type_shape_config.go new file mode 100644 index 0000000000..7ed40d0e16 --- /dev/null +++ b/bds/node_type_shape_config.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeTypeShapeConfig Shape configuration at node type level. Start cluster will start all nodes as is if no config is specified. +type NodeTypeShapeConfig struct { + + // The Big Data Service cluster node type. + NodeType NodeNodeTypeEnum `mandatory:"true" json:"nodeType"` + + // Shape of the node. This has to be specified when starting the cluster. Defaults to wn0 for homogeneous clusters and remains empty for heterogeneous clusters. + // If provided, all nodes in the node type will adopt the specified shape; otherwise, nodes retain their original shapes. + Shape *string `mandatory:"true" json:"shape"` +} + +func (m NodeTypeShapeConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodeTypeShapeConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingNodeNodeTypeEnum(string(m.NodeType)); !ok && m.NodeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NodeType: %s. Supported values are: %s.", m.NodeType, strings.Join(GetNodeNodeTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/operation_types.go b/bds/operation_types.go index c11a4ba8dc..8b17f6ba4c 100644 --- a/bds/operation_types.go +++ b/bds/operation_types.go @@ -67,6 +67,15 @@ const ( OperationTypesDeleteResourcePrincipalConfiguration OperationTypesEnum = "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION" OperationTypesUpdateResourcePrincipalConfiguration OperationTypesEnum = "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION" OperationTypesRefreshResourcePrincipal OperationTypesEnum = "REFRESH_RESOURCE_PRINCIPAL" + OperationTypesCreateIdentityConfig OperationTypesEnum = "CREATE_IDENTITY_CONFIG" + OperationTypesDeleteIdentityConfig OperationTypesEnum = "DELETE_IDENTITY_CONFIG" + OperationTypesUpdateIdentityConfig OperationTypesEnum = "UPDATE_IDENTITY_CONFIG" + OperationTypesActivateUpstConfig OperationTypesEnum = "ACTIVATE_UPST_CONFIG" + OperationTypesDeactivateUpstConfig OperationTypesEnum = "DEACTIVATE_UPST_CONFIG" + OperationTypesRefreshConfidentialApplication OperationTypesEnum = "REFRESH_CONFIDENTIAL_APPLICATION" + OperationTypesRefreshTokenExchangeKeytab OperationTypesEnum = "REFRESH_TOKEN_EXCHANGE_KEYTAB" + OperationTypesActivateIamUserSyncConfig OperationTypesEnum = "ACTIVATE_IAM_USER_SYNC_CONFIG" + OperationTypesDeactivateIamUserSyncConfig OperationTypesEnum = "DEACTIVATE_IAM_USER_SYNC_CONFIG" ) var mappingOperationTypesEnum = map[string]OperationTypesEnum{ @@ -119,6 +128,15 @@ var mappingOperationTypesEnum = map[string]OperationTypesEnum{ "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION": OperationTypesDeleteResourcePrincipalConfiguration, "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION": OperationTypesUpdateResourcePrincipalConfiguration, "REFRESH_RESOURCE_PRINCIPAL": OperationTypesRefreshResourcePrincipal, + "CREATE_IDENTITY_CONFIG": OperationTypesCreateIdentityConfig, + "DELETE_IDENTITY_CONFIG": OperationTypesDeleteIdentityConfig, + "UPDATE_IDENTITY_CONFIG": OperationTypesUpdateIdentityConfig, + "ACTIVATE_UPST_CONFIG": OperationTypesActivateUpstConfig, + "DEACTIVATE_UPST_CONFIG": OperationTypesDeactivateUpstConfig, + "REFRESH_CONFIDENTIAL_APPLICATION": OperationTypesRefreshConfidentialApplication, + "REFRESH_TOKEN_EXCHANGE_KEYTAB": OperationTypesRefreshTokenExchangeKeytab, + "ACTIVATE_IAM_USER_SYNC_CONFIG": OperationTypesActivateIamUserSyncConfig, + "DEACTIVATE_IAM_USER_SYNC_CONFIG": OperationTypesDeactivateIamUserSyncConfig, } var mappingOperationTypesEnumLowerCase = map[string]OperationTypesEnum{ @@ -171,6 +189,15 @@ var mappingOperationTypesEnumLowerCase = map[string]OperationTypesEnum{ "delete_resource_principal_configuration": OperationTypesDeleteResourcePrincipalConfiguration, "update_resource_principal_configuration": OperationTypesUpdateResourcePrincipalConfiguration, "refresh_resource_principal": OperationTypesRefreshResourcePrincipal, + "create_identity_config": OperationTypesCreateIdentityConfig, + "delete_identity_config": OperationTypesDeleteIdentityConfig, + "update_identity_config": OperationTypesUpdateIdentityConfig, + "activate_upst_config": OperationTypesActivateUpstConfig, + "deactivate_upst_config": OperationTypesDeactivateUpstConfig, + "refresh_confidential_application": OperationTypesRefreshConfidentialApplication, + "refresh_token_exchange_keytab": OperationTypesRefreshTokenExchangeKeytab, + "activate_iam_user_sync_config": OperationTypesActivateIamUserSyncConfig, + "deactivate_iam_user_sync_config": OperationTypesDeactivateIamUserSyncConfig, } // GetOperationTypesEnumValues Enumerates the set of values for OperationTypesEnum @@ -234,6 +261,15 @@ func GetOperationTypesEnumStringValues() []string { "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION", "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION", "REFRESH_RESOURCE_PRINCIPAL", + "CREATE_IDENTITY_CONFIG", + "DELETE_IDENTITY_CONFIG", + "UPDATE_IDENTITY_CONFIG", + "ACTIVATE_UPST_CONFIG", + "DEACTIVATE_UPST_CONFIG", + "REFRESH_CONFIDENTIAL_APPLICATION", + "REFRESH_TOKEN_EXCHANGE_KEYTAB", + "ACTIVATE_IAM_USER_SYNC_CONFIG", + "DEACTIVATE_IAM_USER_SYNC_CONFIG", } } diff --git a/bds/refresh_confidential_application_details.go b/bds/refresh_confidential_application_details.go new file mode 100644 index 0000000000..bdbe870edd --- /dev/null +++ b/bds/refresh_confidential_application_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RefreshConfidentialApplicationDetails Details for refreshing confidential application +type RefreshConfidentialApplicationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m RefreshConfidentialApplicationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RefreshConfidentialApplicationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/refresh_confidential_application_request_response.go b/bds/refresh_confidential_application_request_response.go new file mode 100644 index 0000000000..4d7318ef76 --- /dev/null +++ b/bds/refresh_confidential_application_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RefreshConfidentialApplicationRequest wrapper for the RefreshConfidentialApplication operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshConfidentialApplication.go.html to see an example of how to use RefreshConfidentialApplicationRequest. +type RefreshConfidentialApplicationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for refreshing confidential application + RefreshConfidentialApplicationDetails `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"` + + // 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RefreshConfidentialApplicationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RefreshConfidentialApplicationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RefreshConfidentialApplicationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RefreshConfidentialApplicationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RefreshConfidentialApplicationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RefreshConfidentialApplicationResponse wrapper for the RefreshConfidentialApplication operation +type RefreshConfidentialApplicationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response RefreshConfidentialApplicationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RefreshConfidentialApplicationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/refresh_upst_token_exchange_keytab_details.go b/bds/refresh_upst_token_exchange_keytab_details.go new file mode 100644 index 0000000000..77ee3663a7 --- /dev/null +++ b/bds/refresh_upst_token_exchange_keytab_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RefreshUpstTokenExchangeKeytabDetails Details for refreshing User Principal Session (UPST) token exchange keytab +type RefreshUpstTokenExchangeKeytabDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m RefreshUpstTokenExchangeKeytabDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RefreshUpstTokenExchangeKeytabDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/refresh_upst_token_exchange_keytab_request_response.go b/bds/refresh_upst_token_exchange_keytab_request_response.go new file mode 100644 index 0000000000..c780e929e2 --- /dev/null +++ b/bds/refresh_upst_token_exchange_keytab_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RefreshUpstTokenExchangeKeytabRequest wrapper for the RefreshUpstTokenExchangeKeytab operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshUpstTokenExchangeKeytab.go.html to see an example of how to use RefreshUpstTokenExchangeKeytabRequest. +type RefreshUpstTokenExchangeKeytabRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for refreshing User Principal Session (UPST) token exchange keytab + RefreshUpstTokenExchangeKeytabDetails `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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // 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"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RefreshUpstTokenExchangeKeytabRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RefreshUpstTokenExchangeKeytabRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RefreshUpstTokenExchangeKeytabRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RefreshUpstTokenExchangeKeytabRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RefreshUpstTokenExchangeKeytabRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RefreshUpstTokenExchangeKeytabResponse wrapper for the RefreshUpstTokenExchangeKeytab operation +type RefreshUpstTokenExchangeKeytabResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response RefreshUpstTokenExchangeKeytabResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RefreshUpstTokenExchangeKeytabResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/start_bds_instance_details.go b/bds/start_bds_instance_details.go index fba6785365..cdc092e6a0 100644 --- a/bds/start_bds_instance_details.go +++ b/bds/start_bds_instance_details.go @@ -20,6 +20,8 @@ type StartBdsInstanceDetails struct { // Base-64 encoded password for the cluster admin user. ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + StartClusterShapeConfigs *StartClusterShapeConfigs `mandatory:"false" json:"startClusterShapeConfigs"` } func (m StartBdsInstanceDetails) String() string { diff --git a/bds/start_cluster_shape_configs.go b/bds/start_cluster_shape_configs.go new file mode 100644 index 0000000000..bb67c485ae --- /dev/null +++ b/bds/start_cluster_shape_configs.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StartClusterShapeConfigs The shape configuration to be used to start the cluster. If the value is not set, the start cluster operation will try to start the cluster as is. +type StartClusterShapeConfigs struct { + + // Shape configurations for each node type. + NodeTypeShapeConfigs []NodeTypeShapeConfig `mandatory:"true" json:"nodeTypeShapeConfigs"` +} + +func (m StartClusterShapeConfigs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m StartClusterShapeConfigs) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/update_bds_instance_details.go b/bds/update_bds_instance_details.go index 788cd3d725..7be9d0bc80 100644 --- a/bds/update_bds_instance_details.go +++ b/bds/update_bds_instance_details.go @@ -34,6 +34,8 @@ type UpdateBdsInstanceDetails struct { // The OCID of the Key Management master encryption key. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + NetworkConfig *NetworkConfig `mandatory:"false" json:"networkConfig"` } func (m UpdateBdsInstanceDetails) String() string { diff --git a/bds/update_identity_configuration_details.go b/bds/update_identity_configuration_details.go new file mode 100644 index 0000000000..249a7a9817 --- /dev/null +++ b/bds/update_identity_configuration_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIdentityConfigurationDetails Details for updating identity config on the cluster +type UpdateIdentityConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + UpstConfigurationDetails *UpstConfigurationDetails `mandatory:"false" json:"upstConfigurationDetails"` + + IamUserSyncConfigurationDetails *IamUserSyncConfigurationDetails `mandatory:"false" json:"iamUserSyncConfigurationDetails"` +} + +func (m UpdateIdentityConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateIdentityConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/update_identity_configuration_request_response.go b/bds/update_identity_configuration_request_response.go new file mode 100644 index 0000000000..ca07aceee5 --- /dev/null +++ b/bds/update_identity_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateIdentityConfigurationRequest wrapper for the UpdateIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/UpdateIdentityConfiguration.go.html to see an example of how to use UpdateIdentityConfigurationRequest. +type UpdateIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for updating an identity configuration + UpdateIdentityConfigurationDetails `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"` + + // 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateIdentityConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIdentityConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIdentityConfigurationResponse wrapper for the UpdateIdentityConfiguration operation +type UpdateIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/upst_configuration.go b/bds/upst_configuration.go new file mode 100644 index 0000000000..decac52f09 --- /dev/null +++ b/bds/upst_configuration.go @@ -0,0 +1,124 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpstConfiguration Information about the UPST configuration. +type UpstConfiguration struct { + + // The instance OCID of the node, which is the resource from which the node backup was acquired. + VaultId *string `mandatory:"true" json:"vaultId"` + + // Master Encryption key used for encrypting token exchange keytab. + MasterEncryptionKeyId *string `mandatory:"true" json:"masterEncryptionKeyId"` + + // Secret ID for token exchange keytab + SecretId *string `mandatory:"true" json:"secretId"` + + // Time when the keytab for token exchange principal is last refreshed, shown as an RFC 3339 formatted datetime string. + TimeTokenExchangeKeytabLastRefreshed *common.SDKTime `mandatory:"true" json:"timeTokenExchangeKeytabLastRefreshed"` + + // Lifecycle state of the UPST config + LifecycleState UpstConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Time when this UPST config was created, shown as an RFC 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Time when this UPST config was updated, shown as an RFC 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The kerberos keytab content used for creating identity propagation trust config, in base64 format + KeytabContent *string `mandatory:"true" json:"keytabContent"` + + // Token exchange kerberos Principal name in cluster + TokenExchangePrincipalName *string `mandatory:"false" json:"tokenExchangePrincipalName"` +} + +func (m UpstConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpstConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingUpstConfigurationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetUpstConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpstConfigurationLifecycleStateEnum Enum with underlying type: string +type UpstConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for UpstConfigurationLifecycleStateEnum +const ( + UpstConfigurationLifecycleStateCreating UpstConfigurationLifecycleStateEnum = "CREATING" + UpstConfigurationLifecycleStateActive UpstConfigurationLifecycleStateEnum = "ACTIVE" + UpstConfigurationLifecycleStateDeleting UpstConfigurationLifecycleStateEnum = "DELETING" + UpstConfigurationLifecycleStateInactive UpstConfigurationLifecycleStateEnum = "INACTIVE" + UpstConfigurationLifecycleStateUpdating UpstConfigurationLifecycleStateEnum = "UPDATING" + UpstConfigurationLifecycleStateFailed UpstConfigurationLifecycleStateEnum = "FAILED" +) + +var mappingUpstConfigurationLifecycleStateEnum = map[string]UpstConfigurationLifecycleStateEnum{ + "CREATING": UpstConfigurationLifecycleStateCreating, + "ACTIVE": UpstConfigurationLifecycleStateActive, + "DELETING": UpstConfigurationLifecycleStateDeleting, + "INACTIVE": UpstConfigurationLifecycleStateInactive, + "UPDATING": UpstConfigurationLifecycleStateUpdating, + "FAILED": UpstConfigurationLifecycleStateFailed, +} + +var mappingUpstConfigurationLifecycleStateEnumLowerCase = map[string]UpstConfigurationLifecycleStateEnum{ + "creating": UpstConfigurationLifecycleStateCreating, + "active": UpstConfigurationLifecycleStateActive, + "deleting": UpstConfigurationLifecycleStateDeleting, + "inactive": UpstConfigurationLifecycleStateInactive, + "updating": UpstConfigurationLifecycleStateUpdating, + "failed": UpstConfigurationLifecycleStateFailed, +} + +// GetUpstConfigurationLifecycleStateEnumValues Enumerates the set of values for UpstConfigurationLifecycleStateEnum +func GetUpstConfigurationLifecycleStateEnumValues() []UpstConfigurationLifecycleStateEnum { + values := make([]UpstConfigurationLifecycleStateEnum, 0) + for _, v := range mappingUpstConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetUpstConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for UpstConfigurationLifecycleStateEnum +func GetUpstConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETING", + "INACTIVE", + "UPDATING", + "FAILED", + } +} + +// GetMappingUpstConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpstConfigurationLifecycleStateEnum(val string) (UpstConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingUpstConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/upst_configuration_details.go b/bds/upst_configuration_details.go new file mode 100644 index 0000000000..07d2ad9a2e --- /dev/null +++ b/bds/upst_configuration_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpstConfigurationDetails Details for activating/updating UPST config on the cluster +type UpstConfigurationDetails struct { + + // OCID of the vault to store token exchange service principal keyta, required for activating UPST config + VaultId *string `mandatory:"false" json:"vaultId"` + + // OCID of the master encryption key in vault for encrypting token exchange service principal keytab, required for activating UPST config + MasterEncryptionKeyId *string `mandatory:"false" json:"masterEncryptionKeyId"` +} + +func (m UpstConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpstConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/blockchain/blockchain_platform.go b/blockchain/blockchain_platform.go index e95f9f34f5..a20516a09f 100644 --- a/blockchain/blockchain_platform.go +++ b/blockchain/blockchain_platform.go @@ -30,7 +30,7 @@ type BlockchainPlatform struct { // Role of platform - FOUNDER or PARTICIPANT PlatformRole BlockchainPlatformPlatformRoleEnum `mandatory:"true" json:"platformRole"` - // Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM + // Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM or DIGITAL_ASSETS_MEDIUM or DIGITAL_ASSETS_LARGE or DIGITAL_ASSETS_EXTRA_LARGE ComputeShape BlockchainPlatformComputeShapeEnum `mandatory:"true" json:"computeShape"` // Platform Instance Description @@ -172,30 +172,39 @@ type BlockchainPlatformComputeShapeEnum string // Set of constants representing the allowable values for BlockchainPlatformComputeShapeEnum const ( - BlockchainPlatformComputeShapeStandard BlockchainPlatformComputeShapeEnum = "STANDARD" - BlockchainPlatformComputeShapeEnterpriseSmall BlockchainPlatformComputeShapeEnum = "ENTERPRISE_SMALL" - BlockchainPlatformComputeShapeEnterpriseMedium BlockchainPlatformComputeShapeEnum = "ENTERPRISE_MEDIUM" - BlockchainPlatformComputeShapeEnterpriseLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_LARGE" - BlockchainPlatformComputeShapeEnterpriseExtraLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_EXTRA_LARGE" - BlockchainPlatformComputeShapeEnterpriseCustom BlockchainPlatformComputeShapeEnum = "ENTERPRISE_CUSTOM" + BlockchainPlatformComputeShapeStandard BlockchainPlatformComputeShapeEnum = "STANDARD" + BlockchainPlatformComputeShapeEnterpriseSmall BlockchainPlatformComputeShapeEnum = "ENTERPRISE_SMALL" + BlockchainPlatformComputeShapeEnterpriseMedium BlockchainPlatformComputeShapeEnum = "ENTERPRISE_MEDIUM" + BlockchainPlatformComputeShapeEnterpriseLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_LARGE" + BlockchainPlatformComputeShapeEnterpriseExtraLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_EXTRA_LARGE" + BlockchainPlatformComputeShapeEnterpriseCustom BlockchainPlatformComputeShapeEnum = "ENTERPRISE_CUSTOM" + BlockchainPlatformComputeShapeDigitalAssetsMedium BlockchainPlatformComputeShapeEnum = "DIGITAL_ASSETS_MEDIUM" + BlockchainPlatformComputeShapeDigitalAssetsLarge BlockchainPlatformComputeShapeEnum = "DIGITAL_ASSETS_LARGE" + BlockchainPlatformComputeShapeDigitalAssetsExtraLarge BlockchainPlatformComputeShapeEnum = "DIGITAL_ASSETS_EXTRA_LARGE" ) var mappingBlockchainPlatformComputeShapeEnum = map[string]BlockchainPlatformComputeShapeEnum{ - "STANDARD": BlockchainPlatformComputeShapeStandard, - "ENTERPRISE_SMALL": BlockchainPlatformComputeShapeEnterpriseSmall, - "ENTERPRISE_MEDIUM": BlockchainPlatformComputeShapeEnterpriseMedium, - "ENTERPRISE_LARGE": BlockchainPlatformComputeShapeEnterpriseLarge, - "ENTERPRISE_EXTRA_LARGE": BlockchainPlatformComputeShapeEnterpriseExtraLarge, - "ENTERPRISE_CUSTOM": BlockchainPlatformComputeShapeEnterpriseCustom, + "STANDARD": BlockchainPlatformComputeShapeStandard, + "ENTERPRISE_SMALL": BlockchainPlatformComputeShapeEnterpriseSmall, + "ENTERPRISE_MEDIUM": BlockchainPlatformComputeShapeEnterpriseMedium, + "ENTERPRISE_LARGE": BlockchainPlatformComputeShapeEnterpriseLarge, + "ENTERPRISE_EXTRA_LARGE": BlockchainPlatformComputeShapeEnterpriseExtraLarge, + "ENTERPRISE_CUSTOM": BlockchainPlatformComputeShapeEnterpriseCustom, + "DIGITAL_ASSETS_MEDIUM": BlockchainPlatformComputeShapeDigitalAssetsMedium, + "DIGITAL_ASSETS_LARGE": BlockchainPlatformComputeShapeDigitalAssetsLarge, + "DIGITAL_ASSETS_EXTRA_LARGE": BlockchainPlatformComputeShapeDigitalAssetsExtraLarge, } var mappingBlockchainPlatformComputeShapeEnumLowerCase = map[string]BlockchainPlatformComputeShapeEnum{ - "standard": BlockchainPlatformComputeShapeStandard, - "enterprise_small": BlockchainPlatformComputeShapeEnterpriseSmall, - "enterprise_medium": BlockchainPlatformComputeShapeEnterpriseMedium, - "enterprise_large": BlockchainPlatformComputeShapeEnterpriseLarge, - "enterprise_extra_large": BlockchainPlatformComputeShapeEnterpriseExtraLarge, - "enterprise_custom": BlockchainPlatformComputeShapeEnterpriseCustom, + "standard": BlockchainPlatformComputeShapeStandard, + "enterprise_small": BlockchainPlatformComputeShapeEnterpriseSmall, + "enterprise_medium": BlockchainPlatformComputeShapeEnterpriseMedium, + "enterprise_large": BlockchainPlatformComputeShapeEnterpriseLarge, + "enterprise_extra_large": BlockchainPlatformComputeShapeEnterpriseExtraLarge, + "enterprise_custom": BlockchainPlatformComputeShapeEnterpriseCustom, + "digital_assets_medium": BlockchainPlatformComputeShapeDigitalAssetsMedium, + "digital_assets_large": BlockchainPlatformComputeShapeDigitalAssetsLarge, + "digital_assets_extra_large": BlockchainPlatformComputeShapeDigitalAssetsExtraLarge, } // GetBlockchainPlatformComputeShapeEnumValues Enumerates the set of values for BlockchainPlatformComputeShapeEnum @@ -216,6 +225,9 @@ func GetBlockchainPlatformComputeShapeEnumStringValues() []string { "ENTERPRISE_LARGE", "ENTERPRISE_EXTRA_LARGE", "ENTERPRISE_CUSTOM", + "DIGITAL_ASSETS_MEDIUM", + "DIGITAL_ASSETS_LARGE", + "DIGITAL_ASSETS_EXTRA_LARGE", } } diff --git a/blockchain/work_request.go b/blockchain/work_request.go index a813cfbb68..61acba4148 100644 --- a/blockchain/work_request.go +++ b/blockchain/work_request.go @@ -78,39 +78,42 @@ type WorkRequestOperationTypeEnum string // Set of constants representing the allowable values for WorkRequestOperationTypeEnum const ( - WorkRequestOperationTypeCreatePlatform WorkRequestOperationTypeEnum = "CREATE_PLATFORM" - WorkRequestOperationTypeUpdatePlatform WorkRequestOperationTypeEnum = "UPDATE_PLATFORM" - WorkRequestOperationTypeUpgradePlatform WorkRequestOperationTypeEnum = "UPGRADE_PLATFORM" - WorkRequestOperationTypeDeletePlatform WorkRequestOperationTypeEnum = "DELETE_PLATFORM" - WorkRequestOperationTypeScalePlatform WorkRequestOperationTypeEnum = "SCALE_PLATFORM" - WorkRequestOperationTypeStartPlatform WorkRequestOperationTypeEnum = "START_PLATFORM" - WorkRequestOperationTypeStopPlatform WorkRequestOperationTypeEnum = "STOP_PLATFORM" - WorkRequestOperationTypeCustomizePlatform WorkRequestOperationTypeEnum = "CUSTOMIZE_PLATFORM" - WorkRequestOperationTypeScaleStorage WorkRequestOperationTypeEnum = "SCALE_STORAGE" + WorkRequestOperationTypeCreatePlatform WorkRequestOperationTypeEnum = "CREATE_PLATFORM" + WorkRequestOperationTypeUpdatePlatform WorkRequestOperationTypeEnum = "UPDATE_PLATFORM" + WorkRequestOperationTypeUpgradePlatform WorkRequestOperationTypeEnum = "UPGRADE_PLATFORM" + WorkRequestOperationTypeDeletePlatform WorkRequestOperationTypeEnum = "DELETE_PLATFORM" + WorkRequestOperationTypeScalePlatform WorkRequestOperationTypeEnum = "SCALE_PLATFORM" + WorkRequestOperationTypeStartPlatform WorkRequestOperationTypeEnum = "START_PLATFORM" + WorkRequestOperationTypeStopPlatform WorkRequestOperationTypeEnum = "STOP_PLATFORM" + WorkRequestOperationTypeCustomizePlatform WorkRequestOperationTypeEnum = "CUSTOMIZE_PLATFORM" + WorkRequestOperationTypeScaleStorage WorkRequestOperationTypeEnum = "SCALE_STORAGE" + WorkRequestOperationTypeWorkrequestCleanup WorkRequestOperationTypeEnum = "WORKREQUEST_CLEANUP" ) var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ - "CREATE_PLATFORM": WorkRequestOperationTypeCreatePlatform, - "UPDATE_PLATFORM": WorkRequestOperationTypeUpdatePlatform, - "UPGRADE_PLATFORM": WorkRequestOperationTypeUpgradePlatform, - "DELETE_PLATFORM": WorkRequestOperationTypeDeletePlatform, - "SCALE_PLATFORM": WorkRequestOperationTypeScalePlatform, - "START_PLATFORM": WorkRequestOperationTypeStartPlatform, - "STOP_PLATFORM": WorkRequestOperationTypeStopPlatform, - "CUSTOMIZE_PLATFORM": WorkRequestOperationTypeCustomizePlatform, - "SCALE_STORAGE": WorkRequestOperationTypeScaleStorage, + "CREATE_PLATFORM": WorkRequestOperationTypeCreatePlatform, + "UPDATE_PLATFORM": WorkRequestOperationTypeUpdatePlatform, + "UPGRADE_PLATFORM": WorkRequestOperationTypeUpgradePlatform, + "DELETE_PLATFORM": WorkRequestOperationTypeDeletePlatform, + "SCALE_PLATFORM": WorkRequestOperationTypeScalePlatform, + "START_PLATFORM": WorkRequestOperationTypeStartPlatform, + "STOP_PLATFORM": WorkRequestOperationTypeStopPlatform, + "CUSTOMIZE_PLATFORM": WorkRequestOperationTypeCustomizePlatform, + "SCALE_STORAGE": WorkRequestOperationTypeScaleStorage, + "WORKREQUEST_CLEANUP": WorkRequestOperationTypeWorkrequestCleanup, } var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ - "create_platform": WorkRequestOperationTypeCreatePlatform, - "update_platform": WorkRequestOperationTypeUpdatePlatform, - "upgrade_platform": WorkRequestOperationTypeUpgradePlatform, - "delete_platform": WorkRequestOperationTypeDeletePlatform, - "scale_platform": WorkRequestOperationTypeScalePlatform, - "start_platform": WorkRequestOperationTypeStartPlatform, - "stop_platform": WorkRequestOperationTypeStopPlatform, - "customize_platform": WorkRequestOperationTypeCustomizePlatform, - "scale_storage": WorkRequestOperationTypeScaleStorage, + "create_platform": WorkRequestOperationTypeCreatePlatform, + "update_platform": WorkRequestOperationTypeUpdatePlatform, + "upgrade_platform": WorkRequestOperationTypeUpgradePlatform, + "delete_platform": WorkRequestOperationTypeDeletePlatform, + "scale_platform": WorkRequestOperationTypeScalePlatform, + "start_platform": WorkRequestOperationTypeStartPlatform, + "stop_platform": WorkRequestOperationTypeStopPlatform, + "customize_platform": WorkRequestOperationTypeCustomizePlatform, + "scale_storage": WorkRequestOperationTypeScaleStorage, + "workrequest_cleanup": WorkRequestOperationTypeWorkrequestCleanup, } // GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum @@ -134,6 +137,7 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "STOP_PLATFORM", "CUSTOMIZE_PLATFORM", "SCALE_STORAGE", + "WORKREQUEST_CLEANUP", } } diff --git a/blockchain/work_request_summary.go b/blockchain/work_request_summary.go index 55c96fab23..11c726136f 100644 --- a/blockchain/work_request_summary.go +++ b/blockchain/work_request_summary.go @@ -78,39 +78,42 @@ type WorkRequestSummaryOperationTypeEnum string // Set of constants representing the allowable values for WorkRequestSummaryOperationTypeEnum const ( - WorkRequestSummaryOperationTypeCreatePlatform WorkRequestSummaryOperationTypeEnum = "CREATE_PLATFORM" - WorkRequestSummaryOperationTypeUpdatePlatform WorkRequestSummaryOperationTypeEnum = "UPDATE_PLATFORM" - WorkRequestSummaryOperationTypeUpgradePlatform WorkRequestSummaryOperationTypeEnum = "UPGRADE_PLATFORM" - WorkRequestSummaryOperationTypeDeletePlatform WorkRequestSummaryOperationTypeEnum = "DELETE_PLATFORM" - WorkRequestSummaryOperationTypeScalePlatform WorkRequestSummaryOperationTypeEnum = "SCALE_PLATFORM" - WorkRequestSummaryOperationTypeStartPlatform WorkRequestSummaryOperationTypeEnum = "START_PLATFORM" - WorkRequestSummaryOperationTypeStopPlatform WorkRequestSummaryOperationTypeEnum = "STOP_PLATFORM" - WorkRequestSummaryOperationTypeCustomizePlatform WorkRequestSummaryOperationTypeEnum = "CUSTOMIZE_PLATFORM" - WorkRequestSummaryOperationTypeScaleStorage WorkRequestSummaryOperationTypeEnum = "SCALE_STORAGE" + WorkRequestSummaryOperationTypeCreatePlatform WorkRequestSummaryOperationTypeEnum = "CREATE_PLATFORM" + WorkRequestSummaryOperationTypeUpdatePlatform WorkRequestSummaryOperationTypeEnum = "UPDATE_PLATFORM" + WorkRequestSummaryOperationTypeUpgradePlatform WorkRequestSummaryOperationTypeEnum = "UPGRADE_PLATFORM" + WorkRequestSummaryOperationTypeDeletePlatform WorkRequestSummaryOperationTypeEnum = "DELETE_PLATFORM" + WorkRequestSummaryOperationTypeScalePlatform WorkRequestSummaryOperationTypeEnum = "SCALE_PLATFORM" + WorkRequestSummaryOperationTypeStartPlatform WorkRequestSummaryOperationTypeEnum = "START_PLATFORM" + WorkRequestSummaryOperationTypeStopPlatform WorkRequestSummaryOperationTypeEnum = "STOP_PLATFORM" + WorkRequestSummaryOperationTypeCustomizePlatform WorkRequestSummaryOperationTypeEnum = "CUSTOMIZE_PLATFORM" + WorkRequestSummaryOperationTypeScaleStorage WorkRequestSummaryOperationTypeEnum = "SCALE_STORAGE" + WorkRequestSummaryOperationTypeWorkrequestCleanup WorkRequestSummaryOperationTypeEnum = "WORKREQUEST_CLEANUP" ) var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOperationTypeEnum{ - "CREATE_PLATFORM": WorkRequestSummaryOperationTypeCreatePlatform, - "UPDATE_PLATFORM": WorkRequestSummaryOperationTypeUpdatePlatform, - "UPGRADE_PLATFORM": WorkRequestSummaryOperationTypeUpgradePlatform, - "DELETE_PLATFORM": WorkRequestSummaryOperationTypeDeletePlatform, - "SCALE_PLATFORM": WorkRequestSummaryOperationTypeScalePlatform, - "START_PLATFORM": WorkRequestSummaryOperationTypeStartPlatform, - "STOP_PLATFORM": WorkRequestSummaryOperationTypeStopPlatform, - "CUSTOMIZE_PLATFORM": WorkRequestSummaryOperationTypeCustomizePlatform, - "SCALE_STORAGE": WorkRequestSummaryOperationTypeScaleStorage, + "CREATE_PLATFORM": WorkRequestSummaryOperationTypeCreatePlatform, + "UPDATE_PLATFORM": WorkRequestSummaryOperationTypeUpdatePlatform, + "UPGRADE_PLATFORM": WorkRequestSummaryOperationTypeUpgradePlatform, + "DELETE_PLATFORM": WorkRequestSummaryOperationTypeDeletePlatform, + "SCALE_PLATFORM": WorkRequestSummaryOperationTypeScalePlatform, + "START_PLATFORM": WorkRequestSummaryOperationTypeStartPlatform, + "STOP_PLATFORM": WorkRequestSummaryOperationTypeStopPlatform, + "CUSTOMIZE_PLATFORM": WorkRequestSummaryOperationTypeCustomizePlatform, + "SCALE_STORAGE": WorkRequestSummaryOperationTypeScaleStorage, + "WORKREQUEST_CLEANUP": WorkRequestSummaryOperationTypeWorkrequestCleanup, } var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequestSummaryOperationTypeEnum{ - "create_platform": WorkRequestSummaryOperationTypeCreatePlatform, - "update_platform": WorkRequestSummaryOperationTypeUpdatePlatform, - "upgrade_platform": WorkRequestSummaryOperationTypeUpgradePlatform, - "delete_platform": WorkRequestSummaryOperationTypeDeletePlatform, - "scale_platform": WorkRequestSummaryOperationTypeScalePlatform, - "start_platform": WorkRequestSummaryOperationTypeStartPlatform, - "stop_platform": WorkRequestSummaryOperationTypeStopPlatform, - "customize_platform": WorkRequestSummaryOperationTypeCustomizePlatform, - "scale_storage": WorkRequestSummaryOperationTypeScaleStorage, + "create_platform": WorkRequestSummaryOperationTypeCreatePlatform, + "update_platform": WorkRequestSummaryOperationTypeUpdatePlatform, + "upgrade_platform": WorkRequestSummaryOperationTypeUpgradePlatform, + "delete_platform": WorkRequestSummaryOperationTypeDeletePlatform, + "scale_platform": WorkRequestSummaryOperationTypeScalePlatform, + "start_platform": WorkRequestSummaryOperationTypeStartPlatform, + "stop_platform": WorkRequestSummaryOperationTypeStopPlatform, + "customize_platform": WorkRequestSummaryOperationTypeCustomizePlatform, + "scale_storage": WorkRequestSummaryOperationTypeScaleStorage, + "workrequest_cleanup": WorkRequestSummaryOperationTypeWorkrequestCleanup, } // GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestSummaryOperationTypeEnum @@ -134,6 +137,7 @@ func GetWorkRequestSummaryOperationTypeEnumStringValues() []string { "STOP_PLATFORM", "CUSTOMIZE_PLATFORM", "SCALE_STORAGE", + "WORKREQUEST_CLEANUP", } } diff --git a/cloudbridge/analyze_assets_request_response.go b/cloudbridge/analyze_assets_request_response.go index 7817bfa5df..35778bbfec 100644 --- a/cloudbridge/analyze_assets_request_response.go +++ b/cloudbridge/analyze_assets_request_response.go @@ -140,16 +140,22 @@ type AnalyzeAssetsAssetTypeEnum string const ( AnalyzeAssetsAssetTypeVmwareVm AnalyzeAssetsAssetTypeEnum = "VMWARE_VM" AnalyzeAssetsAssetTypeVm AnalyzeAssetsAssetTypeEnum = "VM" + AnalyzeAssetsAssetTypeAwsEc2 AnalyzeAssetsAssetTypeEnum = "AWS_EC2" + AnalyzeAssetsAssetTypeAwsEbs AnalyzeAssetsAssetTypeEnum = "AWS_EBS" ) var mappingAnalyzeAssetsAssetTypeEnum = map[string]AnalyzeAssetsAssetTypeEnum{ "VMWARE_VM": AnalyzeAssetsAssetTypeVmwareVm, "VM": AnalyzeAssetsAssetTypeVm, + "AWS_EC2": AnalyzeAssetsAssetTypeAwsEc2, + "AWS_EBS": AnalyzeAssetsAssetTypeAwsEbs, } var mappingAnalyzeAssetsAssetTypeEnumLowerCase = map[string]AnalyzeAssetsAssetTypeEnum{ "vmware_vm": AnalyzeAssetsAssetTypeVmwareVm, "vm": AnalyzeAssetsAssetTypeVm, + "aws_ec2": AnalyzeAssetsAssetTypeAwsEc2, + "aws_ebs": AnalyzeAssetsAssetTypeAwsEbs, } // GetAnalyzeAssetsAssetTypeEnumValues Enumerates the set of values for AnalyzeAssetsAssetTypeEnum @@ -166,6 +172,8 @@ func GetAnalyzeAssetsAssetTypeEnumStringValues() []string { return []string{ "VMWARE_VM", "VM", + "AWS_EC2", + "AWS_EBS", } } diff --git a/cloudbridge/asset.go b/cloudbridge/asset.go index f586a2ae38..97bec4db67 100644 --- a/cloudbridge/asset.go +++ b/cloudbridge/asset.go @@ -121,10 +121,18 @@ func (m *asset) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { var err error switch m.AssetType { + case "AWS_EC2": + mm := AwsEc2Asset{} + err = json.Unmarshal(data, &mm) + return mm, err case "VMWARE_VM": mm := VmwareVmAsset{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS_EBS": + mm := AwsEbsAsset{} + err = json.Unmarshal(data, &mm) + return mm, err case "VM": mm := VmAsset{} err = json.Unmarshal(data, &mm) diff --git a/cloudbridge/asset_source.go b/cloudbridge/asset_source.go index 3b433e0a1d..1e97558ec2 100644 --- a/cloudbridge/asset_source.go +++ b/cloudbridge/asset_source.go @@ -131,6 +131,10 @@ func (m *assetsource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) mm := VmWareAssetSource{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS": + mm := AwsAssetSource{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for AssetSource: %s.", m.Type) return *m, nil diff --git a/cloudbridge/asset_source_credentials.go b/cloudbridge/asset_source_credentials.go index 009dbd51fb..1ca6ffbbc1 100644 --- a/cloudbridge/asset_source_credentials.go +++ b/cloudbridge/asset_source_credentials.go @@ -22,8 +22,11 @@ type AssetSourceCredentials struct { Type AssetSourceCredentialsTypeEnum `mandatory:"true" json:"type"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret in a vault. - // If the the type of the credentials is BASIC`, the secret must contain the username and - // password in JSON format, which is in the form of `{ "username": "", "password": "" }`. + // If the type of the credentials is `BASIC`, the secret must contain the username and + // password in JSON format, which is in the form of `{ "username": "", "password": "example-password" }`. + // If the type of the credentials is `API_KEY`, the secret must contain the accessKeyId and + // secretAccessKey in JSON format, + // which is in the form of `{ "accessKeyId": "", "secretAccessKey": "" }`. SecretId *string `mandatory:"true" json:"secretId"` } diff --git a/cloudbridge/asset_source_credentials_type.go b/cloudbridge/asset_source_credentials_type.go index 85d30d9684..352919f1f2 100644 --- a/cloudbridge/asset_source_credentials_type.go +++ b/cloudbridge/asset_source_credentials_type.go @@ -18,15 +18,18 @@ type AssetSourceCredentialsTypeEnum string // Set of constants representing the allowable values for AssetSourceCredentialsTypeEnum const ( - AssetSourceCredentialsTypeBasic AssetSourceCredentialsTypeEnum = "BASIC" + AssetSourceCredentialsTypeBasic AssetSourceCredentialsTypeEnum = "BASIC" + AssetSourceCredentialsTypeApiKey AssetSourceCredentialsTypeEnum = "API_KEY" ) var mappingAssetSourceCredentialsTypeEnum = map[string]AssetSourceCredentialsTypeEnum{ - "BASIC": AssetSourceCredentialsTypeBasic, + "BASIC": AssetSourceCredentialsTypeBasic, + "API_KEY": AssetSourceCredentialsTypeApiKey, } var mappingAssetSourceCredentialsTypeEnumLowerCase = map[string]AssetSourceCredentialsTypeEnum{ - "basic": AssetSourceCredentialsTypeBasic, + "basic": AssetSourceCredentialsTypeBasic, + "api_key": AssetSourceCredentialsTypeApiKey, } // GetAssetSourceCredentialsTypeEnumValues Enumerates the set of values for AssetSourceCredentialsTypeEnum @@ -42,6 +45,7 @@ func GetAssetSourceCredentialsTypeEnumValues() []AssetSourceCredentialsTypeEnum func GetAssetSourceCredentialsTypeEnumStringValues() []string { return []string{ "BASIC", + "API_KEY", } } diff --git a/cloudbridge/asset_source_summary.go b/cloudbridge/asset_source_summary.go index 061ccd53d7..2785484ca1 100644 --- a/cloudbridge/asset_source_summary.go +++ b/cloudbridge/asset_source_summary.go @@ -126,6 +126,10 @@ func (m *assetsourcesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := VmWareAssetSourceSummary{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS": + mm := AwsAssetSourceSummary{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for AssetSourceSummary: %s.", m.Type) return *m, nil diff --git a/cloudbridge/asset_source_type.go b/cloudbridge/asset_source_type.go index 67e1833ec7..164b901ae9 100644 --- a/cloudbridge/asset_source_type.go +++ b/cloudbridge/asset_source_type.go @@ -19,14 +19,17 @@ type AssetSourceTypeEnum string // Set of constants representing the allowable values for AssetSourceTypeEnum const ( AssetSourceTypeVmware AssetSourceTypeEnum = "VMWARE" + AssetSourceTypeAws AssetSourceTypeEnum = "AWS" ) var mappingAssetSourceTypeEnum = map[string]AssetSourceTypeEnum{ "VMWARE": AssetSourceTypeVmware, + "AWS": AssetSourceTypeAws, } var mappingAssetSourceTypeEnumLowerCase = map[string]AssetSourceTypeEnum{ "vmware": AssetSourceTypeVmware, + "aws": AssetSourceTypeAws, } // GetAssetSourceTypeEnumValues Enumerates the set of values for AssetSourceTypeEnum @@ -42,6 +45,7 @@ func GetAssetSourceTypeEnumValues() []AssetSourceTypeEnum { func GetAssetSourceTypeEnumStringValues() []string { return []string{ "VMWARE", + "AWS", } } diff --git a/cloudbridge/asset_type.go b/cloudbridge/asset_type.go index 2732e3ea52..ada1b3608b 100644 --- a/cloudbridge/asset_type.go +++ b/cloudbridge/asset_type.go @@ -20,16 +20,22 @@ type AssetTypeEnum string const ( AssetTypeVmwareVm AssetTypeEnum = "VMWARE_VM" AssetTypeVm AssetTypeEnum = "VM" + AssetTypeAwsEc2 AssetTypeEnum = "AWS_EC2" + AssetTypeAwsEbs AssetTypeEnum = "AWS_EBS" ) var mappingAssetTypeEnum = map[string]AssetTypeEnum{ "VMWARE_VM": AssetTypeVmwareVm, "VM": AssetTypeVm, + "AWS_EC2": AssetTypeAwsEc2, + "AWS_EBS": AssetTypeAwsEbs, } var mappingAssetTypeEnumLowerCase = map[string]AssetTypeEnum{ "vmware_vm": AssetTypeVmwareVm, "vm": AssetTypeVm, + "aws_ec2": AssetTypeAwsEc2, + "aws_ebs": AssetTypeAwsEbs, } // GetAssetTypeEnumValues Enumerates the set of values for AssetTypeEnum @@ -46,6 +52,8 @@ func GetAssetTypeEnumStringValues() []string { return []string{ "VMWARE_VM", "VM", + "AWS_EC2", + "AWS_EBS", } } diff --git a/cloudbridge/aws_asset_source.go b/cloudbridge/aws_asset_source.go new file mode 100644 index 0000000000..98d91488ce --- /dev/null +++ b/cloudbridge/aws_asset_source.go @@ -0,0 +1,192 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsAssetSource AWS asset source. Used for discovery of EC2 instances and EBS volumes registered for the AWS account. +type AwsAssetSource struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + // The detailed state of the asset source. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The time when the asset source was created in the RFC3339 format. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The point in time that the asset source was last updated in the RFC3339 format. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"true" json:"discoveryCredentials"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of an attached discovery schedule. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` + + // The current state of the asset source. + LifecycleState AssetSourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m AwsAssetSource) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsAssetSource) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m AwsAssetSource) GetDisplayName() *string { + return m.DisplayName +} + +// GetEnvironmentId returns EnvironmentId +func (m AwsAssetSource) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m AwsAssetSource) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m AwsAssetSource) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m AwsAssetSource) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetLifecycleState returns LifecycleState +func (m AwsAssetSource) GetLifecycleState() AssetSourceLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m AwsAssetSource) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeCreated returns TimeCreated +func (m AwsAssetSource) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsAssetSource) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m AwsAssetSource) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsAssetSource) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsAssetSource) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsAssetSource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsAssetSource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetSourceLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetSourceLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsAssetSource) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsAssetSource AwsAssetSource + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAwsAssetSource + }{ + "AWS", + (MarshalTypeAwsAssetSource)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/aws_asset_source_summary.go b/cloudbridge/aws_asset_source_summary.go new file mode 100644 index 0000000000..21c58c1f12 --- /dev/null +++ b/cloudbridge/aws_asset_source_summary.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsAssetSourceSummary Summary of an AWS asset source provided in the list. +type AwsAssetSourceSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The detailed state of the asset source. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // The time when the asset source was created in RFC3339 format. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The point in time that the asset source was last updated in RFC3339 format. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The current state of the asset source. + LifecycleState AssetSourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m AwsAssetSourceSummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsAssetSourceSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m AwsAssetSourceSummary) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetDisplayName returns DisplayName +func (m AwsAssetSourceSummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetLifecycleState returns LifecycleState +func (m AwsAssetSourceSummary) GetLifecycleState() AssetSourceLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m AwsAssetSourceSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetInventoryId returns InventoryId +func (m AwsAssetSourceSummary) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m AwsAssetSourceSummary) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetTimeCreated returns TimeCreated +func (m AwsAssetSourceSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsAssetSourceSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m AwsAssetSourceSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsAssetSourceSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsAssetSourceSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsAssetSourceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsAssetSourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetSourceLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetSourceLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsAssetSourceSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsAssetSourceSummary AwsAssetSourceSummary + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAwsAssetSourceSummary + }{ + "AWS", + (MarshalTypeAwsAssetSourceSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/aws_ebs_asset.go b/cloudbridge/aws_ebs_asset.go new file mode 100644 index 0000000000..4efe59b9ff --- /dev/null +++ b/cloudbridge/aws_ebs_asset.go @@ -0,0 +1,166 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsAsset AWS EBS type of asset. +type AwsEbsAsset struct { + + // Inventory ID to which an asset belongs to. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // Asset OCID that is immutable on creation. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment to which an asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key that the asset belongs to. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + // The time when the asset was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time when the asset was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The current state of the asset. + LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetDisplayName returns DisplayName +func (m AwsEbsAsset) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m AwsEbsAsset) GetInventoryId() *string { + return m.InventoryId +} + +// GetId returns Id +func (m AwsEbsAsset) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsEbsAsset) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m AwsEbsAsset) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m AwsEbsAsset) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetTimeCreated returns TimeCreated +func (m AwsEbsAsset) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsEbsAsset) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetAssetSourceIds returns AssetSourceIds +func (m AwsEbsAsset) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetLifecycleState returns LifecycleState +func (m AwsEbsAsset) GetLifecycleState() AssetLifecycleStateEnum { + return m.LifecycleState +} + +// GetFreeformTags returns FreeformTags +func (m AwsEbsAsset) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsEbsAsset) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsEbsAsset) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsEbsAsset) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEbsAsset) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsEbsAsset) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsEbsAsset AwsEbsAsset + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeAwsEbsAsset + }{ + "AWS_EBS", + (MarshalTypeAwsEbsAsset)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/aws_ebs_asset_details.go b/cloudbridge/aws_ebs_asset_details.go new file mode 100644 index 0000000000..ecc3c6802b --- /dev/null +++ b/cloudbridge/aws_ebs_asset_details.go @@ -0,0 +1,37 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsAssetDetails AWS EBS type of asset. +type AwsEbsAssetDetails struct { + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` +} + +func (m AwsEbsAssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEbsAssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/aws_ebs_properties.go b/cloudbridge/aws_ebs_properties.go new file mode 100644 index 0000000000..27dbc70094 --- /dev/null +++ b/cloudbridge/aws_ebs_properties.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsProperties AWS EBS volume related properties. +type AwsEbsProperties struct { + + // Indicates whether the volume is encrypted. + IsEncrypted *bool `mandatory:"true" json:"isEncrypted"` + + // Indicates whether Amazon EBS Multi-Attach is enabled. + IsMultiAttachEnabled *bool `mandatory:"true" json:"isMultiAttachEnabled"` + + // The size of the volume, in GiBs. + SizeInGiBs *int `mandatory:"true" json:"sizeInGiBs"` + + // The ID of the volume. + VolumeKey *string `mandatory:"true" json:"volumeKey"` + + // The volume type. + VolumeType *string `mandatory:"true" json:"volumeType"` + + // Information about the volume attachments. + Attachments []VolumeAttachment `mandatory:"false" json:"attachments"` + + // The Availability Zone for the volume. + AvailabilityZone *string `mandatory:"false" json:"availabilityZone"` + + // The number of I/O operations per second. + Iops *int `mandatory:"false" json:"iops"` + + // The volume state. + Status *string `mandatory:"false" json:"status"` + + // Any tags assigned to the volume. + Tags []Tag `mandatory:"false" json:"tags"` + + // The throughput that the volume supports, in MiB/s. + Throughput *int `mandatory:"false" json:"throughput"` +} + +func (m AwsEbsProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEbsProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/aws_ec2_asset.go b/cloudbridge/aws_ec2_asset.go new file mode 100644 index 0000000000..086caff6b9 --- /dev/null +++ b/cloudbridge/aws_ec2_asset.go @@ -0,0 +1,174 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2Asset AWS EC2 type of asset. +type AwsEc2Asset struct { + + // Inventory ID to which an asset belongs to. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // Asset OCID that is immutable on creation. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment to which an asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key that the asset belongs to. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + // The time when the asset was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time when the asset was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` + + // The current state of the asset. + LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetDisplayName returns DisplayName +func (m AwsEc2Asset) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m AwsEc2Asset) GetInventoryId() *string { + return m.InventoryId +} + +// GetId returns Id +func (m AwsEc2Asset) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsEc2Asset) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m AwsEc2Asset) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m AwsEc2Asset) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetTimeCreated returns TimeCreated +func (m AwsEc2Asset) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsEc2Asset) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetAssetSourceIds returns AssetSourceIds +func (m AwsEc2Asset) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetLifecycleState returns LifecycleState +func (m AwsEc2Asset) GetLifecycleState() AssetLifecycleStateEnum { + return m.LifecycleState +} + +// GetFreeformTags returns FreeformTags +func (m AwsEc2Asset) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsEc2Asset) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsEc2Asset) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsEc2Asset) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEc2Asset) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsEc2Asset) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsEc2Asset AwsEc2Asset + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeAwsEc2Asset + }{ + "AWS_EC2", + (MarshalTypeAwsEc2Asset)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/aws_ec2_asset_details.go b/cloudbridge/aws_ec2_asset_details.go new file mode 100644 index 0000000000..4e5a1e9a88 --- /dev/null +++ b/cloudbridge/aws_ec2_asset_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2AssetDetails AWS EC2 type of asset. +type AwsEc2AssetDetails struct { + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +func (m AwsEc2AssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEc2AssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/aws_ec2_properties.go b/cloudbridge/aws_ec2_properties.go new file mode 100644 index 0000000000..58bd09aec0 --- /dev/null +++ b/cloudbridge/aws_ec2_properties.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2Properties AWS virtual machine related properties. +type AwsEc2Properties struct { + + // The architecture of the image. + Architecture *string `mandatory:"true" json:"architecture"` + + // The ID of the instance. + InstanceKey *string `mandatory:"true" json:"instanceKey"` + + // The instance type. + InstanceType *string `mandatory:"true" json:"instanceType"` + + // The device name of the root device volume. + RootDeviceName *string `mandatory:"true" json:"rootDeviceName"` + + State *InstanceState `mandatory:"true" json:"state"` + + // The boot mode of the instance. + BootMode *string `mandatory:"false" json:"bootMode"` + + // The ID of the Capacity Reservation. + CapacityReservationKey *string `mandatory:"false" json:"capacityReservationKey"` + + // Indicates if the elastic inference accelerators attached to an instance + AreElasticInferenceAcceleratorsPresent *bool `mandatory:"false" json:"areElasticInferenceAcceleratorsPresent"` + + // Indicates whether the instance is enabled for AWS Nitro Enclaves. + IsEnclaveOptions *bool `mandatory:"false" json:"isEnclaveOptions"` + + // Indicates whether the instance is enabled for hibernation. + IsHibernationOptions *bool `mandatory:"false" json:"isHibernationOptions"` + + // The ID of the AMI used to launch the instance. + ImageKey *string `mandatory:"false" json:"imageKey"` + + // Indicates whether this is a Spot Instance or a Scheduled Instance. + InstanceLifecycle *string `mandatory:"false" json:"instanceLifecycle"` + + // The public IPv4 address, or the Carrier IP address assigned to the instance. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The IPv6 address assigned to the instance. + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` + + // The kernel associated with this instance, if applicable. + KernelKey *string `mandatory:"false" json:"kernelKey"` + + // The time the instance was launched. + TimeLaunch *common.SDKTime `mandatory:"false" json:"timeLaunch"` + + // The license configurations for the instance. + Licenses []string `mandatory:"false" json:"licenses"` + + // Provides information on the recovery and maintenance options of your instance. + MaintenanceOptions *string `mandatory:"false" json:"maintenanceOptions"` + + // The monitoring for the instance. + Monitoring *string `mandatory:"false" json:"monitoring"` + + // The network interfaces for the instance. + NetworkInterfaces []InstanceNetworkInterface `mandatory:"false" json:"networkInterfaces"` + + Placement *Placement `mandatory:"false" json:"placement"` + + // (IPv4 only) The private DNS hostname name assigned to the instance. + PrivateDnsName *string `mandatory:"false" json:"privateDnsName"` + + // The private IPv4 address assigned to the instance. + PrivateIpAddress *string `mandatory:"false" json:"privateIpAddress"` + + // The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. + RootDeviceType *string `mandatory:"false" json:"rootDeviceType"` + + // The security groups for the instance. + SecurityGroups []GroupIdentifier `mandatory:"false" json:"securityGroups"` + + // Indicates whether source/destination checking is enabled. + IsSourceDestCheck *bool `mandatory:"false" json:"isSourceDestCheck"` + + // If the request is a Spot Instance request, this value will be true. + IsSpotInstance *bool `mandatory:"false" json:"isSpotInstance"` + + // Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. + SriovNetSupport *string `mandatory:"false" json:"sriovNetSupport"` + + // EC2-VPC The ID of the subnet in which the instance is running. + SubnetKey *string `mandatory:"false" json:"subnetKey"` + + // Any tags assigned to the instance. + Tags []Tag `mandatory:"false" json:"tags"` + + // If the instance is configured for NitroTPM support, the value is v2.0. + TpmSupport *string `mandatory:"false" json:"tpmSupport"` + + // The virtualization type of the instance. + VirtualizationType *string `mandatory:"false" json:"virtualizationType"` + + // EC2-VPC The ID of the VPC in which the instance is running. + VpcKey *string `mandatory:"false" json:"vpcKey"` +} + +func (m AwsEc2Properties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEc2Properties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/cloudbridge_discovery_client.go b/cloudbridge/cloudbridge_discovery_client.go index cf752c780b..2b34f2c5bb 100644 --- a/cloudbridge/cloudbridge_discovery_client.go +++ b/cloudbridge/cloudbridge_discovery_client.go @@ -749,6 +749,64 @@ func (client DiscoveryClient) listDiscoverySchedules(ctx context.Context, reques return response, err } +// ListSupportedCloudRegions Returns a list of supported cloud regions related to AssetSourceTypeParam. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cloudbridge/ListSupportedCloudRegions.go.html to see an example of how to use ListSupportedCloudRegions API. +// A default retry strategy applies to this operation ListSupportedCloudRegions() +func (client DiscoveryClient) ListSupportedCloudRegions(ctx context.Context, request ListSupportedCloudRegionsRequest) (response ListSupportedCloudRegionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSupportedCloudRegions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSupportedCloudRegionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSupportedCloudRegionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSupportedCloudRegionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSupportedCloudRegionsResponse") + } + return +} + +// listSupportedCloudRegions implements the OCIOperation interface (enables retrying operations) +func (client DiscoveryClient) listSupportedCloudRegions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/supportedCloudRegions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSupportedCloudRegionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/OCB/20220509/SupportedCloudRegionSummary/ListSupportedCloudRegions" + err = common.PostProcessServiceError(err, "Discovery", "ListSupportedCloudRegions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RefreshAssetSource Initiates the process of asset metadata synchronization with the related asset source. // // # See also diff --git a/cloudbridge/create_asset_details.go b/cloudbridge/create_asset_details.go index 79a857de10..1c257d25d5 100644 --- a/cloudbridge/create_asset_details.go +++ b/cloudbridge/create_asset_details.go @@ -94,10 +94,18 @@ func (m *createassetdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, var err error switch m.AssetType { + case "AWS_EBS": + mm := CreateAwsEbsAssetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "VMWARE_VM": mm := CreateVmwareVmAssetDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS_EC2": + mm := CreateAwsEc2AssetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for CreateAssetDetails: %s.", m.AssetType) return *m, nil diff --git a/cloudbridge/create_asset_source_details.go b/cloudbridge/create_asset_source_details.go index a3b30c33c0..e8bbe146c2 100644 --- a/cloudbridge/create_asset_source_details.go +++ b/cloudbridge/create_asset_source_details.go @@ -107,6 +107,10 @@ func (m *createassetsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interf mm := CreateVmWareAssetSourceDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS": + mm := CreateAwsAssetSourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for CreateAssetSourceDetails: %s.", m.Type) return *m, nil diff --git a/cloudbridge/create_aws_asset_source_details.go b/cloudbridge/create_aws_asset_source_details.go new file mode 100644 index 0000000000..2a458729d5 --- /dev/null +++ b/cloudbridge/create_aws_asset_source_details.go @@ -0,0 +1,150 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsAssetSourceDetails AWS asset source creation request. +type CreateAwsAssetSourceDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"true" json:"discoveryCredentials"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. The name is generated by the service if it is not + // explicitly provided. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be attached to the created asset. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsAssetSourceDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsAssetSourceDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m CreateAwsAssetSourceDetails) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m CreateAwsAssetSourceDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m CreateAwsAssetSourceDetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m CreateAwsAssetSourceDetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsAssetSourceDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsAssetSourceDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m CreateAwsAssetSourceDetails) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m CreateAwsAssetSourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAwsAssetSourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAwsAssetSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsAssetSourceDetails CreateAwsAssetSourceDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeCreateAwsAssetSourceDetails + }{ + "AWS", + (MarshalTypeCreateAwsAssetSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/create_aws_ebs_asset_details.go b/cloudbridge/create_aws_ebs_asset_details.go new file mode 100644 index 0000000000..e770cc81d3 --- /dev/null +++ b/cloudbridge/create_aws_ebs_asset_details.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsEbsAssetDetails Create AWS EBS type of asset. +type CreateAwsEbsAssetDetails struct { + + // Inventory ID to which an asset belongs. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID of the compartment that the asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key to which the asset belongs. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsEbsAssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m CreateAwsEbsAssetDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsEbsAssetDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m CreateAwsEbsAssetDetails) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m CreateAwsEbsAssetDetails) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetAssetSourceIds returns AssetSourceIds +func (m CreateAwsEbsAssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsEbsAssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsEbsAssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateAwsEbsAssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAwsEbsAssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAwsEbsAssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsEbsAssetDetails CreateAwsEbsAssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeCreateAwsEbsAssetDetails + }{ + "AWS_EBS", + (MarshalTypeCreateAwsEbsAssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/create_aws_ec2_asset_details.go b/cloudbridge/create_aws_ec2_asset_details.go new file mode 100644 index 0000000000..5f037132ca --- /dev/null +++ b/cloudbridge/create_aws_ec2_asset_details.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsEc2AssetDetails Create AWS EC2 VM type of asset. +type CreateAwsEc2AssetDetails struct { + + // Inventory ID to which an asset belongs. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID of the compartment that the asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key to which the asset belongs. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsEc2AssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m CreateAwsEc2AssetDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsEc2AssetDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m CreateAwsEc2AssetDetails) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m CreateAwsEc2AssetDetails) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetAssetSourceIds returns AssetSourceIds +func (m CreateAwsEc2AssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsEc2AssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsEc2AssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateAwsEc2AssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAwsEc2AssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAwsEc2AssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsEc2AssetDetails CreateAwsEc2AssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeCreateAwsEc2AssetDetails + }{ + "AWS_EC2", + (MarshalTypeCreateAwsEc2AssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/create_vm_ware_asset_source_details.go b/cloudbridge/create_vm_ware_asset_source_details.go index 9c7fd04dbe..87c7165a8a 100644 --- a/cloudbridge/create_vm_ware_asset_source_details.go +++ b/cloudbridge/create_vm_ware_asset_source_details.go @@ -16,7 +16,7 @@ import ( "strings" ) -// CreateVmWareAssetSourceDetails Description of an asset source. +// CreateVmWareAssetSourceDetails VMware asset source creation request. type CreateVmWareAssetSourceDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. diff --git a/cloudbridge/create_vmware_vm_asset_details.go b/cloudbridge/create_vmware_vm_asset_details.go index d28657998a..d610822d5e 100644 --- a/cloudbridge/create_vmware_vm_asset_details.go +++ b/cloudbridge/create_vmware_vm_asset_details.go @@ -31,6 +31,14 @@ type CreateVmwareVmAssetDetails struct { // The key of the asset from the external environment. ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + VmwareVm *VmwareVmProperties `mandatory:"true" json:"vmwareVm"` + + VmwareVCenter *VmwareVCenterProperties `mandatory:"true" json:"vmwareVCenter"` + // Asset display name. DisplayName *string `mandatory:"false" json:"displayName"` @@ -46,14 +54,6 @@ type CreateVmwareVmAssetDetails struct { // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - - Compute *ComputeProperties `mandatory:"false" json:"compute"` - - Vm *VmProperties `mandatory:"false" json:"vm"` - - VmwareVm *VmwareVmProperties `mandatory:"false" json:"vmwareVm"` - - VmwareVCenter *VmwareVCenterProperties `mandatory:"false" json:"vmwareVCenter"` } // GetDisplayName returns DisplayName diff --git a/cloudbridge/disk.go b/cloudbridge/disk.go index 2dffdfaf26..a2b00191a9 100644 --- a/cloudbridge/disk.go +++ b/cloudbridge/disk.go @@ -38,6 +38,9 @@ type Disk struct { // The disk persistent mode. PersistentMode *string `mandatory:"false" json:"persistentMode"` + + // Indicates that CBT (change disk tracking) is enabled for this virtual disk. + IsCbtEnabled *bool `mandatory:"false" json:"isCbtEnabled"` } func (m Disk) String() string { diff --git a/cloudbridge/group_identifier.go b/cloudbridge/group_identifier.go new file mode 100644 index 0000000000..5f6cdc984d --- /dev/null +++ b/cloudbridge/group_identifier.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GroupIdentifier Describes a security group. +type GroupIdentifier struct { + + // The ID of the security group. + GroupKey *string `mandatory:"false" json:"groupKey"` + + // The name of the security group. + GroupName *string `mandatory:"false" json:"groupName"` +} + +func (m GroupIdentifier) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GroupIdentifier) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/import_inventory_via_assets_details.go b/cloudbridge/import_inventory_via_assets_details.go index f0b698a035..da3bcc3113 100644 --- a/cloudbridge/import_inventory_via_assets_details.go +++ b/cloudbridge/import_inventory_via_assets_details.go @@ -22,6 +22,9 @@ type ImportInventoryViaAssetsDetails struct { // The OCID of the compartmentId that resources import. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // The file body to be sent in the request. + Data []byte `mandatory:"true" json:"data"` + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` @@ -32,11 +35,8 @@ type ImportInventoryViaAssetsDetails struct { // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - // The file body to be sent in the request. - Data []byte `mandatory:"false" json:"data"` - // The type of asset. - AssetType AssetTypeEnum `mandatory:"false" json:"assetType,omitempty"` + AssetType AssetTypeEnum `mandatory:"true" json:"assetType"` } // GetCompartmentId returns CompartmentId diff --git a/cloudbridge/instance_network_interface.go b/cloudbridge/instance_network_interface.go new file mode 100644 index 0000000000..d081eae117 --- /dev/null +++ b/cloudbridge/instance_network_interface.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterface Describes a network interface. +type InstanceNetworkInterface struct { + Association *InstanceNetworkInterfaceAssociation `mandatory:"false" json:"association"` + + Attachment *InstanceNetworkInterfaceAttachment `mandatory:"false" json:"attachment"` + + // The description. + Description *string `mandatory:"false" json:"description"` + + // The security groups. + SecurityGroups []GroupIdentifier `mandatory:"false" json:"securityGroups"` + + // The type of network interface. + InterfaceType *string `mandatory:"false" json:"interfaceType"` + + // The IPv4 delegated prefixes that are assigned to the network interface. + Ipv4Prefixes []string `mandatory:"false" json:"ipv4Prefixes"` + + // The IPv6 addresses associated with the network interface. + Ipv6Addresses []string `mandatory:"false" json:"ipv6Addresses"` + + // The IPv6 delegated prefixes that are assigned to the network interface. + Ipv6Prefixes []string `mandatory:"false" json:"ipv6Prefixes"` + + // The MAC address. + MacAddress *string `mandatory:"false" json:"macAddress"` + + // The ID of the network interface. + NetworkInterfaceKey *string `mandatory:"false" json:"networkInterfaceKey"` + + // The ID of the AWS account that created the network interface. + OwnerKey *string `mandatory:"false" json:"ownerKey"` + + // The private IPv4 addresses associated with the network interface. + PrivateIpAddresses []InstancePrivateIpAddress `mandatory:"false" json:"privateIpAddresses"` + + // Indicates whether source/destination checking is enabled. + IsSourceDestCheck *bool `mandatory:"false" json:"isSourceDestCheck"` + + // The status of the network interface. + Status *string `mandatory:"false" json:"status"` + + // The ID of the subnet. + SubnetKey *string `mandatory:"false" json:"subnetKey"` +} + +func (m InstanceNetworkInterface) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceNetworkInterface) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/instance_network_interface_association.go b/cloudbridge/instance_network_interface_association.go new file mode 100644 index 0000000000..5914e83db8 --- /dev/null +++ b/cloudbridge/instance_network_interface_association.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterfaceAssociation Describes association information for an Elastic IP address (IPv4). +type InstanceNetworkInterfaceAssociation struct { + + // The carrier IP address associated with the network interface. + CarrierIp *string `mandatory:"false" json:"carrierIp"` + + // The customer-owned IP address associated with the network interface. + CustomerOwnedIp *string `mandatory:"false" json:"customerOwnedIp"` + + // The ID of the owner of the Elastic IP address. + IpOwnerKey *string `mandatory:"false" json:"ipOwnerKey"` + + // The public DNS name. + PublicDnsName *string `mandatory:"false" json:"publicDnsName"` + + // The public IP address or Elastic IP address bound to the network interface. + PublicIp *string `mandatory:"false" json:"publicIp"` +} + +func (m InstanceNetworkInterfaceAssociation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceNetworkInterfaceAssociation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/instance_network_interface_attachment.go b/cloudbridge/instance_network_interface_attachment.go new file mode 100644 index 0000000000..c96dd9e223 --- /dev/null +++ b/cloudbridge/instance_network_interface_attachment.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterfaceAttachment Describes a network interface attachment. +type InstanceNetworkInterfaceAttachment struct { + + // The ID of the network interface attachment. + AttachmentKey *string `mandatory:"false" json:"attachmentKey"` + + // The timestamp when the attachment initiated. + TimeAttach *common.SDKTime `mandatory:"false" json:"timeAttach"` + + // Indicates whether the network interface is deleted when the instance is terminated. + IsDeleteOnTermination *bool `mandatory:"false" json:"isDeleteOnTermination"` + + // The index of the device on the instance for the network interface attachment. + DeviceIndex *int `mandatory:"false" json:"deviceIndex"` + + // The index of the network card. + NetworkCardIndex *int `mandatory:"false" json:"networkCardIndex"` + + // The attachment state. + Status *string `mandatory:"false" json:"status"` +} + +func (m InstanceNetworkInterfaceAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceNetworkInterfaceAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/instance_private_ip_address.go b/cloudbridge/instance_private_ip_address.go new file mode 100644 index 0000000000..d7bca8576c --- /dev/null +++ b/cloudbridge/instance_private_ip_address.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePrivateIpAddress Describes a private IPv4 address. +type InstancePrivateIpAddress struct { + Association *InstanceNetworkInterfaceAssociation `mandatory:"false" json:"association"` + + // Indicates whether this IPv4 address is the primary private IP address of the network interface. + IsPrimary *bool `mandatory:"false" json:"isPrimary"` + + // The private IPv4 DNS name. + PrivateDnsName *string `mandatory:"false" json:"privateDnsName"` + + // The private IPv4 address of the network interface. + PrivateIpAddress *string `mandatory:"false" json:"privateIpAddress"` +} + +func (m InstancePrivateIpAddress) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePrivateIpAddress) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/instance_state.go b/cloudbridge/instance_state.go new file mode 100644 index 0000000000..3686f7f462 --- /dev/null +++ b/cloudbridge/instance_state.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceState Describes the current state of an instance. +type InstanceState struct { + + // The state of the instance as a 16-bit unsigned integer. + Code *int `mandatory:"false" json:"code"` + + // The current state of the instance. + Name *string `mandatory:"false" json:"name"` +} + +func (m InstanceState) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceState) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/list_assets_request_response.go b/cloudbridge/list_assets_request_response.go index 839fe84af9..044c7a7597 100644 --- a/cloudbridge/list_assets_request_response.go +++ b/cloudbridge/list_assets_request_response.go @@ -146,16 +146,22 @@ type ListAssetsAssetTypeEnum string const ( ListAssetsAssetTypeVmwareVm ListAssetsAssetTypeEnum = "VMWARE_VM" ListAssetsAssetTypeVm ListAssetsAssetTypeEnum = "VM" + ListAssetsAssetTypeAwsEc2 ListAssetsAssetTypeEnum = "AWS_EC2" + ListAssetsAssetTypeAwsEbs ListAssetsAssetTypeEnum = "AWS_EBS" ) var mappingListAssetsAssetTypeEnum = map[string]ListAssetsAssetTypeEnum{ "VMWARE_VM": ListAssetsAssetTypeVmwareVm, "VM": ListAssetsAssetTypeVm, + "AWS_EC2": ListAssetsAssetTypeAwsEc2, + "AWS_EBS": ListAssetsAssetTypeAwsEbs, } var mappingListAssetsAssetTypeEnumLowerCase = map[string]ListAssetsAssetTypeEnum{ "vmware_vm": ListAssetsAssetTypeVmwareVm, "vm": ListAssetsAssetTypeVm, + "aws_ec2": ListAssetsAssetTypeAwsEc2, + "aws_ebs": ListAssetsAssetTypeAwsEbs, } // GetListAssetsAssetTypeEnumValues Enumerates the set of values for ListAssetsAssetTypeEnum @@ -172,6 +178,8 @@ func GetListAssetsAssetTypeEnumStringValues() []string { return []string{ "VMWARE_VM", "VM", + "AWS_EC2", + "AWS_EBS", } } diff --git a/cloudbridge/list_supported_cloud_regions_request_response.go b/cloudbridge/list_supported_cloud_regions_request_response.go new file mode 100644 index 0000000000..7ba5887aaa --- /dev/null +++ b/cloudbridge/list_supported_cloud_regions_request_response.go @@ -0,0 +1,241 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSupportedCloudRegionsRequest wrapper for the ListSupportedCloudRegions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cloudbridge/ListSupportedCloudRegions.go.html to see an example of how to use ListSupportedCloudRegionsRequest. +type ListSupportedCloudRegionsRequest struct { + + // The asset source type. + AssetSourceType ListSupportedCloudRegionsAssetSourceTypeEnum `mandatory:"false" contributesTo:"query" name:"assetSourceType" omitEmpty:"true"` + + // A filter to return only supported cloud regions which name contains given nameContains as sub-string. + NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"` + + // The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + SortBy ListSupportedCloudRegionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListSupportedCloudRegionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSupportedCloudRegionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSupportedCloudRegionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSupportedCloudRegionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSupportedCloudRegionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSupportedCloudRegionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSupportedCloudRegionsAssetSourceTypeEnum(string(request.AssetSourceType)); !ok && request.AssetSourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssetSourceType: %s. Supported values are: %s.", request.AssetSourceType, strings.Join(GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListSupportedCloudRegionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListSupportedCloudRegionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListSupportedCloudRegionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListSupportedCloudRegionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSupportedCloudRegionsResponse wrapper for the ListSupportedCloudRegions operation +type ListSupportedCloudRegionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SupportedCloudRegionCollection instances + SupportedCloudRegionCollection `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 ListSupportedCloudRegionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSupportedCloudRegionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSupportedCloudRegionsAssetSourceTypeEnum Enum with underlying type: string +type ListSupportedCloudRegionsAssetSourceTypeEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsAssetSourceTypeEnum +const ( + ListSupportedCloudRegionsAssetSourceTypeVmware ListSupportedCloudRegionsAssetSourceTypeEnum = "VMWARE" + ListSupportedCloudRegionsAssetSourceTypeAws ListSupportedCloudRegionsAssetSourceTypeEnum = "AWS" +) + +var mappingListSupportedCloudRegionsAssetSourceTypeEnum = map[string]ListSupportedCloudRegionsAssetSourceTypeEnum{ + "VMWARE": ListSupportedCloudRegionsAssetSourceTypeVmware, + "AWS": ListSupportedCloudRegionsAssetSourceTypeAws, +} + +var mappingListSupportedCloudRegionsAssetSourceTypeEnumLowerCase = map[string]ListSupportedCloudRegionsAssetSourceTypeEnum{ + "vmware": ListSupportedCloudRegionsAssetSourceTypeVmware, + "aws": ListSupportedCloudRegionsAssetSourceTypeAws, +} + +// GetListSupportedCloudRegionsAssetSourceTypeEnumValues Enumerates the set of values for ListSupportedCloudRegionsAssetSourceTypeEnum +func GetListSupportedCloudRegionsAssetSourceTypeEnumValues() []ListSupportedCloudRegionsAssetSourceTypeEnum { + values := make([]ListSupportedCloudRegionsAssetSourceTypeEnum, 0) + for _, v := range mappingListSupportedCloudRegionsAssetSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsAssetSourceTypeEnum +func GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues() []string { + return []string{ + "VMWARE", + "AWS", + } +} + +// GetMappingListSupportedCloudRegionsAssetSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsAssetSourceTypeEnum(val string) (ListSupportedCloudRegionsAssetSourceTypeEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsAssetSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSupportedCloudRegionsSortByEnum Enum with underlying type: string +type ListSupportedCloudRegionsSortByEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsSortByEnum +const ( + ListSupportedCloudRegionsSortByName ListSupportedCloudRegionsSortByEnum = "name" +) + +var mappingListSupportedCloudRegionsSortByEnum = map[string]ListSupportedCloudRegionsSortByEnum{ + "name": ListSupportedCloudRegionsSortByName, +} + +var mappingListSupportedCloudRegionsSortByEnumLowerCase = map[string]ListSupportedCloudRegionsSortByEnum{ + "name": ListSupportedCloudRegionsSortByName, +} + +// GetListSupportedCloudRegionsSortByEnumValues Enumerates the set of values for ListSupportedCloudRegionsSortByEnum +func GetListSupportedCloudRegionsSortByEnumValues() []ListSupportedCloudRegionsSortByEnum { + values := make([]ListSupportedCloudRegionsSortByEnum, 0) + for _, v := range mappingListSupportedCloudRegionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsSortByEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsSortByEnum +func GetListSupportedCloudRegionsSortByEnumStringValues() []string { + return []string{ + "name", + } +} + +// GetMappingListSupportedCloudRegionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsSortByEnum(val string) (ListSupportedCloudRegionsSortByEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSupportedCloudRegionsSortOrderEnum Enum with underlying type: string +type ListSupportedCloudRegionsSortOrderEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsSortOrderEnum +const ( + ListSupportedCloudRegionsSortOrderAsc ListSupportedCloudRegionsSortOrderEnum = "ASC" + ListSupportedCloudRegionsSortOrderDesc ListSupportedCloudRegionsSortOrderEnum = "DESC" +) + +var mappingListSupportedCloudRegionsSortOrderEnum = map[string]ListSupportedCloudRegionsSortOrderEnum{ + "ASC": ListSupportedCloudRegionsSortOrderAsc, + "DESC": ListSupportedCloudRegionsSortOrderDesc, +} + +var mappingListSupportedCloudRegionsSortOrderEnumLowerCase = map[string]ListSupportedCloudRegionsSortOrderEnum{ + "asc": ListSupportedCloudRegionsSortOrderAsc, + "desc": ListSupportedCloudRegionsSortOrderDesc, +} + +// GetListSupportedCloudRegionsSortOrderEnumValues Enumerates the set of values for ListSupportedCloudRegionsSortOrderEnum +func GetListSupportedCloudRegionsSortOrderEnumValues() []ListSupportedCloudRegionsSortOrderEnum { + values := make([]ListSupportedCloudRegionsSortOrderEnum, 0) + for _, v := range mappingListSupportedCloudRegionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsSortOrderEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsSortOrderEnum +func GetListSupportedCloudRegionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSupportedCloudRegionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsSortOrderEnum(val string) (ListSupportedCloudRegionsSortOrderEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/cloudbridge/monthly_cost_summary.go b/cloudbridge/monthly_cost_summary.go new file mode 100644 index 0000000000..f8862adc49 --- /dev/null +++ b/cloudbridge/monthly_cost_summary.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MonthlyCostSummary Cost information for monthly maintenance. +type MonthlyCostSummary struct { + + // Monthly costs for maintenance of this asset. + Amount *float64 `mandatory:"true" json:"amount"` + + // Currency code + CurrencyCode *string `mandatory:"true" json:"currencyCode"` +} + +func (m MonthlyCostSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MonthlyCostSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/operation_type.go b/cloudbridge/operation_type.go index d56e2d0a7b..b1e749c482 100644 --- a/cloudbridge/operation_type.go +++ b/cloudbridge/operation_type.go @@ -18,69 +18,81 @@ type OperationTypeEnum string // Set of constants representing the allowable values for OperationTypeEnum const ( - OperationTypeCreateEnvironment OperationTypeEnum = "CREATE_ENVIRONMENT" - OperationTypeUpdateEnvironment OperationTypeEnum = "UPDATE_ENVIRONMENT" - OperationTypeDeleteEnvironment OperationTypeEnum = "DELETE_ENVIRONMENT" - OperationTypeMoveEnvironment OperationTypeEnum = "MOVE_ENVIRONMENT" - OperationTypeCreateOcbAgent OperationTypeEnum = "CREATE_OCB_AGENT" - OperationTypeUpdateOcbAgent OperationTypeEnum = "UPDATE_OCB_AGENT" - OperationTypeDeleteOcbAgent OperationTypeEnum = "DELETE_OCB_AGENT" - OperationTypeMoveOcbAgent OperationTypeEnum = "MOVE_OCB_AGENT" - OperationTypeCreateAgentDependency OperationTypeEnum = "CREATE_AGENT_DEPENDENCY" - OperationTypeUpdateAgentDependency OperationTypeEnum = "UPDATE_AGENT_DEPENDENCY" - OperationTypeDeleteAgentDependency OperationTypeEnum = "DELETE_AGENT_DEPENDENCY" - OperationTypeMoveAgentDependency OperationTypeEnum = "MOVE_AGENT_DEPENDENCY" - OperationTypeCreateInventory OperationTypeEnum = "CREATE_INVENTORY" - OperationTypeDeleteInventory OperationTypeEnum = "DELETE_INVENTORY" - OperationTypeImportInventory OperationTypeEnum = "IMPORT_INVENTORY" - OperationTypeDeleteAssetSource OperationTypeEnum = "DELETE_ASSET_SOURCE" - OperationTypeRefreshAssetSource OperationTypeEnum = "REFRESH_ASSET_SOURCE" - OperationTypeCreateAssetSource OperationTypeEnum = "CREATE_ASSET_SOURCE" - OperationTypeUpdateAssetSource OperationTypeEnum = "UPDATE_ASSET_SOURCE" + OperationTypeCreateEnvironment OperationTypeEnum = "CREATE_ENVIRONMENT" + OperationTypeUpdateEnvironment OperationTypeEnum = "UPDATE_ENVIRONMENT" + OperationTypeDeleteEnvironment OperationTypeEnum = "DELETE_ENVIRONMENT" + OperationTypeMoveEnvironment OperationTypeEnum = "MOVE_ENVIRONMENT" + OperationTypeCreateOcbAgent OperationTypeEnum = "CREATE_OCB_AGENT" + OperationTypeUpdateOcbAgent OperationTypeEnum = "UPDATE_OCB_AGENT" + OperationTypeDeleteOcbAgent OperationTypeEnum = "DELETE_OCB_AGENT" + OperationTypeMoveOcbAgent OperationTypeEnum = "MOVE_OCB_AGENT" + OperationTypeCreateAgentDependency OperationTypeEnum = "CREATE_AGENT_DEPENDENCY" + OperationTypeUpdateAgentDependency OperationTypeEnum = "UPDATE_AGENT_DEPENDENCY" + OperationTypeDeleteAgentDependency OperationTypeEnum = "DELETE_AGENT_DEPENDENCY" + OperationTypeMoveAgentDependency OperationTypeEnum = "MOVE_AGENT_DEPENDENCY" + OperationTypeCreateInventory OperationTypeEnum = "CREATE_INVENTORY" + OperationTypeDeleteInventory OperationTypeEnum = "DELETE_INVENTORY" + OperationTypeImportInventory OperationTypeEnum = "IMPORT_INVENTORY" + OperationTypeDeleteAssetSource OperationTypeEnum = "DELETE_ASSET_SOURCE" + OperationTypeRefreshAssetSource OperationTypeEnum = "REFRESH_ASSET_SOURCE" + OperationTypeCreateAssetSource OperationTypeEnum = "CREATE_ASSET_SOURCE" + OperationTypeUpdateAssetSource OperationTypeEnum = "UPDATE_ASSET_SOURCE" + OperationTypeUpdatePluginState OperationTypeEnum = "UPDATE_PLUGIN_STATE" + OperationTypeCloudAwsDiscovery OperationTypeEnum = "CLOUD_AWS_DISCOVERY" + OperationTypeCollectAwsRealtimeMetrics OperationTypeEnum = "COLLECT_AWS_REALTIME_METRICS" + OperationTypeCollectAwsHistoricalMetrics OperationTypeEnum = "COLLECT_AWS_HISTORICAL_METRICS" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ - "CREATE_ENVIRONMENT": OperationTypeCreateEnvironment, - "UPDATE_ENVIRONMENT": OperationTypeUpdateEnvironment, - "DELETE_ENVIRONMENT": OperationTypeDeleteEnvironment, - "MOVE_ENVIRONMENT": OperationTypeMoveEnvironment, - "CREATE_OCB_AGENT": OperationTypeCreateOcbAgent, - "UPDATE_OCB_AGENT": OperationTypeUpdateOcbAgent, - "DELETE_OCB_AGENT": OperationTypeDeleteOcbAgent, - "MOVE_OCB_AGENT": OperationTypeMoveOcbAgent, - "CREATE_AGENT_DEPENDENCY": OperationTypeCreateAgentDependency, - "UPDATE_AGENT_DEPENDENCY": OperationTypeUpdateAgentDependency, - "DELETE_AGENT_DEPENDENCY": OperationTypeDeleteAgentDependency, - "MOVE_AGENT_DEPENDENCY": OperationTypeMoveAgentDependency, - "CREATE_INVENTORY": OperationTypeCreateInventory, - "DELETE_INVENTORY": OperationTypeDeleteInventory, - "IMPORT_INVENTORY": OperationTypeImportInventory, - "DELETE_ASSET_SOURCE": OperationTypeDeleteAssetSource, - "REFRESH_ASSET_SOURCE": OperationTypeRefreshAssetSource, - "CREATE_ASSET_SOURCE": OperationTypeCreateAssetSource, - "UPDATE_ASSET_SOURCE": OperationTypeUpdateAssetSource, + "CREATE_ENVIRONMENT": OperationTypeCreateEnvironment, + "UPDATE_ENVIRONMENT": OperationTypeUpdateEnvironment, + "DELETE_ENVIRONMENT": OperationTypeDeleteEnvironment, + "MOVE_ENVIRONMENT": OperationTypeMoveEnvironment, + "CREATE_OCB_AGENT": OperationTypeCreateOcbAgent, + "UPDATE_OCB_AGENT": OperationTypeUpdateOcbAgent, + "DELETE_OCB_AGENT": OperationTypeDeleteOcbAgent, + "MOVE_OCB_AGENT": OperationTypeMoveOcbAgent, + "CREATE_AGENT_DEPENDENCY": OperationTypeCreateAgentDependency, + "UPDATE_AGENT_DEPENDENCY": OperationTypeUpdateAgentDependency, + "DELETE_AGENT_DEPENDENCY": OperationTypeDeleteAgentDependency, + "MOVE_AGENT_DEPENDENCY": OperationTypeMoveAgentDependency, + "CREATE_INVENTORY": OperationTypeCreateInventory, + "DELETE_INVENTORY": OperationTypeDeleteInventory, + "IMPORT_INVENTORY": OperationTypeImportInventory, + "DELETE_ASSET_SOURCE": OperationTypeDeleteAssetSource, + "REFRESH_ASSET_SOURCE": OperationTypeRefreshAssetSource, + "CREATE_ASSET_SOURCE": OperationTypeCreateAssetSource, + "UPDATE_ASSET_SOURCE": OperationTypeUpdateAssetSource, + "UPDATE_PLUGIN_STATE": OperationTypeUpdatePluginState, + "CLOUD_AWS_DISCOVERY": OperationTypeCloudAwsDiscovery, + "COLLECT_AWS_REALTIME_METRICS": OperationTypeCollectAwsRealtimeMetrics, + "COLLECT_AWS_HISTORICAL_METRICS": OperationTypeCollectAwsHistoricalMetrics, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ - "create_environment": OperationTypeCreateEnvironment, - "update_environment": OperationTypeUpdateEnvironment, - "delete_environment": OperationTypeDeleteEnvironment, - "move_environment": OperationTypeMoveEnvironment, - "create_ocb_agent": OperationTypeCreateOcbAgent, - "update_ocb_agent": OperationTypeUpdateOcbAgent, - "delete_ocb_agent": OperationTypeDeleteOcbAgent, - "move_ocb_agent": OperationTypeMoveOcbAgent, - "create_agent_dependency": OperationTypeCreateAgentDependency, - "update_agent_dependency": OperationTypeUpdateAgentDependency, - "delete_agent_dependency": OperationTypeDeleteAgentDependency, - "move_agent_dependency": OperationTypeMoveAgentDependency, - "create_inventory": OperationTypeCreateInventory, - "delete_inventory": OperationTypeDeleteInventory, - "import_inventory": OperationTypeImportInventory, - "delete_asset_source": OperationTypeDeleteAssetSource, - "refresh_asset_source": OperationTypeRefreshAssetSource, - "create_asset_source": OperationTypeCreateAssetSource, - "update_asset_source": OperationTypeUpdateAssetSource, + "create_environment": OperationTypeCreateEnvironment, + "update_environment": OperationTypeUpdateEnvironment, + "delete_environment": OperationTypeDeleteEnvironment, + "move_environment": OperationTypeMoveEnvironment, + "create_ocb_agent": OperationTypeCreateOcbAgent, + "update_ocb_agent": OperationTypeUpdateOcbAgent, + "delete_ocb_agent": OperationTypeDeleteOcbAgent, + "move_ocb_agent": OperationTypeMoveOcbAgent, + "create_agent_dependency": OperationTypeCreateAgentDependency, + "update_agent_dependency": OperationTypeUpdateAgentDependency, + "delete_agent_dependency": OperationTypeDeleteAgentDependency, + "move_agent_dependency": OperationTypeMoveAgentDependency, + "create_inventory": OperationTypeCreateInventory, + "delete_inventory": OperationTypeDeleteInventory, + "import_inventory": OperationTypeImportInventory, + "delete_asset_source": OperationTypeDeleteAssetSource, + "refresh_asset_source": OperationTypeRefreshAssetSource, + "create_asset_source": OperationTypeCreateAssetSource, + "update_asset_source": OperationTypeUpdateAssetSource, + "update_plugin_state": OperationTypeUpdatePluginState, + "cloud_aws_discovery": OperationTypeCloudAwsDiscovery, + "collect_aws_realtime_metrics": OperationTypeCollectAwsRealtimeMetrics, + "collect_aws_historical_metrics": OperationTypeCollectAwsHistoricalMetrics, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -114,6 +126,10 @@ func GetOperationTypeEnumStringValues() []string { "REFRESH_ASSET_SOURCE", "CREATE_ASSET_SOURCE", "UPDATE_ASSET_SOURCE", + "UPDATE_PLUGIN_STATE", + "CLOUD_AWS_DISCOVERY", + "COLLECT_AWS_REALTIME_METRICS", + "COLLECT_AWS_HISTORICAL_METRICS", } } diff --git a/cloudbridge/placement.go b/cloudbridge/placement.go new file mode 100644 index 0000000000..a0eeeef07b --- /dev/null +++ b/cloudbridge/placement.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Placement Describes the placement of an instance. +type Placement struct { + + // The affinity setting for the instance on the Dedicated Host. + Affinity *string `mandatory:"false" json:"affinity"` + + // The Availability Zone of the instance. + AvailabilityZone *string `mandatory:"false" json:"availabilityZone"` + + // The name of the placement group the instance is in. + GroupName *string `mandatory:"false" json:"groupName"` + + // The ID of the Dedicated Host on which the instance resides. + HostKey *string `mandatory:"false" json:"hostKey"` + + // The ARN of the host resource group in which to launch the instances. + HostResourceGroupArn *string `mandatory:"false" json:"hostResourceGroupArn"` + + // The number of the partition that the instance is in. + PartitionNumber *int `mandatory:"false" json:"partitionNumber"` + + // Reserved for future use. + SpreadDomain *string `mandatory:"false" json:"spreadDomain"` + + // The tenancy of the instance (if the instance is running in a VPC). + Tenancy *string `mandatory:"false" json:"tenancy"` +} + +func (m Placement) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Placement) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/supported_cloud_region_collection.go b/cloudbridge/supported_cloud_region_collection.go new file mode 100644 index 0000000000..5ad3ca78a9 --- /dev/null +++ b/cloudbridge/supported_cloud_region_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SupportedCloudRegionCollection Collection of supported cloud regions. +type SupportedCloudRegionCollection struct { + + // List of supported cloud regions. + Items []SupportedCloudRegionSummary `mandatory:"true" json:"items"` +} + +func (m SupportedCloudRegionCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SupportedCloudRegionCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/supported_cloud_region_lifecycle_state.go b/cloudbridge/supported_cloud_region_lifecycle_state.go new file mode 100644 index 0000000000..95577bbb37 --- /dev/null +++ b/cloudbridge/supported_cloud_region_lifecycle_state.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "strings" +) + +// SupportedCloudRegionLifecycleStateEnum Enum with underlying type: string +type SupportedCloudRegionLifecycleStateEnum string + +// Set of constants representing the allowable values for SupportedCloudRegionLifecycleStateEnum +const ( + SupportedCloudRegionLifecycleStateActive SupportedCloudRegionLifecycleStateEnum = "ACTIVE" + SupportedCloudRegionLifecycleStateInactive SupportedCloudRegionLifecycleStateEnum = "INACTIVE" +) + +var mappingSupportedCloudRegionLifecycleStateEnum = map[string]SupportedCloudRegionLifecycleStateEnum{ + "ACTIVE": SupportedCloudRegionLifecycleStateActive, + "INACTIVE": SupportedCloudRegionLifecycleStateInactive, +} + +var mappingSupportedCloudRegionLifecycleStateEnumLowerCase = map[string]SupportedCloudRegionLifecycleStateEnum{ + "active": SupportedCloudRegionLifecycleStateActive, + "inactive": SupportedCloudRegionLifecycleStateInactive, +} + +// GetSupportedCloudRegionLifecycleStateEnumValues Enumerates the set of values for SupportedCloudRegionLifecycleStateEnum +func GetSupportedCloudRegionLifecycleStateEnumValues() []SupportedCloudRegionLifecycleStateEnum { + values := make([]SupportedCloudRegionLifecycleStateEnum, 0) + for _, v := range mappingSupportedCloudRegionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSupportedCloudRegionLifecycleStateEnumStringValues Enumerates the set of values in String for SupportedCloudRegionLifecycleStateEnum +func GetSupportedCloudRegionLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingSupportedCloudRegionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSupportedCloudRegionLifecycleStateEnum(val string) (SupportedCloudRegionLifecycleStateEnum, bool) { + enum, ok := mappingSupportedCloudRegionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/cloudbridge/supported_cloud_region_summary.go b/cloudbridge/supported_cloud_region_summary.go new file mode 100644 index 0000000000..1bcfb726af --- /dev/null +++ b/cloudbridge/supported_cloud_region_summary.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SupportedCloudRegionSummary Summary of the supported cloud region. +type SupportedCloudRegionSummary struct { + + // The asset source type associated with the supported cloud region. + AssetSourceType AssetSourceTypeEnum `mandatory:"true" json:"assetSourceType"` + + // The supported cloud region name. + Name *string `mandatory:"true" json:"name"` + + // The current state of the supported cloud region. + LifecycleState SupportedCloudRegionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m SupportedCloudRegionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SupportedCloudRegionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAssetSourceTypeEnum(string(m.AssetSourceType)); !ok && m.AssetSourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssetSourceType: %s. Supported values are: %s.", m.AssetSourceType, strings.Join(GetAssetSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSupportedCloudRegionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetSupportedCloudRegionLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/tag.go b/cloudbridge/tag.go new file mode 100644 index 0000000000..334284f8ad --- /dev/null +++ b/cloudbridge/tag.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Tag Describes a tag. +type Tag struct { + + // The key of the tag. + Key *string `mandatory:"false" json:"key"` + + // The value of the tag. + Value *string `mandatory:"false" json:"value"` +} + +func (m Tag) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Tag) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cloudbridge/update_asset_details.go b/cloudbridge/update_asset_details.go index 09f52ba483..737b65ecc6 100644 --- a/cloudbridge/update_asset_details.go +++ b/cloudbridge/update_asset_details.go @@ -78,10 +78,18 @@ func (m *updateassetdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := UpdateVmAssetDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS_EBS": + mm := UpdateAwsEbsAssetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "VMWARE_VM": mm := UpdateVmwareVmAssetDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS_EC2": + mm := UpdateAwsEc2AssetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for UpdateAssetDetails: %s.", m.AssetType) return *m, nil diff --git a/cloudbridge/update_asset_source_details.go b/cloudbridge/update_asset_source_details.go index 132523bff9..9eafabe52e 100644 --- a/cloudbridge/update_asset_source_details.go +++ b/cloudbridge/update_asset_source_details.go @@ -16,7 +16,7 @@ import ( "strings" ) -// UpdateAssetSourceDetails The information about the new asset source. +// UpdateAssetSourceDetails Asset source update request. type UpdateAssetSourceDetails interface { // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. @@ -26,6 +26,9 @@ type UpdateAssetSourceDetails interface { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. GetAssetsCompartmentId() *string + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. + GetDiscoveryScheduleId() *string + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` @@ -46,6 +49,7 @@ type updateassetsourcedetails struct { JsonData []byte DisplayName *string `mandatory:"false" json:"displayName"` AssetsCompartmentId *string `mandatory:"false" json:"assetsCompartmentId"` + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` @@ -65,6 +69,7 @@ func (m *updateassetsourcedetails) UnmarshalJSON(data []byte) error { } m.DisplayName = s.Model.DisplayName m.AssetsCompartmentId = s.Model.AssetsCompartmentId + m.DiscoveryScheduleId = s.Model.DiscoveryScheduleId m.FreeformTags = s.Model.FreeformTags m.DefinedTags = s.Model.DefinedTags m.SystemTags = s.Model.SystemTags @@ -86,6 +91,10 @@ func (m *updateassetsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interf mm := UpdateVmWareAssetSourceDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AWS": + mm := UpdateAwsAssetSourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for UpdateAssetSourceDetails: %s.", m.Type) return *m, nil @@ -102,6 +111,11 @@ func (m updateassetsourcedetails) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m updateassetsourcedetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + // GetFreeformTags returns FreeformTags func (m updateassetsourcedetails) GetFreeformTags() map[string]string { return m.FreeformTags diff --git a/cloudbridge/update_aws_asset_source_details.go b/cloudbridge/update_aws_asset_source_details.go new file mode 100644 index 0000000000..3e483f60a9 --- /dev/null +++ b/cloudbridge/update_aws_asset_source_details.go @@ -0,0 +1,119 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsAssetSourceDetails AWS asset source update request. +type UpdateAwsAssetSourceDetails struct { + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"false" json:"assetsCompartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"false" json:"discoveryCredentials"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsAssetSourceDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m UpdateAwsAssetSourceDetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m UpdateAwsAssetSourceDetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsAssetSourceDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsAssetSourceDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m UpdateAwsAssetSourceDetails) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m UpdateAwsAssetSourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAwsAssetSourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAwsAssetSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsAssetSourceDetails UpdateAwsAssetSourceDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeUpdateAwsAssetSourceDetails + }{ + "AWS", + (MarshalTypeUpdateAwsAssetSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/update_aws_ebs_asset_details.go b/cloudbridge/update_aws_ebs_asset_details.go new file mode 100644 index 0000000000..e00f831c63 --- /dev/null +++ b/cloudbridge/update_aws_ebs_asset_details.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsEbsAssetDetails The information of AWS EBS asset to be updated. +type UpdateAwsEbsAssetDetails struct { + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + AwsEbs *AwsEbsProperties `mandatory:"false" json:"awsEbs"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsEbsAssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetSourceIds returns AssetSourceIds +func (m UpdateAwsEbsAssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsEbsAssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsEbsAssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateAwsEbsAssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAwsEbsAssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAwsEbsAssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsEbsAssetDetails UpdateAwsEbsAssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeUpdateAwsEbsAssetDetails + }{ + "AWS_EBS", + (MarshalTypeUpdateAwsEbsAssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/update_aws_ec2_asset_details.go b/cloudbridge/update_aws_ec2_asset_details.go new file mode 100644 index 0000000000..749f1dae78 --- /dev/null +++ b/cloudbridge/update_aws_ec2_asset_details.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsEc2AssetDetails The information of AWS VM asset to be updated. +type UpdateAwsEc2AssetDetails struct { + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + Compute *ComputeProperties `mandatory:"false" json:"compute"` + + Vm *VmProperties `mandatory:"false" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"false" json:"awsEc2"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsEc2AssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetSourceIds returns AssetSourceIds +func (m UpdateAwsEc2AssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsEc2AssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsEc2AssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateAwsEc2AssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAwsEc2AssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAwsEc2AssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsEc2AssetDetails UpdateAwsEc2AssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeUpdateAwsEc2AssetDetails + }{ + "AWS_EC2", + (MarshalTypeUpdateAwsEc2AssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/cloudbridge/update_plugin_details.go b/cloudbridge/update_plugin_details.go index ba3b3d701c..52e19da218 100644 --- a/cloudbridge/update_plugin_details.go +++ b/cloudbridge/update_plugin_details.go @@ -19,7 +19,7 @@ import ( type UpdatePluginDetails struct { // State to which the customer wants the plugin to move to. - DesiredState PluginDesiredStateEnum `mandatory:"false" json:"desiredState,omitempty"` + DesiredState PluginDesiredStateEnum `mandatory:"true" json:"desiredState"` } func (m UpdatePluginDetails) String() string { @@ -31,10 +31,10 @@ func (m UpdatePluginDetails) String() string { // Not recommended for calling this function directly func (m UpdatePluginDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} - if _, ok := GetMappingPluginDesiredStateEnum(string(m.DesiredState)); !ok && m.DesiredState != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DesiredState: %s. Supported values are: %s.", m.DesiredState, strings.Join(GetPluginDesiredStateEnumStringValues(), ","))) } + if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/cloudbridge/update_plugin_request_response.go b/cloudbridge/update_plugin_request_response.go index e155219d3f..debca464af 100644 --- a/cloudbridge/update_plugin_request_response.go +++ b/cloudbridge/update_plugin_request_response.go @@ -85,15 +85,12 @@ type UpdatePluginResponse struct { // The underlying http response RawResponse *http.Response - // The Plugin instance - Plugin `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"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` } func (response UpdatePluginResponse) String() string { diff --git a/cloudbridge/update_vm_ware_asset_source_details.go b/cloudbridge/update_vm_ware_asset_source_details.go index 03ee8606ef..c18fde3412 100644 --- a/cloudbridge/update_vm_ware_asset_source_details.go +++ b/cloudbridge/update_vm_ware_asset_source_details.go @@ -16,7 +16,7 @@ import ( "strings" ) -// UpdateVmWareAssetSourceDetails Asset source update details. +// UpdateVmWareAssetSourceDetails VMware asset source update request. type UpdateVmWareAssetSourceDetails struct { // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. @@ -26,6 +26,9 @@ type UpdateVmWareAssetSourceDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. AssetsCompartmentId *string `mandatory:"false" json:"assetsCompartmentId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` @@ -53,9 +56,6 @@ type UpdateVmWareAssetSourceDetails struct { // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` - - // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. - DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` } // GetDisplayName returns DisplayName @@ -68,6 +68,11 @@ func (m UpdateVmWareAssetSourceDetails) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m UpdateVmWareAssetSourceDetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + // GetFreeformTags returns FreeformTags func (m UpdateVmWareAssetSourceDetails) GetFreeformTags() map[string]string { return m.FreeformTags diff --git a/cloudbridge/vm_asset.go b/cloudbridge/vm_asset.go index 6fcdc87022..d5df1efc34 100644 --- a/cloudbridge/vm_asset.go +++ b/cloudbridge/vm_asset.go @@ -40,6 +40,10 @@ type VmAsset struct { // The time when the asset was updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + // Asset display name. DisplayName *string `mandatory:"false" json:"displayName"` @@ -61,10 +65,6 @@ type VmAsset struct { // Example: `{orcl-cloud: {free-tier-retain: true}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` - Compute *ComputeProperties `mandatory:"false" json:"compute"` - - Vm *VmProperties `mandatory:"false" json:"vm"` - // The current state of the asset. LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` } diff --git a/cloudbridge/vm_ware_asset_source.go b/cloudbridge/vm_ware_asset_source.go index e09e66fc2c..888d061c85 100644 --- a/cloudbridge/vm_ware_asset_source.go +++ b/cloudbridge/vm_ware_asset_source.go @@ -16,7 +16,7 @@ import ( "strings" ) -// VmWareAssetSource Description of an asset source. +// VmWareAssetSource VMware asset source. Used for discovery of virtual machines (VMs) registered in the VMware vCenter installation. type VmWareAssetSource struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. diff --git a/cloudbridge/vm_ware_asset_source_summary.go b/cloudbridge/vm_ware_asset_source_summary.go index 9a8768808a..2f92f2e57f 100644 --- a/cloudbridge/vm_ware_asset_source_summary.go +++ b/cloudbridge/vm_ware_asset_source_summary.go @@ -16,7 +16,7 @@ import ( "strings" ) -// VmWareAssetSourceSummary Description of an asset source. +// VmWareAssetSourceSummary Summary of an VMware asset source provided in the list. type VmWareAssetSourceSummary struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. diff --git a/cloudbridge/vmware_vm_asset.go b/cloudbridge/vmware_vm_asset.go index 935d3c5b19..bf936ba1bf 100644 --- a/cloudbridge/vmware_vm_asset.go +++ b/cloudbridge/vmware_vm_asset.go @@ -40,6 +40,14 @@ type VmwareVmAsset struct { // The time when the asset was updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + VmwareVm *VmwareVmProperties `mandatory:"true" json:"vmwareVm"` + + VmwareVCenter *VmwareVCenterProperties `mandatory:"true" json:"vmwareVCenter"` + // Asset display name. DisplayName *string `mandatory:"false" json:"displayName"` @@ -61,14 +69,6 @@ type VmwareVmAsset struct { // Example: `{orcl-cloud: {free-tier-retain: true}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` - Compute *ComputeProperties `mandatory:"false" json:"compute"` - - Vm *VmProperties `mandatory:"false" json:"vm"` - - VmwareVm *VmwareVmProperties `mandatory:"false" json:"vmwareVm"` - - VmwareVCenter *VmwareVCenterProperties `mandatory:"false" json:"vmwareVCenter"` - // The current state of the asset. LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` } diff --git a/cloudbridge/volume_attachment.go b/cloudbridge/volume_attachment.go new file mode 100644 index 0000000000..54ffadb292 --- /dev/null +++ b/cloudbridge/volume_attachment.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeAttachment Describes volume attachment details. +type VolumeAttachment struct { + + // Indicates whether the EBS volume is deleted on instance termination. + IsDeleteOnTermination *bool `mandatory:"false" json:"isDeleteOnTermination"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // The ID of the instance. + InstanceKey *string `mandatory:"false" json:"instanceKey"` + + // The attachment state of the volume. + Status *string `mandatory:"false" json:"status"` + + // The ID of the volume. + VolumeKey *string `mandatory:"false" json:"volumeKey"` +} + +func (m VolumeAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/common/version.go b/common/version.go index 06e9335ba5..4ae2ce0c52 100644 --- a/common/version.go +++ b/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "80" + minor = "81" patch = "0" tag = "" ) diff --git a/database/autonomous_database.go b/database/autonomous_database.go index d92a13bea3..3054e1cfff 100644 --- a/database/autonomous_database.go +++ b/database/autonomous_database.go @@ -149,6 +149,9 @@ type AutonomousDatabase struct { // The Autonomous Container Database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). Used only by Autonomous Database on Dedicated Exadata Infrastructure. AutonomousContainerDatabaseId *string `mandatory:"false" json:"autonomousContainerDatabaseId"` + // Indicates if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The date and time the Autonomous Database was most recently undeleted. TimeUndeleted *common.SDKTime `mandatory:"false" json:"timeUndeleted"` @@ -577,6 +580,7 @@ func (m *AutonomousDatabase) UnmarshalJSON(data []byte) (e error) { InfrastructureType AutonomousDatabaseInfrastructureTypeEnum `json:"infrastructureType"` IsDedicated *bool `json:"isDedicated"` AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` TimeUndeleted *common.SDKTime `json:"timeUndeleted"` TimeCreated *common.SDKTime `json:"timeCreated"` DisplayName *string `json:"displayName"` @@ -749,6 +753,8 @@ func (m *AutonomousDatabase) UnmarshalJSON(data []byte) (e error) { m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.TimeUndeleted = model.TimeUndeleted m.TimeCreated = model.TimeCreated diff --git a/database/autonomous_database_summary.go b/database/autonomous_database_summary.go index ee2c0787c3..90f7039dd0 100644 --- a/database/autonomous_database_summary.go +++ b/database/autonomous_database_summary.go @@ -151,6 +151,9 @@ type AutonomousDatabaseSummary struct { // The Autonomous Container Database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). Used only by Autonomous Database on Dedicated Exadata Infrastructure. AutonomousContainerDatabaseId *string `mandatory:"false" json:"autonomousContainerDatabaseId"` + // Indicates if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The date and time the Autonomous Database was most recently undeleted. TimeUndeleted *common.SDKTime `mandatory:"false" json:"timeUndeleted"` @@ -579,6 +582,7 @@ func (m *AutonomousDatabaseSummary) UnmarshalJSON(data []byte) (e error) { InfrastructureType AutonomousDatabaseSummaryInfrastructureTypeEnum `json:"infrastructureType"` IsDedicated *bool `json:"isDedicated"` AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` TimeUndeleted *common.SDKTime `json:"timeUndeleted"` TimeCreated *common.SDKTime `json:"timeCreated"` DisplayName *string `json:"displayName"` @@ -751,6 +755,8 @@ func (m *AutonomousDatabaseSummary) UnmarshalJSON(data []byte) (e error) { m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.TimeUndeleted = model.TimeUndeleted m.TimeCreated = model.TimeCreated diff --git a/database/create_autonomous_database_base.go b/database/create_autonomous_database_base.go index 763beecef4..c635edcc3d 100644 --- a/database/create_autonomous_database_base.go +++ b/database/create_autonomous_database_base.go @@ -256,6 +256,9 @@ type CreateAutonomousDatabaseBase interface { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. GetDbToolsDetails() []DatabaseTool + // True if the Autonomous Database is backup retention locked. + GetIsBackupRetentionLocked() *bool + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. GetSecretId() *string @@ -315,6 +318,7 @@ type createautonomousdatabasebase struct { IsAutoScalingForStorageEnabled *bool `mandatory:"false" json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `mandatory:"false" json:"databaseEdition,omitempty"` DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` SecretId *string `mandatory:"false" json:"secretId"` SecretVersionNumber *int `mandatory:"false" json:"secretVersionNumber"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -382,6 +386,7 @@ func (m *createautonomousdatabasebase) UnmarshalJSON(data []byte) error { m.IsAutoScalingForStorageEnabled = s.Model.IsAutoScalingForStorageEnabled m.DatabaseEdition = s.Model.DatabaseEdition m.DbToolsDetails = s.Model.DbToolsDetails + m.IsBackupRetentionLocked = s.Model.IsBackupRetentionLocked m.SecretId = s.Model.SecretId m.SecretVersionNumber = s.Model.SecretVersionNumber m.Source = s.Model.Source @@ -685,6 +690,11 @@ func (m createautonomousdatabasebase) GetDbToolsDetails() []DatabaseTool { return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m createautonomousdatabasebase) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m createautonomousdatabasebase) GetSecretId() *string { return m.SecretId diff --git a/database/create_autonomous_database_clone_details.go b/database/create_autonomous_database_clone_details.go index d99284791f..1a39cbda25 100644 --- a/database/create_autonomous_database_clone_details.go +++ b/database/create_autonomous_database_clone_details.go @@ -227,6 +227,9 @@ type CreateAutonomousDatabaseCloneDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -513,6 +516,11 @@ func (m CreateAutonomousDatabaseCloneDetails) GetDbToolsDetails() []DatabaseTool return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseCloneDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseCloneDetails) GetSecretId() *string { return m.SecretId @@ -623,6 +631,7 @@ func (m *CreateAutonomousDatabaseCloneDetails) UnmarshalJSON(data []byte) (e err IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -741,6 +750,8 @@ func (m *CreateAutonomousDatabaseCloneDetails) UnmarshalJSON(data []byte) (e err m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/create_autonomous_database_details.go b/database/create_autonomous_database_details.go index a5a4568484..55dda4e0dd 100644 --- a/database/create_autonomous_database_details.go +++ b/database/create_autonomous_database_details.go @@ -224,6 +224,9 @@ type CreateAutonomousDatabaseDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -507,6 +510,11 @@ func (m CreateAutonomousDatabaseDetails) GetDbToolsDetails() []DatabaseTool { return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseDetails) GetSecretId() *string { return m.SecretId @@ -614,6 +622,7 @@ func (m *CreateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -730,6 +739,8 @@ func (m *CreateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/create_autonomous_database_from_backup_details.go b/database/create_autonomous_database_from_backup_details.go index 77d8b49f07..6fb5867212 100644 --- a/database/create_autonomous_database_from_backup_details.go +++ b/database/create_autonomous_database_from_backup_details.go @@ -227,6 +227,9 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -513,6 +516,11 @@ func (m CreateAutonomousDatabaseFromBackupDetails) GetDbToolsDetails() []Databas return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseFromBackupDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseFromBackupDetails) GetSecretId() *string { return m.SecretId @@ -623,6 +631,7 @@ func (m *CreateAutonomousDatabaseFromBackupDetails) UnmarshalJSON(data []byte) ( IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -741,6 +750,8 @@ func (m *CreateAutonomousDatabaseFromBackupDetails) UnmarshalJSON(data []byte) ( m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/create_autonomous_database_from_backup_timestamp_details.go b/database/create_autonomous_database_from_backup_timestamp_details.go index 8860526886..8374ed57d3 100644 --- a/database/create_autonomous_database_from_backup_timestamp_details.go +++ b/database/create_autonomous_database_from_backup_timestamp_details.go @@ -227,6 +227,9 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -519,6 +522,11 @@ func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetDbToolsDetails() return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetSecretId() *string { return m.SecretId @@ -629,6 +637,7 @@ func (m *CreateAutonomousDatabaseFromBackupTimestampDetails) UnmarshalJSON(data IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` Timestamp *common.SDKTime `json:"timestamp"` @@ -749,6 +758,8 @@ func (m *CreateAutonomousDatabaseFromBackupTimestampDetails) UnmarshalJSON(data m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/create_cross_region_autonomous_database_data_guard_details.go b/database/create_cross_region_autonomous_database_data_guard_details.go index 3a2a0f802f..2ed619b14c 100644 --- a/database/create_cross_region_autonomous_database_data_guard_details.go +++ b/database/create_cross_region_autonomous_database_data_guard_details.go @@ -246,6 +246,9 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -529,6 +532,11 @@ func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetDbToolsDetails() return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetSecretId() *string { return m.SecretId @@ -636,6 +644,7 @@ func (m *CreateCrossRegionAutonomousDatabaseDataGuardDetails) UnmarshalJSON(data IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -753,6 +762,8 @@ func (m *CreateCrossRegionAutonomousDatabaseDataGuardDetails) UnmarshalJSON(data m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/create_cross_region_disaster_recovery_details.go b/database/create_cross_region_disaster_recovery_details.go index 9c5f197463..fb29e6dc88 100644 --- a/database/create_cross_region_disaster_recovery_details.go +++ b/database/create_cross_region_disaster_recovery_details.go @@ -248,6 +248,9 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -539,6 +542,11 @@ func (m CreateCrossRegionDisasterRecoveryDetails) GetDbToolsDetails() []Database return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateCrossRegionDisasterRecoveryDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateCrossRegionDisasterRecoveryDetails) GetSecretId() *string { return m.SecretId @@ -649,6 +657,7 @@ func (m *CreateCrossRegionDisasterRecoveryDetails) UnmarshalJSON(data []byte) (e IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` IsReplicateAutomaticBackups *bool `json:"isReplicateAutomaticBackups"` @@ -768,6 +777,8 @@ func (m *CreateCrossRegionDisasterRecoveryDetails) UnmarshalJSON(data []byte) (e m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/create_cross_tenancy_disaster_recovery_details.go b/database/create_cross_tenancy_disaster_recovery_details.go index cd2b8b5493..de574b03a8 100644 --- a/database/create_cross_tenancy_disaster_recovery_details.go +++ b/database/create_cross_tenancy_disaster_recovery_details.go @@ -249,6 +249,9 @@ type CreateCrossTenancyDisasterRecoveryDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -540,6 +543,11 @@ func (m CreateCrossTenancyDisasterRecoveryDetails) GetDbToolsDetails() []Databas return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateCrossTenancyDisasterRecoveryDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateCrossTenancyDisasterRecoveryDetails) GetSecretId() *string { return m.SecretId @@ -650,6 +658,7 @@ func (m *CreateCrossTenancyDisasterRecoveryDetails) UnmarshalJSON(data []byte) ( IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` IsReplicateAutomaticBackups *bool `json:"isReplicateAutomaticBackups"` @@ -769,6 +778,8 @@ func (m *CreateCrossTenancyDisasterRecoveryDetails) UnmarshalJSON(data []byte) ( m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/create_refreshable_autonomous_database_clone_details.go b/database/create_refreshable_autonomous_database_clone_details.go index bba3afa688..baa9f9c7b0 100644 --- a/database/create_refreshable_autonomous_database_clone_details.go +++ b/database/create_refreshable_autonomous_database_clone_details.go @@ -227,6 +227,9 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -526,6 +529,11 @@ func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetDbToolsDetails() []D return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetSecretId() *string { return m.SecretId @@ -639,6 +647,7 @@ func (m *CreateRefreshableAutonomousDatabaseCloneDetails) UnmarshalJSON(data []b IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` RefreshableMode CreateRefreshableAutonomousDatabaseCloneDetailsRefreshableModeEnum `json:"refreshableMode"` @@ -761,6 +770,8 @@ func (m *CreateRefreshableAutonomousDatabaseCloneDetails) UnmarshalJSON(data []b m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/undelete_autonomous_database_details.go b/database/undelete_autonomous_database_details.go index dde044f211..01fe35a162 100644 --- a/database/undelete_autonomous_database_details.go +++ b/database/undelete_autonomous_database_details.go @@ -227,6 +227,9 @@ type UndeleteAutonomousDatabaseDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -510,6 +513,11 @@ func (m UndeleteAutonomousDatabaseDetails) GetDbToolsDetails() []DatabaseTool { return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m UndeleteAutonomousDatabaseDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m UndeleteAutonomousDatabaseDetails) GetSecretId() *string { return m.SecretId @@ -617,6 +625,7 @@ func (m *UndeleteAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -734,6 +743,8 @@ func (m *UndeleteAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/database/update_autonomous_database_details.go b/database/update_autonomous_database_details.go index 289090dd7e..fe47fc54dd 100644 --- a/database/update_autonomous_database_details.go +++ b/database/update_autonomous_database_details.go @@ -252,6 +252,9 @@ type UpdateAutonomousDatabaseDetails struct { ResourcePoolSummary *ResourcePoolSummary `mandatory:"false" json:"resourcePoolSummary"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. ScheduledOperations []ScheduledOperationDetails `mandatory:"false" json:"scheduledOperations"` @@ -361,6 +364,7 @@ func (m *UpdateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` @@ -465,6 +469,8 @@ func (m *UpdateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { m.ResourcePoolSummary = model.ResourcePoolSummary + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) copy(m.ScheduledOperations, model.ScheduledOperations) m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled diff --git a/datascience/create_job_run_details.go b/datascience/create_job_run_details.go index 8a5b565022..766dbf4de7 100644 --- a/datascience/create_job_run_details.go +++ b/datascience/create_job_run_details.go @@ -19,10 +19,10 @@ import ( // CreateJobRunDetails Parameters needed to create a new job run. type CreateJobRunDetails struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. ProjectId *string `mandatory:"true" json:"projectId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. CompartmentId *string `mandatory:"true" json:"compartmentId"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job to create a run for. diff --git a/datascience/data_science_resource_type.go b/datascience/data_science_resource_type.go index 89be7889a0..3c55cd75cf 100644 --- a/datascience/data_science_resource_type.go +++ b/datascience/data_science_resource_type.go @@ -19,14 +19,17 @@ type DataScienceResourceTypeEnum string // Set of constants representing the allowable values for DataScienceResourceTypeEnum const ( DataScienceResourceTypeNotebookSession DataScienceResourceTypeEnum = "NOTEBOOK_SESSION" + DataScienceResourceTypeModelDeployment DataScienceResourceTypeEnum = "MODEL_DEPLOYMENT" ) var mappingDataScienceResourceTypeEnum = map[string]DataScienceResourceTypeEnum{ "NOTEBOOK_SESSION": DataScienceResourceTypeNotebookSession, + "MODEL_DEPLOYMENT": DataScienceResourceTypeModelDeployment, } var mappingDataScienceResourceTypeEnumLowerCase = map[string]DataScienceResourceTypeEnum{ "notebook_session": DataScienceResourceTypeNotebookSession, + "model_deployment": DataScienceResourceTypeModelDeployment, } // GetDataScienceResourceTypeEnumValues Enumerates the set of values for DataScienceResourceTypeEnum @@ -42,6 +45,7 @@ func GetDataScienceResourceTypeEnumValues() []DataScienceResourceTypeEnum { func GetDataScienceResourceTypeEnumStringValues() []string { return []string{ "NOTEBOOK_SESSION", + "MODEL_DEPLOYMENT", } } diff --git a/datascience/instance_configuration.go b/datascience/instance_configuration.go index 1517c28068..cfe401bb96 100644 --- a/datascience/instance_configuration.go +++ b/datascience/instance_configuration.go @@ -25,6 +25,9 @@ type InstanceConfiguration struct { // A model deployment instance is provided with a VNIC for network access. This specifies the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT/SGW gateway for egress. SubnetId *string `mandatory:"false" json:"subnetId"` + + // The OCID of a Data Science private endpoint. + PrivateEndpointId *string `mandatory:"false" json:"privateEndpointId"` } func (m InstanceConfiguration) String() string { diff --git a/datascience/job_run.go b/datascience/job_run.go index cc6b2248aa..5e1bb36a5d 100644 --- a/datascience/job_run.go +++ b/datascience/job_run.go @@ -28,13 +28,13 @@ type JobRun struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the job run. CreatedBy *string `mandatory:"true" json:"createdBy"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. ProjectId *string `mandatory:"true" json:"projectId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. JobId *string `mandatory:"true" json:"jobId"` JobConfigurationOverrideDetails JobConfigurationDetails `mandatory:"true" json:"jobConfigurationOverrideDetails"` diff --git a/datascience/job_run_summary.go b/datascience/job_run_summary.go index 1779c56508..b97f9b2b70 100644 --- a/datascience/job_run_summary.go +++ b/datascience/job_run_summary.go @@ -15,7 +15,7 @@ import ( "strings" ) -// JobRunSummary Summary information for a Job. +// JobRunSummary Summary information for a job run. type JobRunSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. @@ -27,16 +27,16 @@ type JobRunSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the job run. CreatedBy *string `mandatory:"true" json:"createdBy"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. ProjectId *string `mandatory:"true" json:"projectId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. JobId *string `mandatory:"true" json:"jobId"` - // The state of the job. + // The state of the job run. LifecycleState JobRunLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` // The date and time the job run request was started in the timestamp format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). diff --git a/datascience/job_summary.go b/datascience/job_summary.go index 82dc6676fe..e51eabab2f 100644 --- a/datascience/job_summary.go +++ b/datascience/job_summary.go @@ -15,7 +15,7 @@ import ( "strings" ) -// JobSummary Summary information for a Job. +// JobSummary Summary information for a job. type JobSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. diff --git a/datascience/list_data_science_private_endpoints_request_response.go b/datascience/list_data_science_private_endpoints_request_response.go index f668ec3a8e..66cd21e677 100644 --- a/datascience/list_data_science_private_endpoints_request_response.go +++ b/datascience/list_data_science_private_endpoints_request_response.go @@ -285,14 +285,17 @@ type ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum string // Set of constants representing the allowable values for ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum const ( ListDataSciencePrivateEndpointsDataScienceResourceTypeNotebookSession ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum = "NOTEBOOK_SESSION" + ListDataSciencePrivateEndpointsDataScienceResourceTypeModelDeployment ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum = "MODEL_DEPLOYMENT" ) var mappingListDataSciencePrivateEndpointsDataScienceResourceTypeEnum = map[string]ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum{ "NOTEBOOK_SESSION": ListDataSciencePrivateEndpointsDataScienceResourceTypeNotebookSession, + "MODEL_DEPLOYMENT": ListDataSciencePrivateEndpointsDataScienceResourceTypeModelDeployment, } var mappingListDataSciencePrivateEndpointsDataScienceResourceTypeEnumLowerCase = map[string]ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum{ "notebook_session": ListDataSciencePrivateEndpointsDataScienceResourceTypeNotebookSession, + "model_deployment": ListDataSciencePrivateEndpointsDataScienceResourceTypeModelDeployment, } // GetListDataSciencePrivateEndpointsDataScienceResourceTypeEnumValues Enumerates the set of values for ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum @@ -308,6 +311,7 @@ func GetListDataSciencePrivateEndpointsDataScienceResourceTypeEnumValues() []Lis func GetListDataSciencePrivateEndpointsDataScienceResourceTypeEnumStringValues() []string { return []string{ "NOTEBOOK_SESSION", + "MODEL_DEPLOYMENT", } } diff --git a/datascience/metadata.go b/datascience/metadata.go index f44f36d2d8..7470be3a3d 100644 --- a/datascience/metadata.go +++ b/datascience/metadata.go @@ -25,7 +25,7 @@ type Metadata struct { // * libraryVersion // * estimatorClass // * hyperParameters - // * testartifactresults + // * testArtifactresults Key *string `mandatory:"false" json:"key"` // Allowed values for useCaseType: @@ -41,7 +41,7 @@ type Metadata struct { // Description of model metadata Description *string `mandatory:"false" json:"description"` - // Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + // Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". Category *string `mandatory:"false" json:"category"` } diff --git a/generativeaiagent/action_type.go b/generativeaiagent/action_type.go index 2328fd981a..4f9d284906 100644 --- a/generativeaiagent/action_type.go +++ b/generativeaiagent/action_type.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/generativeaiagent/agent.go b/generativeaiagent/agent.go index cd8beef862..cdc6010da6 100644 --- a/generativeaiagent/agent.go +++ b/generativeaiagent/agent.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// Agent **Agent** -// An agent is an LLM-based autonomous system that understands and generates human-like text, enabling natural-language processing interactions. OCI Generative AI Agents supports retrieval-augmented generation (RAG) agents. A RAG agent connects to a data source, retrieves data, and augments model responses with the information from the data sources to generate more relevant responses. +// Agent An agent is an LLM-based autonomous system that understands and generates human-like text, enabling natural-language processing interactions. OCI Generative AI Agents supports retrieval-augmented generation (RAG) agents. A RAG agent connects to a data source, retrieves data, and augments model responses with the information from the data sources to generate more relevant responses. // 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.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type Agent struct { diff --git a/generativeaiagent/agent_collection.go b/generativeaiagent/agent_collection.go index 641f84b160..4eae5dce0e 100644 --- a/generativeaiagent/agent_collection.go +++ b/generativeaiagent/agent_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentCollection **AgentCollection** -// Results of an agent search. Contains both AgentSummary items and other information, such as metadata. +// AgentCollection Results of an agent search. Contains both AgentSummary items and other information, such as metadata. type AgentCollection struct { // List of agents. diff --git a/generativeaiagent/agent_endpoint.go b/generativeaiagent/agent_endpoint.go index b72742963f..4c07e1c1a9 100644 --- a/generativeaiagent/agent_endpoint.go +++ b/generativeaiagent/agent_endpoint.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentEndpoint **AgentEndpoint** -// The endpoint to access a deployed agent. +// AgentEndpoint The endpoint to access a deployed agent. // 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.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type AgentEndpoint struct { diff --git a/generativeaiagent/agent_endpoint_collection.go b/generativeaiagent/agent_endpoint_collection.go index 7bd1effb3e..d627b1f327 100644 --- a/generativeaiagent/agent_endpoint_collection.go +++ b/generativeaiagent/agent_endpoint_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentEndpointCollection **AgentEndpointCollection** -// Results of an agentEndpoint search. Contains both AgentEndpointSummary items and other information, such as metadata. +// AgentEndpointCollection Results of an agentEndpoint search. Contains both AgentEndpointSummary items and other information, such as metadata. type AgentEndpointCollection struct { // List of endpoints. diff --git a/generativeaiagent/agent_endpoint_summary.go b/generativeaiagent/agent_endpoint_summary.go index 78a78795de..682189df50 100644 --- a/generativeaiagent/agent_endpoint_summary.go +++ b/generativeaiagent/agent_endpoint_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentEndpointSummary **AgentEndpointSummary** -// Summary information about an endpoint. +// AgentEndpointSummary Summary information about an endpoint. type AgentEndpointSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the AgentEndpoint. diff --git a/generativeaiagent/agent_summary.go b/generativeaiagent/agent_summary.go index 8f82430a7a..504a2c86f5 100644 --- a/generativeaiagent/agent_summary.go +++ b/generativeaiagent/agent_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentSummary **AgentSummary** -// Summary information about an agent. +// AgentSummary Summary information about an agent. type AgentSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Agent. diff --git a/generativeaiagent/basic_auth_secret.go b/generativeaiagent/basic_auth_secret.go index 46e987b184..d393c12c1e 100644 --- a/generativeaiagent/basic_auth_secret.go +++ b/generativeaiagent/basic_auth_secret.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// BasicAuthSecret **BasicAuthSecret** -// The details of Basic authentication configured as in OpenSearch. +// BasicAuthSecret The details of Basic authentication configured as in OpenSearch. type BasicAuthSecret struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for basic authentication. diff --git a/generativeaiagent/change_agent_compartment_details.go b/generativeaiagent/change_agent_compartment_details.go index 61a16c7082..6690b7029c 100644 --- a/generativeaiagent/change_agent_compartment_details.go +++ b/generativeaiagent/change_agent_compartment_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ChangeAgentCompartmentDetails **ChangeAgentCompartmentDetails** -// The configuration details for the move operation. +// ChangeAgentCompartmentDetails The configuration details for the move operation. type ChangeAgentCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the agent to. diff --git a/generativeaiagent/change_agent_endpoint_compartment_details.go b/generativeaiagent/change_agent_endpoint_compartment_details.go index a52fd237d3..2a25627680 100644 --- a/generativeaiagent/change_agent_endpoint_compartment_details.go +++ b/generativeaiagent/change_agent_endpoint_compartment_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ChangeAgentEndpointCompartmentDetails **ChangeAgentEndpointCompartmentDetails** -// The configuration details for the move operation. +// ChangeAgentEndpointCompartmentDetails The configuration details for the move operation. type ChangeAgentEndpointCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the endpoint to. diff --git a/generativeaiagent/change_knowledge_base_compartment_details.go b/generativeaiagent/change_knowledge_base_compartment_details.go index 6d1839cde9..9d175475fe 100644 --- a/generativeaiagent/change_knowledge_base_compartment_details.go +++ b/generativeaiagent/change_knowledge_base_compartment_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ChangeKnowledgeBaseCompartmentDetails **ChangeKnowledgeBaseCompartmentDetails** -// The configuration details for the move operation. +// ChangeKnowledgeBaseCompartmentDetails The configuration details for the move operation. type ChangeKnowledgeBaseCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the KnowledgeBase to. diff --git a/generativeaiagent/content_moderation_config.go b/generativeaiagent/content_moderation_config.go index 8e12542e20..7ae95c0284 100644 --- a/generativeaiagent/content_moderation_config.go +++ b/generativeaiagent/content_moderation_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/generativeaiagent/create_agent_details.go b/generativeaiagent/create_agent_details.go index 2e0d12ab89..19c02bfdcf 100644 --- a/generativeaiagent/create_agent_details.go +++ b/generativeaiagent/create_agent_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// CreateAgentDetails **CreateAgentDetails** -// The data to create an agent. +// CreateAgentDetails The data to create an agent. type CreateAgentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the agent in. diff --git a/generativeaiagent/create_agent_endpoint_details.go b/generativeaiagent/create_agent_endpoint_details.go index 9a38de8e3d..72b3d6a45f 100644 --- a/generativeaiagent/create_agent_endpoint_details.go +++ b/generativeaiagent/create_agent_endpoint_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// CreateAgentEndpointDetails **CreateAgentEndpointDetails** -// The data to create an endpoint. +// CreateAgentEndpointDetails The data to create an endpoint. type CreateAgentEndpointDetails struct { // The OCID of the agent that this endpoint is associated with. diff --git a/generativeaiagent/create_data_ingestion_job_details.go b/generativeaiagent/create_data_ingestion_job_details.go index 31e23d924a..d20590568a 100644 --- a/generativeaiagent/create_data_ingestion_job_details.go +++ b/generativeaiagent/create_data_ingestion_job_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// CreateDataIngestionJobDetails **CreateDataIngestionJobDetails** -// The data to create a data ingestion job. +// CreateDataIngestionJobDetails The data to create a data ingestion job. type CreateDataIngestionJobDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. diff --git a/generativeaiagent/create_data_source_details.go b/generativeaiagent/create_data_source_details.go index 55156af8d2..9a69bffcd1 100644 --- a/generativeaiagent/create_data_source_details.go +++ b/generativeaiagent/create_data_source_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// CreateDataSourceDetails **CreateDataSourceDetails** -// The data to create a data source. +// CreateDataSourceDetails The data to create a data source. type CreateDataSourceDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. diff --git a/generativeaiagent/create_knowledge_base_details.go b/generativeaiagent/create_knowledge_base_details.go index dda845cfb0..98900f60f7 100644 --- a/generativeaiagent/create_knowledge_base_details.go +++ b/generativeaiagent/create_knowledge_base_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// CreateKnowledgeBaseDetails **CreateKnowledgeBaseDetails** -// The data to create a knowledge base. +// CreateKnowledgeBaseDetails The data to create a knowledge base. type CreateKnowledgeBaseDetails struct { IndexConfig IndexConfig `mandatory:"true" json:"indexConfig"` diff --git a/generativeaiagent/data_ingestion_job.go b/generativeaiagent/data_ingestion_job.go index 8ef0ea9b41..55ca7b7d23 100644 --- a/generativeaiagent/data_ingestion_job.go +++ b/generativeaiagent/data_ingestion_job.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJob **DataIngestionJob** -// When you create a data source, you specify the location of the data files. To make those files usable by an agent, you must download them into the agent's associated knowledge base, a process known as data ingestion. Data ingestion is a process that extracts data from data source documents, converts it into a structured format suitable for analysis, and then stores it in a knowledge base. +// DataIngestionJob When you create a data source, you specify the location of the data files. To make those files usable by an agent, you must download them into the agent's associated knowledge base, a process known as data ingestion. Data ingestion is a process that extracts data from data source documents, converts it into a structured format suitable for analysis, and then stores it in a knowledge base. // 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.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type DataIngestionJob struct { @@ -60,6 +57,9 @@ type DataIngestionJob struct { // A user-friendly name. Does not have to be unique, and it's changeable. Description *string `mandatory:"false" json:"description"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + KnowledgeBaseId *string `mandatory:"false" json:"knowledgeBaseId"` + // The date and time the data ingestion job was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` diff --git a/generativeaiagent/data_ingestion_job_collection.go b/generativeaiagent/data_ingestion_job_collection.go index 99945f1d68..4eadd69ea4 100644 --- a/generativeaiagent/data_ingestion_job_collection.go +++ b/generativeaiagent/data_ingestion_job_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJobCollection **DataIngestionJobCollection** -// Results of a data ingestion job search. Contains both DataIngestionJobSummary items and other information, such as metadata. +// DataIngestionJobCollection Results of a data ingestion job search. Contains both DataIngestionJobSummary items and other information, such as metadata. type DataIngestionJobCollection struct { // List of data ingestion jobs. diff --git a/generativeaiagent/data_ingestion_job_statistics.go b/generativeaiagent/data_ingestion_job_statistics.go index 96aaf02597..69e183a859 100644 --- a/generativeaiagent/data_ingestion_job_statistics.go +++ b/generativeaiagent/data_ingestion_job_statistics.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJobStatistics **DataIngestionJobStatistics** -// The statistics of data ingestion job. +// DataIngestionJobStatistics The statistics of data ingestion job. type DataIngestionJobStatistics struct { // The number of files that have failed during the ingestion. diff --git a/generativeaiagent/data_ingestion_job_summary.go b/generativeaiagent/data_ingestion_job_summary.go index 82122f253d..77b2a5ae57 100644 --- a/generativeaiagent/data_ingestion_job_summary.go +++ b/generativeaiagent/data_ingestion_job_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJobSummary **DataIngestionJobSummary** -// Summary information about a data ingestion job. +// DataIngestionJobSummary Summary information about a data ingestion job. type DataIngestionJobSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. diff --git a/generativeaiagent/data_source.go b/generativeaiagent/data_source.go index f8bdb022e4..61a0061e31 100644 --- a/generativeaiagent/data_source.go +++ b/generativeaiagent/data_source.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DataSource **DataSource** -// A data source points to the source of your data. After you add a data source to a knowledge base, you must ingest the data source's data, so that agents using the knowledge base can refer to the data. +// DataSource A data source points to the source of your data. After you add a data source to a knowledge base, you must ingest the data source's data, so that agents using the knowledge base can refer to the data. // 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.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type DataSource struct { diff --git a/generativeaiagent/data_source_collection.go b/generativeaiagent/data_source_collection.go index 65f3e799a0..580d8ea5cc 100644 --- a/generativeaiagent/data_source_collection.go +++ b/generativeaiagent/data_source_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataSourceCollection **DataSourceCollection** -// Results of a dataSource search. Contains both DataSourceSummary items and other information, such as metadata. +// DataSourceCollection Results of a dataSource search. Contains both DataSourceSummary items and other information, such as metadata. type DataSourceCollection struct { // List of data sources. diff --git a/generativeaiagent/data_source_config.go b/generativeaiagent/data_source_config.go index 889ffc8b50..05b4634047 100644 --- a/generativeaiagent/data_source_config.go +++ b/generativeaiagent/data_source_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,14 +20,17 @@ import ( "strings" ) -// DataSourceConfig **DataSourceConfig** -// The details of data source. +// DataSourceConfig The details of data source. type DataSourceConfig interface { + + // Flag to enable or disable multi modality such as image processing while ingestion of data. True enable the processing and false exclude the multi modality contents during ingestion. + GetShouldEnableMultiModality() *bool } type datasourceconfig struct { - JsonData []byte - DataSourceConfigType string `json:"dataSourceConfigType"` + JsonData []byte + ShouldEnableMultiModality *bool `mandatory:"false" json:"shouldEnableMultiModality"` + DataSourceConfigType string `json:"dataSourceConfigType"` } // UnmarshalJSON unmarshals json @@ -43,6 +44,7 @@ func (m *datasourceconfig) UnmarshalJSON(data []byte) error { if err != nil { return err } + m.ShouldEnableMultiModality = s.Model.ShouldEnableMultiModality m.DataSourceConfigType = s.Model.DataSourceConfigType return err @@ -67,6 +69,11 @@ func (m *datasourceconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } +// GetShouldEnableMultiModality returns ShouldEnableMultiModality +func (m datasourceconfig) GetShouldEnableMultiModality() *bool { + return m.ShouldEnableMultiModality +} + func (m datasourceconfig) String() string { return common.PointerString(m) } diff --git a/generativeaiagent/data_source_summary.go b/generativeaiagent/data_source_summary.go index f978d0604c..a93146bc4e 100644 --- a/generativeaiagent/data_source_summary.go +++ b/generativeaiagent/data_source_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataSourceSummary **DataSourceSummary** -// Summary information about a data source. +// DataSourceSummary Summary information about a data source. type DataSourceSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. diff --git a/generativeaiagent/database_connection.go b/generativeaiagent/database_connection.go index eebf33fc14..09f3924776 100644 --- a/generativeaiagent/database_connection.go +++ b/generativeaiagent/database_connection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DatabaseConnection **DatabaseConnection** -// The connection type for Databases. +// DatabaseConnection The connection type for Databases. type DatabaseConnection interface { } diff --git a/generativeaiagent/database_function.go b/generativeaiagent/database_function.go index 25cb86b767..fcd2630c63 100644 --- a/generativeaiagent/database_function.go +++ b/generativeaiagent/database_function.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DatabaseFunction **DatabaseFunction** -// The details of Database function. +// DatabaseFunction The details of Database function. type DatabaseFunction struct { // The name of the Database function. diff --git a/generativeaiagent/database_tool_connection.go b/generativeaiagent/database_tool_connection.go index cf7c91b807..38b0ba52d0 100644 --- a/generativeaiagent/database_tool_connection.go +++ b/generativeaiagent/database_tool_connection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DatabaseToolConnection **DatabaseToolConnection** -// The details of the customer Database Tools Connection. +// DatabaseToolConnection The details of the customer Database Tools Connection. type DatabaseToolConnection struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Tools Connection. diff --git a/generativeaiagent/default_index_config.go b/generativeaiagent/default_index_config.go index c29cf653ed..f829508f97 100644 --- a/generativeaiagent/default_index_config.go +++ b/generativeaiagent/default_index_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DefaultIndexConfig **DefaultIndexConfig** -// The default index is service managed vector store on behalf of the customer. +// DefaultIndexConfig The default index is service managed vector store on behalf of the customer. type DefaultIndexConfig struct { // Whether to enable Hybrid search in service managed OpenSearch. diff --git a/generativeaiagent/generativeaiagent_client.go b/generativeaiagent/generativeaiagent_client.go index ecb49257e6..f8c250d9b1 100644 --- a/generativeaiagent/generativeaiagent_client.go +++ b/generativeaiagent/generativeaiagent_client.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -97,8 +95,7 @@ func (client *GenerativeAiAgentClient) ConfigurationProvider() *common.Configura return client.config } -// CancelWorkRequest **CancelWorkRequest** -// Cancels a work request. +// CancelWorkRequest Cancels a work request. // // # See also // @@ -156,8 +153,7 @@ func (client GenerativeAiAgentClient) cancelWorkRequest(ctx context.Context, req return response, err } -// ChangeAgentCompartment **ChangeAgentCompartment** -// Moves an agent into a different compartment within the same tenancy. For information about moving resources between +// ChangeAgentCompartment Moves an agent into a different compartment within the same tenancy. For information about moving resources between // compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // // # See also @@ -221,8 +217,7 @@ func (client GenerativeAiAgentClient) changeAgentCompartment(ctx context.Context return response, err } -// ChangeAgentEndpointCompartment **ChangeAgentEndpointCompartment** -// Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between +// ChangeAgentEndpointCompartment Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between // compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // // # See also @@ -286,8 +281,7 @@ func (client GenerativeAiAgentClient) changeAgentEndpointCompartment(ctx context return response, err } -// ChangeKnowledgeBaseCompartment **ChangeKnowledgeBaseCompartment** -// Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between +// ChangeKnowledgeBaseCompartment Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between // compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // // # See also @@ -351,8 +345,7 @@ func (client GenerativeAiAgentClient) changeKnowledgeBaseCompartment(ctx context return response, err } -// CreateAgent **CreateAgent** -// Creates an agent. +// CreateAgent Creates an agent. // // # See also // @@ -415,8 +408,7 @@ func (client GenerativeAiAgentClient) createAgent(ctx context.Context, request c return response, err } -// CreateAgentEndpoint **CreateAgentEndpoint** -// Creates an endpoint. +// CreateAgentEndpoint Creates an endpoint. // // # See also // @@ -479,8 +471,7 @@ func (client GenerativeAiAgentClient) createAgentEndpoint(ctx context.Context, r return response, err } -// CreateDataIngestionJob **CreateDataIngestionJob** -// Creates a data ingestion job. +// CreateDataIngestionJob Creates a data ingestion job. // // # See also // @@ -543,8 +534,7 @@ func (client GenerativeAiAgentClient) createDataIngestionJob(ctx context.Context return response, err } -// CreateDataSource **CreateDataSource** -// Creates a data source. +// CreateDataSource Creates a data source. // // # See also // @@ -607,8 +597,7 @@ func (client GenerativeAiAgentClient) createDataSource(ctx context.Context, requ return response, err } -// CreateKnowledgeBase **CreateKnowledgeBase** -// Creates a knowledge base. +// CreateKnowledgeBase Creates a knowledge base. // // # See also // @@ -671,8 +660,7 @@ func (client GenerativeAiAgentClient) createKnowledgeBase(ctx context.Context, r return response, err } -// DeleteAgent **DeleteAgent** -// Deletes an agent. +// DeleteAgent Deletes an agent. // // # See also // @@ -730,8 +718,7 @@ func (client GenerativeAiAgentClient) deleteAgent(ctx context.Context, request c return response, err } -// DeleteAgentEndpoint **DeleteAgentEndpoint** -// Deletes an endpoint. +// DeleteAgentEndpoint Deletes an endpoint. // // # See also // @@ -789,8 +776,7 @@ func (client GenerativeAiAgentClient) deleteAgentEndpoint(ctx context.Context, r return response, err } -// DeleteDataIngestionJob **DeleteDataIngestionJob** -// Deletes a data ingestion job. +// DeleteDataIngestionJob Deletes a data ingestion job. // // # See also // @@ -848,8 +834,7 @@ func (client GenerativeAiAgentClient) deleteDataIngestionJob(ctx context.Context return response, err } -// DeleteDataSource **DeleteDataSource** -// Deletes a data source. +// DeleteDataSource Deletes a data source. // // # See also // @@ -907,8 +892,7 @@ func (client GenerativeAiAgentClient) deleteDataSource(ctx context.Context, requ return response, err } -// DeleteKnowledgeBase **DeleteKnowledgeBase** -// Deletes a knowledge base. +// DeleteKnowledgeBase Deletes a knowledge base. // // # See also // @@ -966,8 +950,7 @@ func (client GenerativeAiAgentClient) deleteKnowledgeBase(ctx context.Context, r return response, err } -// GetAgent **GetAgent** -// Gets information about an agent. +// GetAgent Gets information about an agent. // // # See also // @@ -1025,8 +1008,7 @@ func (client GenerativeAiAgentClient) getAgent(ctx context.Context, request comm return response, err } -// GetAgentEndpoint **GetAgentEndpoint** -// Gets information about an endpoint. +// GetAgentEndpoint Gets information about an endpoint. // // # See also // @@ -1084,8 +1066,7 @@ func (client GenerativeAiAgentClient) getAgentEndpoint(ctx context.Context, requ return response, err } -// GetDataIngestionJob **GetDataIngestionJob** -// Gets information about a data ingestion job. +// GetDataIngestionJob Gets information about a data ingestion job. // // # See also // @@ -1143,8 +1124,7 @@ func (client GenerativeAiAgentClient) getDataIngestionJob(ctx context.Context, r return response, err } -// GetDataIngestionJobLogContent **GetDataIngestionJobLogContent** -// Returns the raw log file for the specified data ingestion job in text format. +// GetDataIngestionJobLogContent Returns the raw log file for the specified data ingestion job in text format. // // # See also // @@ -1201,8 +1181,7 @@ func (client GenerativeAiAgentClient) getDataIngestionJobLogContent(ctx context. return response, err } -// GetDataSource **GetDataSource** -// Gets information about a data source. +// GetDataSource Gets information about a data source. // // # See also // @@ -1260,8 +1239,7 @@ func (client GenerativeAiAgentClient) getDataSource(ctx context.Context, request return response, err } -// GetKnowledgeBase **GetKnowledgeBase** -// Gets information about a knowledge base. +// GetKnowledgeBase Gets information about a knowledge base. // // # See also // @@ -1319,8 +1297,7 @@ func (client GenerativeAiAgentClient) getKnowledgeBase(ctx context.Context, requ return response, err } -// GetWorkRequest **GetWorkRequest** -// Gets the details of a work request. +// GetWorkRequest Gets the details of a work request. // // # See also // @@ -1378,8 +1355,7 @@ func (client GenerativeAiAgentClient) getWorkRequest(ctx context.Context, reques return response, err } -// ListAgentEndpoints **ListAgentEndpoints** -// Gets a list of endpoints. +// ListAgentEndpoints Gets a list of endpoints. // // # See also // @@ -1437,8 +1413,7 @@ func (client GenerativeAiAgentClient) listAgentEndpoints(ctx context.Context, re return response, err } -// ListAgents **ListAgents** -// Gets a list of agents. +// ListAgents Gets a list of agents. // // # See also // @@ -1496,8 +1471,7 @@ func (client GenerativeAiAgentClient) listAgents(ctx context.Context, request co return response, err } -// ListDataIngestionJobs **ListDataIngestionJobs** -// Gets a list of data ingestion jobs. +// ListDataIngestionJobs Gets a list of data ingestion jobs. // // # See also // @@ -1555,8 +1529,7 @@ func (client GenerativeAiAgentClient) listDataIngestionJobs(ctx context.Context, return response, err } -// ListDataSources **ListDataSources** -// Gets a list of data sources. +// ListDataSources Gets a list of data sources. // // # See also // @@ -1614,8 +1587,7 @@ func (client GenerativeAiAgentClient) listDataSources(ctx context.Context, reque return response, err } -// ListKnowledgeBases **ListKnowledgeBases** -// Gets a list of knowledge bases. +// ListKnowledgeBases Gets a list of knowledge bases. // // # See also // @@ -1673,8 +1645,7 @@ func (client GenerativeAiAgentClient) listKnowledgeBases(ctx context.Context, re return response, err } -// ListWorkRequestErrors **ListWorkRequestErrors** -// Lists the errors for a work request. +// ListWorkRequestErrors Lists the errors for a work request. // // # See also // @@ -1732,8 +1703,7 @@ func (client GenerativeAiAgentClient) listWorkRequestErrors(ctx context.Context, return response, err } -// ListWorkRequestLogs **ListWorkRequestLogs** -// Lists the logs for a work request. +// ListWorkRequestLogs Lists the logs for a work request. // // # See also // @@ -1791,8 +1761,7 @@ func (client GenerativeAiAgentClient) listWorkRequestLogs(ctx context.Context, r return response, err } -// ListWorkRequests **ListWorkRequests** -// Lists the work requests in a compartment. +// ListWorkRequests Lists the work requests in a compartment. // // # See also // @@ -1850,8 +1819,7 @@ func (client GenerativeAiAgentClient) listWorkRequests(ctx context.Context, requ return response, err } -// UpdateAgent **UpdateAgent** -// Updates an agent. +// UpdateAgent Updates an agent. // // # See also // @@ -1909,8 +1877,7 @@ func (client GenerativeAiAgentClient) updateAgent(ctx context.Context, request c return response, err } -// UpdateAgentEndpoint **UpdateAgentEndpoint** -// Updates an endpoint. +// UpdateAgentEndpoint Updates an endpoint. // // # See also // @@ -1968,8 +1935,7 @@ func (client GenerativeAiAgentClient) updateAgentEndpoint(ctx context.Context, r return response, err } -// UpdateDataSource **UpdateDataSource** -// Updates a data source. +// UpdateDataSource Updates a data source. // // # See also // @@ -2027,8 +1993,7 @@ func (client GenerativeAiAgentClient) updateDataSource(ctx context.Context, requ return response, err } -// UpdateKnowledgeBase **UpdateKnowledgeBase** -// Updates a knowledge base. +// UpdateKnowledgeBase Updates a knowledge base. // // # See also // diff --git a/generativeaiagent/idcs_secret.go b/generativeaiagent/idcs_secret.go index 17990946db..de690dd641 100644 --- a/generativeaiagent/idcs_secret.go +++ b/generativeaiagent/idcs_secret.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// IdcsSecret **IdcsSecret** -// The details of IDCS configured as OpenID setting in OpenSearch. +// IdcsSecret The details of IDCS configured as OpenID setting in OpenSearch. type IdcsSecret struct { // The URL represent authentication url of the IDCS. diff --git a/generativeaiagent/index.go b/generativeaiagent/index.go index 8d3f3646fa..9c9900c3c4 100644 --- a/generativeaiagent/index.go +++ b/generativeaiagent/index.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// Index **Index** -// OCI OpenSearch index details. +// Index OCI OpenSearch index details. type Index struct { // The index name in opensearch. diff --git a/generativeaiagent/index_config.go b/generativeaiagent/index_config.go index f093cd15ff..3a2eef2795 100644 --- a/generativeaiagent/index_config.go +++ b/generativeaiagent/index_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// IndexConfig **IndexConfig** -// The index configuration of Knowledge bases. +// IndexConfig The index configuration of Knowledge bases. type IndexConfig interface { } diff --git a/generativeaiagent/index_schema.go b/generativeaiagent/index_schema.go index 00672596db..510a671491 100644 --- a/generativeaiagent/index_schema.go +++ b/generativeaiagent/index_schema.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// IndexSchema **IndexSchema** -// The index schema details. +// IndexSchema The index schema details. type IndexSchema struct { // Body key name. diff --git a/generativeaiagent/knowledge_base.go b/generativeaiagent/knowledge_base.go index 2faa8d7085..0c803c3fa4 100644 --- a/generativeaiagent/knowledge_base.go +++ b/generativeaiagent/knowledge_base.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// KnowledgeBase **KnowledgeBase** -// A knowledge base is the base for all the data sources that an agent can use to retrieve information for its responses. +// KnowledgeBase A knowledge base is the base for all the data sources that an agent can use to retrieve information for its responses. // 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.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type KnowledgeBase struct { @@ -58,6 +55,8 @@ type KnowledgeBase struct { // A description of the knowledge base. Description *string `mandatory:"false" json:"description"` + KnowledgeBaseStatistics *KnowledgeBaseStatistics `mandatory:"false" json:"knowledgeBaseStatistics"` + // The date and time the knowledge base was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` @@ -93,18 +92,19 @@ func (m KnowledgeBase) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *KnowledgeBase) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - LifecycleDetails *string `json:"lifecycleDetails"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - Id *string `json:"id"` - DisplayName *string `json:"displayName"` - CompartmentId *string `json:"compartmentId"` - IndexConfig indexconfig `json:"indexConfig"` - TimeCreated *common.SDKTime `json:"timeCreated"` - LifecycleState KnowledgeBaseLifecycleStateEnum `json:"lifecycleState"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Description *string `json:"description"` + KnowledgeBaseStatistics *KnowledgeBaseStatistics `json:"knowledgeBaseStatistics"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + IndexConfig indexconfig `json:"indexConfig"` + TimeCreated *common.SDKTime `json:"timeCreated"` + LifecycleState KnowledgeBaseLifecycleStateEnum `json:"lifecycleState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` }{} e = json.Unmarshal(data, &model) @@ -114,6 +114,8 @@ func (m *KnowledgeBase) UnmarshalJSON(data []byte) (e error) { var nn interface{} m.Description = model.Description + m.KnowledgeBaseStatistics = model.KnowledgeBaseStatistics + m.TimeUpdated = model.TimeUpdated m.LifecycleDetails = model.LifecycleDetails diff --git a/generativeaiagent/knowledge_base_collection.go b/generativeaiagent/knowledge_base_collection.go index 9b89b2c538..7e7fab28d1 100644 --- a/generativeaiagent/knowledge_base_collection.go +++ b/generativeaiagent/knowledge_base_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// KnowledgeBaseCollection **KnowledgeBaseCollection** -// Results of a knowledge base search. Contains both KnowledgeBaseSummary items and other information, such as metadata. +// KnowledgeBaseCollection Results of a knowledge base search. Contains both KnowledgeBaseSummary items and other information, such as metadata. type KnowledgeBaseCollection struct { // List of knowledge bases. diff --git a/generativeaiagent/knowledge_base_statistics.go b/generativeaiagent/knowledge_base_statistics.go new file mode 100644 index 0000000000..0b021789c8 --- /dev/null +++ b/generativeaiagent/knowledge_base_statistics.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Generative AI Agents Management API +// +// OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. +// OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. +// Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. +// For creating and managing client chat sessions see the /EN/generative-ai-agents-client/latest/. +// To learn more about the service, see the Generative AI Agents documentation (https://docs.cloud.oracle.com/iaas/Content/generative-ai-agents/home.htm). +// + +package generativeaiagent + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KnowledgeBaseStatistics Statistics for Default Knowledge Base. +type KnowledgeBaseStatistics struct { + + // Knowledge Base size in bytes. + SizeInBytes *int `mandatory:"false" json:"sizeInBytes"` +} + +func (m KnowledgeBaseStatistics) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KnowledgeBaseStatistics) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/generativeaiagent/knowledge_base_summary.go b/generativeaiagent/knowledge_base_summary.go index 74ef0957f0..acf1e7dc90 100644 --- a/generativeaiagent/knowledge_base_summary.go +++ b/generativeaiagent/knowledge_base_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// KnowledgeBaseSummary **KnowledgeBaseSummary** -// Summary information about a knowledge base. +// KnowledgeBaseSummary Summary information about a knowledge base. type KnowledgeBaseSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. diff --git a/generativeaiagent/object_storage_prefix.go b/generativeaiagent/object_storage_prefix.go index e2efd2ff88..f67351277a 100644 --- a/generativeaiagent/object_storage_prefix.go +++ b/generativeaiagent/object_storage_prefix.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ObjectStoragePrefix **ObjectStoragePrefix** -// The details of OCI Object Storage object. +// ObjectStoragePrefix The details of OCI Object Storage object. type ObjectStoragePrefix struct { // The namespace name of an object. diff --git a/generativeaiagent/oci_database_config.go b/generativeaiagent/oci_database_config.go index 78b545262c..19c79bbc3c 100644 --- a/generativeaiagent/oci_database_config.go +++ b/generativeaiagent/oci_database_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// OciDatabaseConfig **OciDatabaseConfig** -// The details of the customer Database Connection. +// OciDatabaseConfig The details of the customer Database Connection. type OciDatabaseConfig struct { DatabaseConnection DatabaseConnection `mandatory:"true" json:"databaseConnection"` diff --git a/generativeaiagent/oci_object_storage_data_source_config.go b/generativeaiagent/oci_object_storage_data_source_config.go index b2d2f2f069..b6b210447e 100644 --- a/generativeaiagent/oci_object_storage_data_source_config.go +++ b/generativeaiagent/oci_object_storage_data_source_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,12 +20,19 @@ import ( "strings" ) -// OciObjectStorageDataSourceConfig **OciObjectStorageDataSourceConfig** -// The details of OCI Search with OpenSearch data source information. +// OciObjectStorageDataSourceConfig The details of OCI Search with OpenSearch data source information. type OciObjectStorageDataSourceConfig struct { + // Flag to enable or disable multi modality such as image processing while ingestion of data. True enable the processing and false exclude the multi modality contents during ingestion. + ShouldEnableMultiModality *bool `mandatory:"false" json:"shouldEnableMultiModality"` + // The locations of data items in Object Storage, can either be an object (File) or a prefix (folder). - ObjectStoragePrefixes []ObjectStoragePrefix `mandatory:"true" json:"objectStoragePrefixes"` + ObjectStoragePrefixes []ObjectStoragePrefix `mandatory:"false" json:"objectStoragePrefixes"` +} + +// GetShouldEnableMultiModality returns ShouldEnableMultiModality +func (m OciObjectStorageDataSourceConfig) GetShouldEnableMultiModality() *bool { + return m.ShouldEnableMultiModality } func (m OciObjectStorageDataSourceConfig) String() string { diff --git a/generativeaiagent/oci_open_search_index_config.go b/generativeaiagent/oci_open_search_index_config.go index a5a01a4f5a..4ba9a6ccdc 100644 --- a/generativeaiagent/oci_open_search_index_config.go +++ b/generativeaiagent/oci_open_search_index_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// OciOpenSearchIndexConfig **OciOpenSearchIndexConfig** -// The details of customer managed OCI OpenSearch. +// OciOpenSearchIndexConfig The details of customer managed OCI OpenSearch. type OciOpenSearchIndexConfig struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OpenSearch Cluster. diff --git a/generativeaiagent/operation_status.go b/generativeaiagent/operation_status.go index 3a8fc0e8c0..511b4efbbe 100644 --- a/generativeaiagent/operation_status.go +++ b/generativeaiagent/operation_status.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/generativeaiagent/operation_type.go b/generativeaiagent/operation_type.go index ee7c264b25..063190bdd0 100644 --- a/generativeaiagent/operation_type.go +++ b/generativeaiagent/operation_type.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -41,6 +39,9 @@ const ( OperationTypeMoveKnowledgeBase OperationTypeEnum = "MOVE_KNOWLEDGE_BASE" OperationTypeCreateDataIngestionJob OperationTypeEnum = "CREATE_DATA_INGESTION_JOB" OperationTypeDeleteDataIngestionJob OperationTypeEnum = "DELETE_DATA_INGESTION_JOB" + OperationTypeCreateTool OperationTypeEnum = "CREATE_TOOL" + OperationTypeUpdateTool OperationTypeEnum = "UPDATE_TOOL" + OperationTypeDeleteTool OperationTypeEnum = "DELETE_TOOL" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -61,6 +62,9 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "MOVE_KNOWLEDGE_BASE": OperationTypeMoveKnowledgeBase, "CREATE_DATA_INGESTION_JOB": OperationTypeCreateDataIngestionJob, "DELETE_DATA_INGESTION_JOB": OperationTypeDeleteDataIngestionJob, + "CREATE_TOOL": OperationTypeCreateTool, + "UPDATE_TOOL": OperationTypeUpdateTool, + "DELETE_TOOL": OperationTypeDeleteTool, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -81,6 +85,9 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "move_knowledge_base": OperationTypeMoveKnowledgeBase, "create_data_ingestion_job": OperationTypeCreateDataIngestionJob, "delete_data_ingestion_job": OperationTypeDeleteDataIngestionJob, + "create_tool": OperationTypeCreateTool, + "update_tool": OperationTypeUpdateTool, + "delete_tool": OperationTypeDeleteTool, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -112,6 +119,9 @@ func GetOperationTypeEnumStringValues() []string { "MOVE_KNOWLEDGE_BASE", "CREATE_DATA_INGESTION_JOB", "DELETE_DATA_INGESTION_JOB", + "CREATE_TOOL", + "UPDATE_TOOL", + "DELETE_TOOL", } } diff --git a/generativeaiagent/secret_detail.go b/generativeaiagent/secret_detail.go index c413e7868c..f98e90fb1a 100644 --- a/generativeaiagent/secret_detail.go +++ b/generativeaiagent/secret_detail.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// SecretDetail **SecretDetail** -// The details of configured security configuration on OpenSearch. +// SecretDetail The details of configured security configuration on OpenSearch. type SecretDetail interface { } diff --git a/generativeaiagent/session_config.go b/generativeaiagent/session_config.go index 554e302292..e5f9e4ef80 100644 --- a/generativeaiagent/session_config.go +++ b/generativeaiagent/session_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// SessionConfig **SessionConfig** -// Session Configuration on AgentEndpoint. +// SessionConfig Session Configuration on AgentEndpoint. type SessionConfig struct { // The session will become inactive after this timeout. diff --git a/generativeaiagent/sort_order.go b/generativeaiagent/sort_order.go index a64222411d..2c77773c9c 100644 --- a/generativeaiagent/sort_order.go +++ b/generativeaiagent/sort_order.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/generativeaiagent/update_agent_details.go b/generativeaiagent/update_agent_details.go index 4136e2d1f6..5117bfbbb2 100644 --- a/generativeaiagent/update_agent_details.go +++ b/generativeaiagent/update_agent_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// UpdateAgentDetails **UpdateAgentDetails** -// The data to update an agent. +// UpdateAgentDetails The data to update an agent. type UpdateAgentDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/generativeaiagent/update_agent_endpoint_details.go b/generativeaiagent/update_agent_endpoint_details.go index 77da636d60..667a9387ec 100644 --- a/generativeaiagent/update_agent_endpoint_details.go +++ b/generativeaiagent/update_agent_endpoint_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// UpdateAgentEndpointDetails **UpdateAgentEndpointDetails** -// The data to update an endpoint. +// UpdateAgentEndpointDetails The data to update an endpoint. type UpdateAgentEndpointDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/generativeaiagent/update_data_source_details.go b/generativeaiagent/update_data_source_details.go index 1378556d8a..bbedc26f0d 100644 --- a/generativeaiagent/update_data_source_details.go +++ b/generativeaiagent/update_data_source_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// UpdateDataSourceDetails **UpdateDataSourceDetails** -// The data to update a data source. +// UpdateDataSourceDetails The data to update a data source. type UpdateDataSourceDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/generativeaiagent/update_knowledge_base_details.go b/generativeaiagent/update_knowledge_base_details.go index 3fdf432527..adc3b944c0 100644 --- a/generativeaiagent/update_knowledge_base_details.go +++ b/generativeaiagent/update_knowledge_base_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// UpdateKnowledgeBaseDetails **UpdateKnowledgeBaseDetails** -// The data to update a knowledge base. +// UpdateKnowledgeBaseDetails The data to update a knowledge base. type UpdateKnowledgeBaseDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/generativeaiagent/work_request.go b/generativeaiagent/work_request.go index d0f3ed91f9..6ab40d8ec6 100644 --- a/generativeaiagent/work_request.go +++ b/generativeaiagent/work_request.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequest **WorkRequest** -// An asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, +// WorkRequest An asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, // the service creates a work request. A work request is an activity log that lets you track each step in the operation's // progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. type WorkRequest struct { diff --git a/generativeaiagent/work_request_error.go b/generativeaiagent/work_request_error.go index 65bd929f30..9ed9bece24 100644 --- a/generativeaiagent/work_request_error.go +++ b/generativeaiagent/work_request_error.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestError **WorkRequestError** -// An error encountered while performing an operation that is tracked by a work request. +// WorkRequestError An error encountered while performing an operation that is tracked by a work request. type WorkRequestError struct { // A machine-usable code for the error that occurred. For a list of error codes, see diff --git a/generativeaiagent/work_request_error_collection.go b/generativeaiagent/work_request_error_collection.go index c1cf0f8ea8..c9ce24c588 100644 --- a/generativeaiagent/work_request_error_collection.go +++ b/generativeaiagent/work_request_error_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestErrorCollection **WorkRequestErrorCollection** -// A list of work request errors. Can contain both errors and other information, such as metadata. +// WorkRequestErrorCollection A list of work request errors. Can contain both errors and other information, such as metadata. type WorkRequestErrorCollection struct { // A list of work request errors. diff --git a/generativeaiagent/work_request_log_entry.go b/generativeaiagent/work_request_log_entry.go index 06cc29763c..81b1e90927 100644 --- a/generativeaiagent/work_request_log_entry.go +++ b/generativeaiagent/work_request_log_entry.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestLogEntry **WorkRequestLogEntry** -// A log message from performing an operation that is tracked by a work request. +// WorkRequestLogEntry A log message from performing an operation that is tracked by a work request. type WorkRequestLogEntry struct { // A human-readable log message. diff --git a/generativeaiagent/work_request_log_entry_collection.go b/generativeaiagent/work_request_log_entry_collection.go index a67c49dc10..9dec3fc782 100644 --- a/generativeaiagent/work_request_log_entry_collection.go +++ b/generativeaiagent/work_request_log_entry_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestLogEntryCollection **WorkRequestLogEntryCollection** -// A list of work request logs. Can contain both logs and other information, such as metadata. +// WorkRequestLogEntryCollection A list of work request logs. Can contain both logs and other information, such as metadata. type WorkRequestLogEntryCollection struct { // A list of work request log entries. diff --git a/generativeaiagent/work_request_resource.go b/generativeaiagent/work_request_resource.go index 9bca2f0f3c..0575c19e5b 100644 --- a/generativeaiagent/work_request_resource.go +++ b/generativeaiagent/work_request_resource.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestResource **WorkRequestResource** -// A resource created or operated on by a work request. +// WorkRequestResource A resource created or operated on by a work request. type WorkRequestResource struct { // The resource type that the work request affects. diff --git a/generativeaiagent/work_request_resource_metadata_key.go b/generativeaiagent/work_request_resource_metadata_key.go index f83421e964..b4033fabc7 100644 --- a/generativeaiagent/work_request_resource_metadata_key.go +++ b/generativeaiagent/work_request_resource_metadata_key.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/generativeaiagent/work_request_summary.go b/generativeaiagent/work_request_summary.go index 737d37d493..bfdfe9e7f2 100644 --- a/generativeaiagent/work_request_summary.go +++ b/generativeaiagent/work_request_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestSummary **WorkRequestSummary** -// Summary information about an asynchronous work request. +// WorkRequestSummary Summary information about an asynchronous work request. type WorkRequestSummary struct { // The asynchronous operation tracked by this work request. diff --git a/generativeaiagent/work_request_summary_collection.go b/generativeaiagent/work_request_summary_collection.go index 2a5049c55e..657748adee 100644 --- a/generativeaiagent/work_request_summary_collection.go +++ b/generativeaiagent/work_request_summary_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestSummaryCollection **WorkRequestSummaryCollection** -// A list of work requests. Can contain both work requests and other information, such as metadata. +// WorkRequestSummaryCollection A list of work requests. Can contain both work requests and other information, such as metadata. type WorkRequestSummaryCollection struct { // A list of work requests. diff --git a/generativeaiagentruntime/chat_details.go b/generativeaiagentruntime/chat_details.go index dd75ca5bf5..b7d0751929 100644 --- a/generativeaiagentruntime/chat_details.go +++ b/generativeaiagentruntime/chat_details.go @@ -19,7 +19,7 @@ import ( "strings" ) -// ChatDetails Chat details. +// ChatDetails Chat details for managing user interactions and tool executions. type ChatDetails struct { // The input user message content for the chat. diff --git a/generativeaiagentruntime/citation.go b/generativeaiagentruntime/citation.go index 44f7d8975c..89f223803f 100644 --- a/generativeaiagentruntime/citation.go +++ b/generativeaiagentruntime/citation.go @@ -27,6 +27,15 @@ type Citation struct { SourceText *string `mandatory:"false" json:"sourceText"` SourceLocation SourceLocation `mandatory:"false" json:"sourceLocation"` + + // The title of the source text, if available. + Title *string `mandatory:"false" json:"title"` + + // The id of the retrieved document, if available. + DocId *string `mandatory:"false" json:"docId"` + + // The page numbers on the retrieved document, if available. + PageNumbers []int `mandatory:"false" json:"pageNumbers"` } func (m Citation) String() string { @@ -50,6 +59,9 @@ func (m *Citation) UnmarshalJSON(data []byte) (e error) { model := struct { SourceText *string `json:"sourceText"` SourceLocation sourcelocation `json:"sourceLocation"` + Title *string `json:"title"` + DocId *string `json:"docId"` + PageNumbers []int `json:"pageNumbers"` }{} e = json.Unmarshal(data, &model) @@ -69,5 +81,11 @@ func (m *Citation) UnmarshalJSON(data []byte) (e error) { m.SourceLocation = nil } + m.Title = model.Title + + m.DocId = model.DocId + + m.PageNumbers = make([]int, len(model.PageNumbers)) + copy(m.PageNumbers, model.PageNumbers) return } diff --git a/generativeaiagentruntime/generativeaiagentruntime_client.go b/generativeaiagentruntime/generativeaiagentruntime_client.go index c8f6ad0fe0..39c5822c05 100644 --- a/generativeaiagentruntime/generativeaiagentruntime_client.go +++ b/generativeaiagentruntime/generativeaiagentruntime_client.go @@ -149,7 +149,7 @@ func (client GenerativeAiAgentRuntimeClient) chat(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/Chat" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/AgentEndpoint/Chat" err = common.PostProcessServiceError(err, "GenerativeAiAgentRuntime", "Chat", apiReferenceLink) return response, err } diff --git a/goldengate/change_pipeline_compartment_details.go b/goldengate/change_pipeline_compartment_details.go new file mode 100644 index 0000000000..96785e188e --- /dev/null +++ b/goldengate/change_pipeline_compartment_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangePipelineCompartmentDetails The new compartment for a Pipeline. +type ChangePipelineCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangePipelineCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangePipelineCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/change_pipeline_compartment_request_response.go b/goldengate/change_pipeline_compartment_request_response.go new file mode 100644 index 0000000000..811b1fa32c --- /dev/null +++ b/goldengate/change_pipeline_compartment_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangePipelineCompartmentRequest wrapper for the ChangePipelineCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ChangePipelineCompartment.go.html to see an example of how to use ChangePipelineCompartmentRequest. +type ChangePipelineCompartmentRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Properties to change the compartment of a Pipeline. + ChangePipelineCompartmentDetails `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 is 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is 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 ChangePipelineCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangePipelineCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangePipelineCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangePipelineCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangePipelineCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangePipelineCompartmentResponse wrapper for the ChangePipelineCompartment operation +type ChangePipelineCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangePipelineCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangePipelineCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/create_mysql_connection_details.go b/goldengate/create_mysql_connection_details.go index 2a98a4a4f5..f2ec7751b3 100644 --- a/goldengate/create_mysql_connection_details.go +++ b/goldengate/create_mysql_connection_details.go @@ -95,7 +95,7 @@ type CreateMysqlConnectionDetails struct { // containing the client public key (for 2-way SSL). SslCert *string `mandatory:"false" json:"sslCert"` - // Client Key – The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). + // Client Key - The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). SslKey *string `mandatory:"false" json:"sslKey"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key diff --git a/goldengate/create_pipeline_details.go b/goldengate/create_pipeline_details.go new file mode 100644 index 0000000000..b45fcf14e8 --- /dev/null +++ b/goldengate/create_pipeline_details.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePipelineDetails Details with which to create a pipeline. +type CreatePipelineDetails interface { + + // An object's Display Name. + GetDisplayName() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + GetCompartmentId() *string + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + GetSourceConnectionDetails() *SourcePipelineConnectionDetails + + GetTargetConnectionDetails() *TargetPipelineConnectionDetails + + // Metadata about this specific object. + GetDescription() *string + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // Locks associated with this resource. + GetLocks() []ResourceLock +} + +type createpipelinedetails struct { + 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"` + Locks []ResourceLock `mandatory:"false" json:"locks"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *createpipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreatepipelinedetails createpipelinedetails + s := struct { + Model Unmarshalercreatepipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.DisplayName = s.Model.DisplayName + m.CompartmentId = s.Model.CompartmentId + m.LicenseModel = s.Model.LicenseModel + m.SourceConnectionDetails = s.Model.SourceConnectionDetails + m.TargetConnectionDetails = s.Model.TargetConnectionDetails + m.Description = s.Model.Description + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.Locks = s.Model.Locks + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createpipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := CreateZeroEtlPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CreatePipelineDetails: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDescription returns Description +func (m createpipelinedetails) GetDescription() *string { + return m.Description +} + +// GetFreeformTags returns FreeformTags +func (m createpipelinedetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m createpipelinedetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetLocks returns Locks +func (m createpipelinedetails) GetLocks() []ResourceLock { + return m.Locks +} + +// GetDisplayName returns DisplayName +func (m createpipelinedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m createpipelinedetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m createpipelinedetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m createpipelinedetails) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m createpipelinedetails) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +func (m createpipelinedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m createpipelinedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/create_pipeline_request_response.go b/goldengate/create_pipeline_request_response.go new file mode 100644 index 0000000000..1e89662a03 --- /dev/null +++ b/goldengate/create_pipeline_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePipelineRequest wrapper for the CreatePipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/CreatePipeline.go.html to see an example of how to use CreatePipelineRequest. +type CreatePipelineRequest struct { + + // Specification of the pipeline to create. + CreatePipelineDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePipelineRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePipelineRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePipelineResponse wrapper for the CreatePipeline operation +type CreatePipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Pipeline instance + Pipeline `presentIn:"body"` + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include 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 CreatePipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/create_zero_etl_pipeline_details.go b/goldengate/create_zero_etl_pipeline_details.go new file mode 100644 index 0000000000..3751a16d87 --- /dev/null +++ b/goldengate/create_zero_etl_pipeline_details.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateZeroEtlPipelineDetails Creation details for a new ZeroETL pipeline. +type CreateZeroEtlPipelineDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + + ProcessOptions *ProcessOptions `mandatory:"false" json:"processOptions"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` +} + +// GetDisplayName returns DisplayName +func (m CreateZeroEtlPipelineDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m CreateZeroEtlPipelineDetails) GetDescription() *string { + return m.Description +} + +// GetCompartmentId returns CompartmentId +func (m CreateZeroEtlPipelineDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m CreateZeroEtlPipelineDetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetFreeformTags returns FreeformTags +func (m CreateZeroEtlPipelineDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateZeroEtlPipelineDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetLocks returns Locks +func (m CreateZeroEtlPipelineDetails) GetLocks() []ResourceLock { + return m.Locks +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m CreateZeroEtlPipelineDetails) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m CreateZeroEtlPipelineDetails) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +func (m CreateZeroEtlPipelineDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateZeroEtlPipelineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateZeroEtlPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateZeroEtlPipelineDetails CreateZeroEtlPipelineDetails + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeCreateZeroEtlPipelineDetails + }{ + "ZERO_ETL", + (MarshalTypeCreateZeroEtlPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/default_start_pipeline_details.go b/goldengate/default_start_pipeline_details.go new file mode 100644 index 0000000000..cbb6eed218 --- /dev/null +++ b/goldengate/default_start_pipeline_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultStartPipelineDetails Attribute details for a default pipeline start. +type DefaultStartPipelineDetails struct { +} + +func (m DefaultStartPipelineDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultStartPipelineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DefaultStartPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDefaultStartPipelineDetails DefaultStartPipelineDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDefaultStartPipelineDetails + }{ + "DEFAULT", + (MarshalTypeDefaultStartPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/default_stop_pipeline_details.go b/goldengate/default_stop_pipeline_details.go new file mode 100644 index 0000000000..a5b11b65cb --- /dev/null +++ b/goldengate/default_stop_pipeline_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultStopPipelineDetails Attribute details for a default pipeline stop. +type DefaultStopPipelineDetails struct { +} + +func (m DefaultStopPipelineDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultStopPipelineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DefaultStopPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDefaultStopPipelineDetails DefaultStopPipelineDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDefaultStopPipelineDetails + }{ + "DEFAULT", + (MarshalTypeDefaultStopPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/default_test_pipeline_connection_details.go b/goldengate/default_test_pipeline_connection_details.go new file mode 100644 index 0000000000..f245a28ad4 --- /dev/null +++ b/goldengate/default_test_pipeline_connection_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultTestPipelineConnectionDetails Additional attribute with which to test the pipeline's connection. The connectionId must be one of the pipeline's assigned connections. +type DefaultTestPipelineConnectionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + ConnectionId *string `mandatory:"true" json:"connectionId"` +} + +func (m DefaultTestPipelineConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultTestPipelineConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DefaultTestPipelineConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDefaultTestPipelineConnectionDetails DefaultTestPipelineConnectionDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDefaultTestPipelineConnectionDetails + }{ + "DEFAULT", + (MarshalTypeDefaultTestPipelineConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/delete_pipeline_request_response.go b/goldengate/delete_pipeline_request_response.go new file mode 100644 index 0000000000..64fd432b81 --- /dev/null +++ b/goldengate/delete_pipeline_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePipelineRequest wrapper for the DeletePipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/DeletePipeline.go.html to see an example of how to use DeletePipelineRequest. +type DeletePipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // 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 is 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePipelineRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePipelineRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePipelineResponse wrapper for the DeletePipeline operation +type DeletePipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/get_pipeline_request_response.go b/goldengate/get_pipeline_request_response.go new file mode 100644 index 0000000000..2c7e769915 --- /dev/null +++ b/goldengate/get_pipeline_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPipelineRequest wrapper for the GetPipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/GetPipeline.go.html to see an example of how to use GetPipelineRequest. +type GetPipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPipelineRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPipelineRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPipelineResponse wrapper for the GetPipeline operation +type GetPipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Pipeline instance + Pipeline `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/goldengate_client.go b/goldengate/goldengate_client.go index 726f0a835a..ce966fe2b7 100644 --- a/goldengate/goldengate_client.go +++ b/goldengate/goldengate_client.go @@ -714,6 +714,72 @@ func (client GoldenGateClient) changeDeploymentCompartment(ctx context.Context, return response, err } +// ChangePipelineCompartment Moves the Pipeline into a different compartment within the same tenancy. When +// provided, If-Match is checked against ETag values of the resource. For information about +// moving resources between compartments, see Moving Resources Between +// Compartments (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ChangePipelineCompartment.go.html to see an example of how to use ChangePipelineCompartment API. +// A default retry strategy applies to this operation ChangePipelineCompartment() +func (client GoldenGateClient) ChangePipelineCompartment(ctx context.Context, request ChangePipelineCompartmentRequest) (response ChangePipelineCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changePipelineCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangePipelineCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangePipelineCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangePipelineCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangePipelineCompartmentResponse") + } + return +} + +// changePipelineCompartment implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) changePipelineCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangePipelineCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ChangePipelineCompartment" + err = common.PostProcessServiceError(err, "GoldenGate", "ChangePipelineCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CollectDeploymentDiagnostic Collects the diagnostic of a Deployment. When provided, If-Match is checked against ETag values of the resource. // // # See also @@ -1219,6 +1285,69 @@ func (client GoldenGateClient) createDeploymentBackup(ctx context.Context, reque return response, err } +// CreatePipeline Creates a new Pipeline. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/CreatePipeline.go.html to see an example of how to use CreatePipeline API. +// A default retry strategy applies to this operation CreatePipeline() +func (client GoldenGateClient) CreatePipeline(ctx context.Context, request CreatePipelineRequest) (response CreatePipelineResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePipelineResponse") + } + return +} + +// createPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) createPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePipelineResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/CreatePipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "CreatePipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &pipeline{}) + return response, err +} + // DeleteCertificate Deletes the certificate from truststore. // // # See also @@ -1568,6 +1697,64 @@ func (client GoldenGateClient) deleteDeploymentBackup(ctx context.Context, reque return response, err } +// DeletePipeline Deletes a Pipeline. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/DeletePipeline.go.html to see an example of how to use DeletePipeline API. +// A default retry strategy applies to this operation DeletePipeline() +func (client GoldenGateClient) DeletePipeline(ctx context.Context, request DeletePipelineRequest) (response DeletePipelineResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePipelineResponse") + } + return +} + +// deletePipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) deletePipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/pipelines/{pipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePipelineResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/DeletePipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "DeletePipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeploymentWalletExists Checks if a wallet is already present in the deployment. When provided, If-Match is checked against ETag values of the resource. // // # See also @@ -2164,6 +2351,64 @@ func (client GoldenGateClient) getDeploymentUpgrade(ctx context.Context, request return response, err } +// GetPipeline Retrieves a Pipeline details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/GetPipeline.go.html to see an example of how to use GetPipeline API. +// A default retry strategy applies to this operation GetPipeline() +func (client GoldenGateClient) GetPipeline(ctx context.Context, request GetPipelineRequest) (response GetPipelineResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPipelineResponse") + } + return +} + +// getPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) getPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPipelineResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/GetPipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "GetPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &pipeline{}) + return response, err +} + // GetWorkRequest Retrieve the WorkRequest identified by the given OCID. // // # See also @@ -2982,13 +3227,13 @@ func (client GoldenGateClient) listMessages(ctx context.Context, request common. return response, err } -// ListTrailFiles Lists the TrailFiles for a deployment. Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// ListPipelineInitializationSteps Retrieves a Pipeline recipe steps and its progress details. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailFiles.go.html to see an example of how to use ListTrailFiles API. -// A default retry strategy applies to this operation ListTrailFiles() -func (client GoldenGateClient) ListTrailFiles(ctx context.Context, request ListTrailFilesRequest) (response ListTrailFilesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineInitializationSteps.go.html to see an example of how to use ListPipelineInitializationSteps API. +// A default retry strategy applies to this operation ListPipelineInitializationSteps() +func (client GoldenGateClient) ListPipelineInitializationSteps(ctx context.Context, request ListPipelineInitializationStepsRequest) (response ListPipelineInitializationStepsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2997,42 +3242,42 @@ func (client GoldenGateClient) ListTrailFiles(ctx context.Context, request ListT if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listTrailFiles, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineInitializationSteps, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListTrailFilesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineInitializationStepsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListTrailFilesResponse{} + response = ListPipelineInitializationStepsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListTrailFilesResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineInitializationStepsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListTrailFilesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineInitializationStepsResponse") } return } -// listTrailFiles implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listTrailFiles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineInitializationSteps implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineInitializationSteps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailFiles", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/initializationSteps", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListTrailFilesResponse + var response ListPipelineInitializationStepsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/TrailFileSummary/ListTrailFiles" - err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailFiles", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineInitializationSteps" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineInitializationSteps", apiReferenceLink) return response, err } @@ -3040,13 +3285,13 @@ func (client GoldenGateClient) listTrailFiles(ctx context.Context, request commo return response, err } -// ListTrailSequences Lists the Trail Sequences for a TrailFile in a given deployment. Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// ListPipelineRunningProcesses Retrieves a Pipeline's running replication process's status like extracts/replicats. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailSequences.go.html to see an example of how to use ListTrailSequences API. -// A default retry strategy applies to this operation ListTrailSequences() -func (client GoldenGateClient) ListTrailSequences(ctx context.Context, request ListTrailSequencesRequest) (response ListTrailSequencesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineRunningProcesses.go.html to see an example of how to use ListPipelineRunningProcesses API. +// A default retry strategy applies to this operation ListPipelineRunningProcesses() +func (client GoldenGateClient) ListPipelineRunningProcesses(ctx context.Context, request ListPipelineRunningProcessesRequest) (response ListPipelineRunningProcessesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3055,42 +3300,42 @@ func (client GoldenGateClient) ListTrailSequences(ctx context.Context, request L if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listTrailSequences, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineRunningProcesses, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListTrailSequencesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineRunningProcessesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListTrailSequencesResponse{} + response = ListPipelineRunningProcessesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListTrailSequencesResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineRunningProcessesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListTrailSequencesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineRunningProcessesResponse") } return } -// listTrailSequences implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listTrailSequences(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineRunningProcesses implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineRunningProcesses(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailSequences", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/runningProcesses", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListTrailSequencesResponse + var response ListPipelineRunningProcessesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/TrailSequenceSummary/ListTrailSequences" - err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailSequences", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineRunningProcesses" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineRunningProcesses", apiReferenceLink) return response, err } @@ -3098,13 +3343,13 @@ func (client GoldenGateClient) listTrailSequences(ctx context.Context, request c return response, err } -// ListWorkRequestErrors Lists work request errors. +// ListPipelineSchemaTables Returns an array of tables under the given schemas of the pipeline for given source and target schemas passed as query params. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. -// A default retry strategy applies to this operation ListWorkRequestErrors() -func (client GoldenGateClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemaTables.go.html to see an example of how to use ListPipelineSchemaTables API. +// A default retry strategy applies to this operation ListPipelineSchemaTables() +func (client GoldenGateClient) ListPipelineSchemaTables(ctx context.Context, request ListPipelineSchemaTablesRequest) (response ListPipelineSchemaTablesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3113,42 +3358,42 @@ func (client GoldenGateClient) ListWorkRequestErrors(ctx context.Context, reques if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineSchemaTables, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineSchemaTablesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestErrorsResponse{} + response = ListPipelineSchemaTablesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineSchemaTablesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineSchemaTablesResponse") } return } -// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineSchemaTables implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineSchemaTables(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/schemaTables", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestErrorsResponse + var response ListPipelineSchemaTablesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequestError/ListWorkRequestErrors" - err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestErrors", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineSchemaTables" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineSchemaTables", apiReferenceLink) return response, err } @@ -3156,13 +3401,13 @@ func (client GoldenGateClient) listWorkRequestErrors(ctx context.Context, reques return response, err } -// ListWorkRequestLogs Lists work request logs. +// ListPipelineSchemas Returns an array of schemas based on mapping rules for a pipeline. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. -// A default retry strategy applies to this operation ListWorkRequestLogs() -func (client GoldenGateClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemas.go.html to see an example of how to use ListPipelineSchemas API. +// A default retry strategy applies to this operation ListPipelineSchemas() +func (client GoldenGateClient) ListPipelineSchemas(ctx context.Context, request ListPipelineSchemasRequest) (response ListPipelineSchemasResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3171,42 +3416,42 @@ func (client GoldenGateClient) ListWorkRequestLogs(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineSchemas, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineSchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestLogsResponse{} + response = ListPipelineSchemasResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineSchemasResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineSchemasResponse") } return } -// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineSchemas implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineSchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/schemas", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestLogsResponse + var response ListPipelineSchemasResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequestLogEntry/ListWorkRequestLogs" - err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestLogs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineSchemas" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineSchemas", apiReferenceLink) return response, err } @@ -3214,13 +3459,13 @@ func (client GoldenGateClient) listWorkRequestLogs(ctx context.Context, request return response, err } -// ListWorkRequests Lists the work requests in the compartment. +// ListPipelines Lists the Pipelines in the compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. -// A default retry strategy applies to this operation ListWorkRequests() -func (client GoldenGateClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelines.go.html to see an example of how to use ListPipelines API. +// A default retry strategy applies to this operation ListPipelines() +func (client GoldenGateClient) ListPipelines(ctx context.Context, request ListPipelinesRequest) (response ListPipelinesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3229,42 +3474,392 @@ func (client GoldenGateClient) ListWorkRequests(ctx context.Context, request Lis if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelines, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestsResponse{} + response = ListPipelinesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelinesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelinesResponse") } return } -// listWorkRequests implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelines implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestsResponse + var response ListPipelinesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequest/ListWorkRequests" - err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequests", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelines" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelines", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRecipes Returns an array of Recipe Summary. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListRecipes.go.html to see an example of how to use ListRecipes API. +// A default retry strategy applies to this operation ListRecipes() +func (client GoldenGateClient) ListRecipes(ctx context.Context, request ListRecipesRequest) (response ListRecipesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listRecipes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListRecipesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListRecipesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListRecipesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRecipesResponse") + } + return +} + +// listRecipes implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listRecipes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/recipes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListRecipesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/RecipeSummaryCollection/ListRecipes" + err = common.PostProcessServiceError(err, "GoldenGate", "ListRecipes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTrailFiles Lists the TrailFiles for a deployment. +// Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailFiles.go.html to see an example of how to use ListTrailFiles API. +// A default retry strategy applies to this operation ListTrailFiles() +func (client GoldenGateClient) ListTrailFiles(ctx context.Context, request ListTrailFilesRequest) (response ListTrailFilesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listTrailFiles, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListTrailFilesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListTrailFilesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListTrailFilesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTrailFilesResponse") + } + return +} + +// listTrailFiles implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listTrailFiles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailFiles", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListTrailFilesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/TrailFileSummary/ListTrailFiles" + err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailFiles", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTrailSequences Lists the Trail Sequences for a TrailFile in a given deployment. +// Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailSequences.go.html to see an example of how to use ListTrailSequences API. +// A default retry strategy applies to this operation ListTrailSequences() +func (client GoldenGateClient) ListTrailSequences(ctx context.Context, request ListTrailSequencesRequest) (response ListTrailSequencesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listTrailSequences, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListTrailSequencesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListTrailSequencesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListTrailSequencesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTrailSequencesResponse") + } + return +} + +// listTrailSequences implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listTrailSequences(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailSequences", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListTrailSequencesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/TrailSequenceSummary/ListTrailSequences" + err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailSequences", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Lists work request errors. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client GoldenGateClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + 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 GoldenGateClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + 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 { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequestError/ListWorkRequestErrors" + err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Lists work request logs. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client GoldenGateClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + 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 GoldenGateClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + 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 { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequestLogEntry/ListWorkRequestLogs" + err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in the compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client GoldenGateClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + 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 GoldenGateClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + 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 { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequest/ListWorkRequests" + err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequests", apiReferenceLink) return response, err } @@ -3819,6 +4414,69 @@ func (client GoldenGateClient) startDeployment(ctx context.Context, request comm return response, err } +// StartPipeline Starts the pipeline for data replication. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StartPipeline.go.html to see an example of how to use StartPipeline API. +// A default retry strategy applies to this operation StartPipeline() +func (client GoldenGateClient) StartPipeline(ctx context.Context, request StartPipelineRequest) (response StartPipelineResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.startPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StartPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StartPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StartPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StartPipelineResponse") + } + return +} + +// startPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) startPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/start", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response StartPipelineResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/StartPipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "StartPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // StopDeployment Stops a Deployment. When provided, If-Match is checked against ETag values of the resource. // // # See also @@ -3882,6 +4540,69 @@ func (client GoldenGateClient) stopDeployment(ctx context.Context, request commo return response, err } +// StopPipeline Stops the pipeline for data replication. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StopPipeline.go.html to see an example of how to use StopPipeline API. +// A default retry strategy applies to this operation StopPipeline() +func (client GoldenGateClient) StopPipeline(ctx context.Context, request StopPipelineRequest) (response StopPipelineResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.stopPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StopPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StopPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StopPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StopPipelineResponse") + } + return +} + +// stopPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) stopPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/stop", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response StopPipelineResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/StopPipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "StopPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // TestConnectionAssignment Tests the connectivity between given GoldenGate deployment and one of the associated database / service. // When provided, If-Match is checked against ETag values of the resource. // @@ -3946,6 +4667,70 @@ func (client GoldenGateClient) testConnectionAssignment(ctx context.Context, req return response, err } +// TestPipelineConnection Tests pipeline connections against pipeline to verify the connectivity. +// When provided, If-Match is checked against ETag values of the resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/TestPipelineConnection.go.html to see an example of how to use TestPipelineConnection API. +// A default retry strategy applies to this operation TestPipelineConnection() +func (client GoldenGateClient) TestPipelineConnection(ctx context.Context, request TestPipelineConnectionRequest) (response TestPipelineConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.testPipelineConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = TestPipelineConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = TestPipelineConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(TestPipelineConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TestPipelineConnectionResponse") + } + return +} + +// testPipelineConnection implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) testPipelineConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/testConnection", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response TestPipelineConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/TestPipelineConnection" + err = common.PostProcessServiceError(err, "GoldenGate", "TestPipelineConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateConnection Updates the Connection. // // # See also @@ -4179,6 +4964,64 @@ func (client GoldenGateClient) updateDeploymentBackup(ctx context.Context, reque return response, err } +// UpdatePipeline Updates the Pipeline. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/UpdatePipeline.go.html to see an example of how to use UpdatePipeline API. +// A default retry strategy applies to this operation UpdatePipeline() +func (client GoldenGateClient) UpdatePipeline(ctx context.Context, request UpdatePipelineRequest) (response UpdatePipelineResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePipelineResponse") + } + return +} + +// updatePipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) updatePipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/pipelines/{pipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdatePipelineResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/UpdatePipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "UpdatePipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpgradeDeployment Upgrade a Deployment. When provided, If-Match is checked against ETag values of the resource. // // # See also diff --git a/goldengate/initial_data_load.go b/goldengate/initial_data_load.go new file mode 100644 index 0000000000..01b0a71431 --- /dev/null +++ b/goldengate/initial_data_load.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InitialDataLoad Options required for the pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. +type InitialDataLoad struct { + + // If ENABLED, then existing source data is also synchronized to the target when creating or updating the pipeline. + IsInitialLoad InitialDataLoadIsInitialLoadEnum `mandatory:"true" json:"isInitialLoad"` + + // Action upon existing tables in target when initial Data Load is set i.e., isInitialLoad=true. + ActionOnExistingTable InitialLoadActionEnum `mandatory:"false" json:"actionOnExistingTable,omitempty"` +} + +func (m InitialDataLoad) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InitialDataLoad) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInitialDataLoadIsInitialLoadEnum(string(m.IsInitialLoad)); !ok && m.IsInitialLoad != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IsInitialLoad: %s. Supported values are: %s.", m.IsInitialLoad, strings.Join(GetInitialDataLoadIsInitialLoadEnumStringValues(), ","))) + } + + if _, ok := GetMappingInitialLoadActionEnum(string(m.ActionOnExistingTable)); !ok && m.ActionOnExistingTable != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionOnExistingTable: %s. Supported values are: %s.", m.ActionOnExistingTable, strings.Join(GetInitialLoadActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InitialDataLoadIsInitialLoadEnum Enum with underlying type: string +type InitialDataLoadIsInitialLoadEnum string + +// Set of constants representing the allowable values for InitialDataLoadIsInitialLoadEnum +const ( + InitialDataLoadIsInitialLoadEnabled InitialDataLoadIsInitialLoadEnum = "ENABLED" + InitialDataLoadIsInitialLoadDisabled InitialDataLoadIsInitialLoadEnum = "DISABLED" +) + +var mappingInitialDataLoadIsInitialLoadEnum = map[string]InitialDataLoadIsInitialLoadEnum{ + "ENABLED": InitialDataLoadIsInitialLoadEnabled, + "DISABLED": InitialDataLoadIsInitialLoadDisabled, +} + +var mappingInitialDataLoadIsInitialLoadEnumLowerCase = map[string]InitialDataLoadIsInitialLoadEnum{ + "enabled": InitialDataLoadIsInitialLoadEnabled, + "disabled": InitialDataLoadIsInitialLoadDisabled, +} + +// GetInitialDataLoadIsInitialLoadEnumValues Enumerates the set of values for InitialDataLoadIsInitialLoadEnum +func GetInitialDataLoadIsInitialLoadEnumValues() []InitialDataLoadIsInitialLoadEnum { + values := make([]InitialDataLoadIsInitialLoadEnum, 0) + for _, v := range mappingInitialDataLoadIsInitialLoadEnum { + values = append(values, v) + } + return values +} + +// GetInitialDataLoadIsInitialLoadEnumStringValues Enumerates the set of values in String for InitialDataLoadIsInitialLoadEnum +func GetInitialDataLoadIsInitialLoadEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingInitialDataLoadIsInitialLoadEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInitialDataLoadIsInitialLoadEnum(val string) (InitialDataLoadIsInitialLoadEnum, bool) { + enum, ok := mappingInitialDataLoadIsInitialLoadEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/initial_load_action.go b/goldengate/initial_load_action.go new file mode 100644 index 0000000000..d9f5320f01 --- /dev/null +++ b/goldengate/initial_load_action.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// InitialLoadActionEnum Enum with underlying type: string +type InitialLoadActionEnum string + +// Set of constants representing the allowable values for InitialLoadActionEnum +const ( + InitialLoadActionTruncate InitialLoadActionEnum = "TRUNCATE" + InitialLoadActionReplace InitialLoadActionEnum = "REPLACE" + InitialLoadActionAppend InitialLoadActionEnum = "APPEND" + InitialLoadActionSkip InitialLoadActionEnum = "SKIP" +) + +var mappingInitialLoadActionEnum = map[string]InitialLoadActionEnum{ + "TRUNCATE": InitialLoadActionTruncate, + "REPLACE": InitialLoadActionReplace, + "APPEND": InitialLoadActionAppend, + "SKIP": InitialLoadActionSkip, +} + +var mappingInitialLoadActionEnumLowerCase = map[string]InitialLoadActionEnum{ + "truncate": InitialLoadActionTruncate, + "replace": InitialLoadActionReplace, + "append": InitialLoadActionAppend, + "skip": InitialLoadActionSkip, +} + +// GetInitialLoadActionEnumValues Enumerates the set of values for InitialLoadActionEnum +func GetInitialLoadActionEnumValues() []InitialLoadActionEnum { + values := make([]InitialLoadActionEnum, 0) + for _, v := range mappingInitialLoadActionEnum { + values = append(values, v) + } + return values +} + +// GetInitialLoadActionEnumStringValues Enumerates the set of values in String for InitialLoadActionEnum +func GetInitialLoadActionEnumStringValues() []string { + return []string{ + "TRUNCATE", + "REPLACE", + "APPEND", + "SKIP", + } +} + +// GetMappingInitialLoadActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInitialLoadActionEnum(val string) (InitialLoadActionEnum, bool) { + enum, ok := mappingInitialLoadActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/list_pipeline_initialization_steps_request_response.go b/goldengate/list_pipeline_initialization_steps_request_response.go new file mode 100644 index 0000000000..d8ce1ee3f4 --- /dev/null +++ b/goldengate/list_pipeline_initialization_steps_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineInitializationStepsRequest wrapper for the ListPipelineInitializationSteps operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineInitializationSteps.go.html to see an example of how to use ListPipelineInitializationStepsRequest. +type ListPipelineInitializationStepsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPipelineInitializationStepsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineInitializationStepsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPipelineInitializationStepsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineInitializationStepsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPipelineInitializationStepsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineInitializationStepsResponse wrapper for the ListPipelineInitializationSteps operation +type ListPipelineInitializationStepsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PipelineInitializationSteps instance + PipelineInitializationSteps `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPipelineInitializationStepsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineInitializationStepsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/list_pipeline_running_processes_request_response.go b/goldengate/list_pipeline_running_processes_request_response.go new file mode 100644 index 0000000000..0845b590c7 --- /dev/null +++ b/goldengate/list_pipeline_running_processes_request_response.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineRunningProcessesRequest wrapper for the ListPipelineRunningProcesses operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineRunningProcesses.go.html to see an example of how to use ListPipelineRunningProcessesRequest. +type ListPipelineRunningProcessesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelineRunningProcessesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelineRunningProcessesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPipelineRunningProcessesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineRunningProcessesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPipelineRunningProcessesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineRunningProcessesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPipelineRunningProcessesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPipelineRunningProcessesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPipelineRunningProcessesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelineRunningProcessesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPipelineRunningProcessesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineRunningProcessesResponse wrapper for the ListPipelineRunningProcesses operation +type ListPipelineRunningProcessesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineRunningProcessCollection instances + PipelineRunningProcessCollection `presentIn:"body"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPipelineRunningProcessesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineRunningProcessesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelineRunningProcessesSortOrderEnum Enum with underlying type: string +type ListPipelineRunningProcessesSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelineRunningProcessesSortOrderEnum +const ( + ListPipelineRunningProcessesSortOrderAsc ListPipelineRunningProcessesSortOrderEnum = "ASC" + ListPipelineRunningProcessesSortOrderDesc ListPipelineRunningProcessesSortOrderEnum = "DESC" +) + +var mappingListPipelineRunningProcessesSortOrderEnum = map[string]ListPipelineRunningProcessesSortOrderEnum{ + "ASC": ListPipelineRunningProcessesSortOrderAsc, + "DESC": ListPipelineRunningProcessesSortOrderDesc, +} + +var mappingListPipelineRunningProcessesSortOrderEnumLowerCase = map[string]ListPipelineRunningProcessesSortOrderEnum{ + "asc": ListPipelineRunningProcessesSortOrderAsc, + "desc": ListPipelineRunningProcessesSortOrderDesc, +} + +// GetListPipelineRunningProcessesSortOrderEnumValues Enumerates the set of values for ListPipelineRunningProcessesSortOrderEnum +func GetListPipelineRunningProcessesSortOrderEnumValues() []ListPipelineRunningProcessesSortOrderEnum { + values := make([]ListPipelineRunningProcessesSortOrderEnum, 0) + for _, v := range mappingListPipelineRunningProcessesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineRunningProcessesSortOrderEnumStringValues Enumerates the set of values in String for ListPipelineRunningProcessesSortOrderEnum +func GetListPipelineRunningProcessesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelineRunningProcessesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineRunningProcessesSortOrderEnum(val string) (ListPipelineRunningProcessesSortOrderEnum, bool) { + enum, ok := mappingListPipelineRunningProcessesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelineRunningProcessesSortByEnum Enum with underlying type: string +type ListPipelineRunningProcessesSortByEnum string + +// Set of constants representing the allowable values for ListPipelineRunningProcessesSortByEnum +const ( + ListPipelineRunningProcessesSortByTimecreated ListPipelineRunningProcessesSortByEnum = "timeCreated" + ListPipelineRunningProcessesSortByDisplayname ListPipelineRunningProcessesSortByEnum = "displayName" +) + +var mappingListPipelineRunningProcessesSortByEnum = map[string]ListPipelineRunningProcessesSortByEnum{ + "timeCreated": ListPipelineRunningProcessesSortByTimecreated, + "displayName": ListPipelineRunningProcessesSortByDisplayname, +} + +var mappingListPipelineRunningProcessesSortByEnumLowerCase = map[string]ListPipelineRunningProcessesSortByEnum{ + "timecreated": ListPipelineRunningProcessesSortByTimecreated, + "displayname": ListPipelineRunningProcessesSortByDisplayname, +} + +// GetListPipelineRunningProcessesSortByEnumValues Enumerates the set of values for ListPipelineRunningProcessesSortByEnum +func GetListPipelineRunningProcessesSortByEnumValues() []ListPipelineRunningProcessesSortByEnum { + values := make([]ListPipelineRunningProcessesSortByEnum, 0) + for _, v := range mappingListPipelineRunningProcessesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineRunningProcessesSortByEnumStringValues Enumerates the set of values in String for ListPipelineRunningProcessesSortByEnum +func GetListPipelineRunningProcessesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelineRunningProcessesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineRunningProcessesSortByEnum(val string) (ListPipelineRunningProcessesSortByEnum, bool) { + enum, ok := mappingListPipelineRunningProcessesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/list_pipeline_schema_tables_request_response.go b/goldengate/list_pipeline_schema_tables_request_response.go new file mode 100644 index 0000000000..f6dc450653 --- /dev/null +++ b/goldengate/list_pipeline_schema_tables_request_response.go @@ -0,0 +1,208 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineSchemaTablesRequest wrapper for the ListPipelineSchemaTables operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemaTables.go.html to see an example of how to use ListPipelineSchemaTablesRequest. +type ListPipelineSchemaTablesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Name of the source schema obtained from get schema endpoint of the created pipeline. + SourceSchemaName *string `mandatory:"true" contributesTo:"query" name:"sourceSchemaName"` + + // Name of the target schema obtained from get schema endpoint of the created pipeline. + TargetSchemaName *string `mandatory:"true" contributesTo:"query" name:"targetSchemaName"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelineSchemaTablesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelineSchemaTablesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" 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 ListPipelineSchemaTablesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineSchemaTablesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPipelineSchemaTablesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineSchemaTablesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPipelineSchemaTablesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPipelineSchemaTablesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPipelineSchemaTablesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelineSchemaTablesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPipelineSchemaTablesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineSchemaTablesResponse wrapper for the ListPipelineSchemaTables operation +type ListPipelineSchemaTablesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineSchemaTableCollection instances + PipelineSchemaTableCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPipelineSchemaTablesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineSchemaTablesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelineSchemaTablesSortOrderEnum Enum with underlying type: string +type ListPipelineSchemaTablesSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelineSchemaTablesSortOrderEnum +const ( + ListPipelineSchemaTablesSortOrderAsc ListPipelineSchemaTablesSortOrderEnum = "ASC" + ListPipelineSchemaTablesSortOrderDesc ListPipelineSchemaTablesSortOrderEnum = "DESC" +) + +var mappingListPipelineSchemaTablesSortOrderEnum = map[string]ListPipelineSchemaTablesSortOrderEnum{ + "ASC": ListPipelineSchemaTablesSortOrderAsc, + "DESC": ListPipelineSchemaTablesSortOrderDesc, +} + +var mappingListPipelineSchemaTablesSortOrderEnumLowerCase = map[string]ListPipelineSchemaTablesSortOrderEnum{ + "asc": ListPipelineSchemaTablesSortOrderAsc, + "desc": ListPipelineSchemaTablesSortOrderDesc, +} + +// GetListPipelineSchemaTablesSortOrderEnumValues Enumerates the set of values for ListPipelineSchemaTablesSortOrderEnum +func GetListPipelineSchemaTablesSortOrderEnumValues() []ListPipelineSchemaTablesSortOrderEnum { + values := make([]ListPipelineSchemaTablesSortOrderEnum, 0) + for _, v := range mappingListPipelineSchemaTablesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemaTablesSortOrderEnumStringValues Enumerates the set of values in String for ListPipelineSchemaTablesSortOrderEnum +func GetListPipelineSchemaTablesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelineSchemaTablesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemaTablesSortOrderEnum(val string) (ListPipelineSchemaTablesSortOrderEnum, bool) { + enum, ok := mappingListPipelineSchemaTablesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelineSchemaTablesSortByEnum Enum with underlying type: string +type ListPipelineSchemaTablesSortByEnum string + +// Set of constants representing the allowable values for ListPipelineSchemaTablesSortByEnum +const ( + ListPipelineSchemaTablesSortByTimecreated ListPipelineSchemaTablesSortByEnum = "timeCreated" + ListPipelineSchemaTablesSortByDisplayname ListPipelineSchemaTablesSortByEnum = "displayName" +) + +var mappingListPipelineSchemaTablesSortByEnum = map[string]ListPipelineSchemaTablesSortByEnum{ + "timeCreated": ListPipelineSchemaTablesSortByTimecreated, + "displayName": ListPipelineSchemaTablesSortByDisplayname, +} + +var mappingListPipelineSchemaTablesSortByEnumLowerCase = map[string]ListPipelineSchemaTablesSortByEnum{ + "timecreated": ListPipelineSchemaTablesSortByTimecreated, + "displayname": ListPipelineSchemaTablesSortByDisplayname, +} + +// GetListPipelineSchemaTablesSortByEnumValues Enumerates the set of values for ListPipelineSchemaTablesSortByEnum +func GetListPipelineSchemaTablesSortByEnumValues() []ListPipelineSchemaTablesSortByEnum { + values := make([]ListPipelineSchemaTablesSortByEnum, 0) + for _, v := range mappingListPipelineSchemaTablesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemaTablesSortByEnumStringValues Enumerates the set of values in String for ListPipelineSchemaTablesSortByEnum +func GetListPipelineSchemaTablesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelineSchemaTablesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemaTablesSortByEnum(val string) (ListPipelineSchemaTablesSortByEnum, bool) { + enum, ok := mappingListPipelineSchemaTablesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/list_pipeline_schemas_request_response.go b/goldengate/list_pipeline_schemas_request_response.go new file mode 100644 index 0000000000..35519ca45c --- /dev/null +++ b/goldengate/list_pipeline_schemas_request_response.go @@ -0,0 +1,202 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineSchemasRequest wrapper for the ListPipelineSchemas operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemas.go.html to see an example of how to use ListPipelineSchemasRequest. +type ListPipelineSchemasRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelineSchemasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelineSchemasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" 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 ListPipelineSchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineSchemasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPipelineSchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineSchemasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPipelineSchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPipelineSchemasSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPipelineSchemasSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelineSchemasSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPipelineSchemasSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineSchemasResponse wrapper for the ListPipelineSchemas operation +type ListPipelineSchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineSchemaCollection instances + PipelineSchemaCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPipelineSchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineSchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelineSchemasSortOrderEnum Enum with underlying type: string +type ListPipelineSchemasSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelineSchemasSortOrderEnum +const ( + ListPipelineSchemasSortOrderAsc ListPipelineSchemasSortOrderEnum = "ASC" + ListPipelineSchemasSortOrderDesc ListPipelineSchemasSortOrderEnum = "DESC" +) + +var mappingListPipelineSchemasSortOrderEnum = map[string]ListPipelineSchemasSortOrderEnum{ + "ASC": ListPipelineSchemasSortOrderAsc, + "DESC": ListPipelineSchemasSortOrderDesc, +} + +var mappingListPipelineSchemasSortOrderEnumLowerCase = map[string]ListPipelineSchemasSortOrderEnum{ + "asc": ListPipelineSchemasSortOrderAsc, + "desc": ListPipelineSchemasSortOrderDesc, +} + +// GetListPipelineSchemasSortOrderEnumValues Enumerates the set of values for ListPipelineSchemasSortOrderEnum +func GetListPipelineSchemasSortOrderEnumValues() []ListPipelineSchemasSortOrderEnum { + values := make([]ListPipelineSchemasSortOrderEnum, 0) + for _, v := range mappingListPipelineSchemasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemasSortOrderEnumStringValues Enumerates the set of values in String for ListPipelineSchemasSortOrderEnum +func GetListPipelineSchemasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelineSchemasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemasSortOrderEnum(val string) (ListPipelineSchemasSortOrderEnum, bool) { + enum, ok := mappingListPipelineSchemasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelineSchemasSortByEnum Enum with underlying type: string +type ListPipelineSchemasSortByEnum string + +// Set of constants representing the allowable values for ListPipelineSchemasSortByEnum +const ( + ListPipelineSchemasSortByTimecreated ListPipelineSchemasSortByEnum = "timeCreated" + ListPipelineSchemasSortByDisplayname ListPipelineSchemasSortByEnum = "displayName" +) + +var mappingListPipelineSchemasSortByEnum = map[string]ListPipelineSchemasSortByEnum{ + "timeCreated": ListPipelineSchemasSortByTimecreated, + "displayName": ListPipelineSchemasSortByDisplayname, +} + +var mappingListPipelineSchemasSortByEnumLowerCase = map[string]ListPipelineSchemasSortByEnum{ + "timecreated": ListPipelineSchemasSortByTimecreated, + "displayname": ListPipelineSchemasSortByDisplayname, +} + +// GetListPipelineSchemasSortByEnumValues Enumerates the set of values for ListPipelineSchemasSortByEnum +func GetListPipelineSchemasSortByEnumValues() []ListPipelineSchemasSortByEnum { + values := make([]ListPipelineSchemasSortByEnum, 0) + for _, v := range mappingListPipelineSchemasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemasSortByEnumStringValues Enumerates the set of values in String for ListPipelineSchemasSortByEnum +func GetListPipelineSchemasSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelineSchemasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemasSortByEnum(val string) (ListPipelineSchemasSortByEnum, bool) { + enum, ok := mappingListPipelineSchemasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/list_pipelines_request_response.go b/goldengate/list_pipelines_request_response.go new file mode 100644 index 0000000000..d694329f77 --- /dev/null +++ b/goldengate/list_pipelines_request_response.go @@ -0,0 +1,271 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelinesRequest wrapper for the ListPipelines operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelines.go.html to see an example of how to use ListPipelinesRequest. +type ListPipelinesRequest struct { + + // The OCID of the compartment that contains the work request. Work requests should be scoped + // to the same compartment as the resource the work request affects. If the work request concerns + // multiple resources, and those resources are not in the same compartment, it is up to the service team + // to pick the primary resource whose compartment should be used. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filtered list of pipelines to return for a given lifecycleState. + LifecycleState PipelineLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filtered list of pipelines to return for a given lifecycleSubState. + LifecycleSubState ListPipelinesLifecycleSubStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleSubState" omitEmpty:"true"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelinesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelinesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPipelinesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelinesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPipelinesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelinesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPipelinesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPipelineLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelinesLifecycleSubStateEnum(string(request.LifecycleSubState)); !ok && request.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", request.LifecycleSubState, strings.Join(GetListPipelinesLifecycleSubStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelinesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPipelinesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelinesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPipelinesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelinesResponse wrapper for the ListPipelines operation +type ListPipelinesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineCollection instances + PipelineCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPipelinesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelinesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelinesLifecycleSubStateEnum Enum with underlying type: string +type ListPipelinesLifecycleSubStateEnum string + +// Set of constants representing the allowable values for ListPipelinesLifecycleSubStateEnum +const ( + ListPipelinesLifecycleSubStateStarting ListPipelinesLifecycleSubStateEnum = "STARTING" + ListPipelinesLifecycleSubStateStopping ListPipelinesLifecycleSubStateEnum = "STOPPING" + ListPipelinesLifecycleSubStateStopped ListPipelinesLifecycleSubStateEnum = "STOPPED" + ListPipelinesLifecycleSubStateMoving ListPipelinesLifecycleSubStateEnum = "MOVING" + ListPipelinesLifecycleSubStateRunning ListPipelinesLifecycleSubStateEnum = "RUNNING" +) + +var mappingListPipelinesLifecycleSubStateEnum = map[string]ListPipelinesLifecycleSubStateEnum{ + "STARTING": ListPipelinesLifecycleSubStateStarting, + "STOPPING": ListPipelinesLifecycleSubStateStopping, + "STOPPED": ListPipelinesLifecycleSubStateStopped, + "MOVING": ListPipelinesLifecycleSubStateMoving, + "RUNNING": ListPipelinesLifecycleSubStateRunning, +} + +var mappingListPipelinesLifecycleSubStateEnumLowerCase = map[string]ListPipelinesLifecycleSubStateEnum{ + "starting": ListPipelinesLifecycleSubStateStarting, + "stopping": ListPipelinesLifecycleSubStateStopping, + "stopped": ListPipelinesLifecycleSubStateStopped, + "moving": ListPipelinesLifecycleSubStateMoving, + "running": ListPipelinesLifecycleSubStateRunning, +} + +// GetListPipelinesLifecycleSubStateEnumValues Enumerates the set of values for ListPipelinesLifecycleSubStateEnum +func GetListPipelinesLifecycleSubStateEnumValues() []ListPipelinesLifecycleSubStateEnum { + values := make([]ListPipelinesLifecycleSubStateEnum, 0) + for _, v := range mappingListPipelinesLifecycleSubStateEnum { + values = append(values, v) + } + return values +} + +// GetListPipelinesLifecycleSubStateEnumStringValues Enumerates the set of values in String for ListPipelinesLifecycleSubStateEnum +func GetListPipelinesLifecycleSubStateEnumStringValues() []string { + return []string{ + "STARTING", + "STOPPING", + "STOPPED", + "MOVING", + "RUNNING", + } +} + +// GetMappingListPipelinesLifecycleSubStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelinesLifecycleSubStateEnum(val string) (ListPipelinesLifecycleSubStateEnum, bool) { + enum, ok := mappingListPipelinesLifecycleSubStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelinesSortOrderEnum Enum with underlying type: string +type ListPipelinesSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelinesSortOrderEnum +const ( + ListPipelinesSortOrderAsc ListPipelinesSortOrderEnum = "ASC" + ListPipelinesSortOrderDesc ListPipelinesSortOrderEnum = "DESC" +) + +var mappingListPipelinesSortOrderEnum = map[string]ListPipelinesSortOrderEnum{ + "ASC": ListPipelinesSortOrderAsc, + "DESC": ListPipelinesSortOrderDesc, +} + +var mappingListPipelinesSortOrderEnumLowerCase = map[string]ListPipelinesSortOrderEnum{ + "asc": ListPipelinesSortOrderAsc, + "desc": ListPipelinesSortOrderDesc, +} + +// GetListPipelinesSortOrderEnumValues Enumerates the set of values for ListPipelinesSortOrderEnum +func GetListPipelinesSortOrderEnumValues() []ListPipelinesSortOrderEnum { + values := make([]ListPipelinesSortOrderEnum, 0) + for _, v := range mappingListPipelinesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelinesSortOrderEnumStringValues Enumerates the set of values in String for ListPipelinesSortOrderEnum +func GetListPipelinesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelinesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelinesSortOrderEnum(val string) (ListPipelinesSortOrderEnum, bool) { + enum, ok := mappingListPipelinesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelinesSortByEnum Enum with underlying type: string +type ListPipelinesSortByEnum string + +// Set of constants representing the allowable values for ListPipelinesSortByEnum +const ( + ListPipelinesSortByTimecreated ListPipelinesSortByEnum = "timeCreated" + ListPipelinesSortByDisplayname ListPipelinesSortByEnum = "displayName" +) + +var mappingListPipelinesSortByEnum = map[string]ListPipelinesSortByEnum{ + "timeCreated": ListPipelinesSortByTimecreated, + "displayName": ListPipelinesSortByDisplayname, +} + +var mappingListPipelinesSortByEnumLowerCase = map[string]ListPipelinesSortByEnum{ + "timecreated": ListPipelinesSortByTimecreated, + "displayname": ListPipelinesSortByDisplayname, +} + +// GetListPipelinesSortByEnumValues Enumerates the set of values for ListPipelinesSortByEnum +func GetListPipelinesSortByEnumValues() []ListPipelinesSortByEnum { + values := make([]ListPipelinesSortByEnum, 0) + for _, v := range mappingListPipelinesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelinesSortByEnumStringValues Enumerates the set of values in String for ListPipelinesSortByEnum +func GetListPipelinesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelinesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelinesSortByEnum(val string) (ListPipelinesSortByEnum, bool) { + enum, ok := mappingListPipelinesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/list_recipes_request_response.go b/goldengate/list_recipes_request_response.go new file mode 100644 index 0000000000..b609a58a35 --- /dev/null +++ b/goldengate/list_recipes_request_response.go @@ -0,0 +1,249 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRecipesRequest wrapper for the ListRecipes operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListRecipes.go.html to see an example of how to use ListRecipesRequest. +type ListRecipesRequest struct { + + // The OCID of the compartment that contains the work request. Work requests should be scoped + // to the same compartment as the resource the work request affects. If the work request concerns + // multiple resources, and those resources are not in the same compartment, it is up to the service team + // to pick the primary resource whose compartment should be used. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The pipeline's recipe type. The default value is ZERO_ETL. + RecipeType ListRecipesRecipeTypeEnum `mandatory:"false" contributesTo:"query" name:"recipeType" omitEmpty:"true"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListRecipesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListRecipesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" 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 ListRecipesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRecipesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListRecipesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRecipesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListRecipesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListRecipesRecipeTypeEnum(string(request.RecipeType)); !ok && request.RecipeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecipeType: %s. Supported values are: %s.", request.RecipeType, strings.Join(GetListRecipesRecipeTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListRecipesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListRecipesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListRecipesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListRecipesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRecipesResponse wrapper for the ListRecipes operation +type ListRecipesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RecipeSummaryCollection instances + RecipeSummaryCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListRecipesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRecipesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListRecipesRecipeTypeEnum Enum with underlying type: string +type ListRecipesRecipeTypeEnum string + +// Set of constants representing the allowable values for ListRecipesRecipeTypeEnum +const ( + ListRecipesRecipeTypeZeroEtl ListRecipesRecipeTypeEnum = "ZERO_ETL" +) + +var mappingListRecipesRecipeTypeEnum = map[string]ListRecipesRecipeTypeEnum{ + "ZERO_ETL": ListRecipesRecipeTypeZeroEtl, +} + +var mappingListRecipesRecipeTypeEnumLowerCase = map[string]ListRecipesRecipeTypeEnum{ + "zero_etl": ListRecipesRecipeTypeZeroEtl, +} + +// GetListRecipesRecipeTypeEnumValues Enumerates the set of values for ListRecipesRecipeTypeEnum +func GetListRecipesRecipeTypeEnumValues() []ListRecipesRecipeTypeEnum { + values := make([]ListRecipesRecipeTypeEnum, 0) + for _, v := range mappingListRecipesRecipeTypeEnum { + values = append(values, v) + } + return values +} + +// GetListRecipesRecipeTypeEnumStringValues Enumerates the set of values in String for ListRecipesRecipeTypeEnum +func GetListRecipesRecipeTypeEnumStringValues() []string { + return []string{ + "ZERO_ETL", + } +} + +// GetMappingListRecipesRecipeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRecipesRecipeTypeEnum(val string) (ListRecipesRecipeTypeEnum, bool) { + enum, ok := mappingListRecipesRecipeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRecipesSortOrderEnum Enum with underlying type: string +type ListRecipesSortOrderEnum string + +// Set of constants representing the allowable values for ListRecipesSortOrderEnum +const ( + ListRecipesSortOrderAsc ListRecipesSortOrderEnum = "ASC" + ListRecipesSortOrderDesc ListRecipesSortOrderEnum = "DESC" +) + +var mappingListRecipesSortOrderEnum = map[string]ListRecipesSortOrderEnum{ + "ASC": ListRecipesSortOrderAsc, + "DESC": ListRecipesSortOrderDesc, +} + +var mappingListRecipesSortOrderEnumLowerCase = map[string]ListRecipesSortOrderEnum{ + "asc": ListRecipesSortOrderAsc, + "desc": ListRecipesSortOrderDesc, +} + +// GetListRecipesSortOrderEnumValues Enumerates the set of values for ListRecipesSortOrderEnum +func GetListRecipesSortOrderEnumValues() []ListRecipesSortOrderEnum { + values := make([]ListRecipesSortOrderEnum, 0) + for _, v := range mappingListRecipesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListRecipesSortOrderEnumStringValues Enumerates the set of values in String for ListRecipesSortOrderEnum +func GetListRecipesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListRecipesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRecipesSortOrderEnum(val string) (ListRecipesSortOrderEnum, bool) { + enum, ok := mappingListRecipesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRecipesSortByEnum Enum with underlying type: string +type ListRecipesSortByEnum string + +// Set of constants representing the allowable values for ListRecipesSortByEnum +const ( + ListRecipesSortByTimecreated ListRecipesSortByEnum = "timeCreated" + ListRecipesSortByDisplayname ListRecipesSortByEnum = "displayName" +) + +var mappingListRecipesSortByEnum = map[string]ListRecipesSortByEnum{ + "timeCreated": ListRecipesSortByTimecreated, + "displayName": ListRecipesSortByDisplayname, +} + +var mappingListRecipesSortByEnumLowerCase = map[string]ListRecipesSortByEnum{ + "timecreated": ListRecipesSortByTimecreated, + "displayname": ListRecipesSortByDisplayname, +} + +// GetListRecipesSortByEnumValues Enumerates the set of values for ListRecipesSortByEnum +func GetListRecipesSortByEnumValues() []ListRecipesSortByEnum { + values := make([]ListRecipesSortByEnum, 0) + for _, v := range mappingListRecipesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListRecipesSortByEnumStringValues Enumerates the set of values in String for ListRecipesSortByEnum +func GetListRecipesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListRecipesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRecipesSortByEnum(val string) (ListRecipesSortByEnum, bool) { + enum, ok := mappingListRecipesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/mapping_rule.go b/goldengate/mapping_rule.go new file mode 100644 index 0000000000..4d6003ed41 --- /dev/null +++ b/goldengate/mapping_rule.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MappingRule Mapping rule for source and target schemas for the pipeline data replication. +// For example: +// "{mappingType: INCLUDE, source: HR.*, target: HR.*}" for rule "Include HR.*" which will include all the tables under HR schema. +type MappingRule struct { + + // Defines the exclude/include rules of source and target schemas and tables when replicating from source to target. This option applies when creating and updating a pipeline. + MappingType MappingTypeEnum `mandatory:"true" json:"mappingType"` + + // The source schema/table combination for replication to target. + Source *string `mandatory:"true" json:"source"` + + // The target schema/table combination for replication from the source. + Target *string `mandatory:"false" json:"target"` +} + +func (m MappingRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MappingRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMappingTypeEnum(string(m.MappingType)); !ok && m.MappingType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MappingType: %s. Supported values are: %s.", m.MappingType, strings.Join(GetMappingTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/mapping_type.go b/goldengate/mapping_type.go new file mode 100644 index 0000000000..0149cd7bbf --- /dev/null +++ b/goldengate/mapping_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// MappingTypeEnum Enum with underlying type: string +type MappingTypeEnum string + +// Set of constants representing the allowable values for MappingTypeEnum +const ( + MappingTypeInclude MappingTypeEnum = "INCLUDE" + MappingTypeExclude MappingTypeEnum = "EXCLUDE" +) + +var mappingMappingTypeEnum = map[string]MappingTypeEnum{ + "INCLUDE": MappingTypeInclude, + "EXCLUDE": MappingTypeExclude, +} + +var mappingMappingTypeEnumLowerCase = map[string]MappingTypeEnum{ + "include": MappingTypeInclude, + "exclude": MappingTypeExclude, +} + +// GetMappingTypeEnumValues Enumerates the set of values for MappingTypeEnum +func GetMappingTypeEnumValues() []MappingTypeEnum { + values := make([]MappingTypeEnum, 0) + for _, v := range mappingMappingTypeEnum { + values = append(values, v) + } + return values +} + +// GetMappingTypeEnumStringValues Enumerates the set of values in String for MappingTypeEnum +func GetMappingTypeEnumStringValues() []string { + return []string{ + "INCLUDE", + "EXCLUDE", + } +} + +// GetMappingMappingTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMappingTypeEnum(val string) (MappingTypeEnum, bool) { + enum, ok := mappingMappingTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/operation_type.go b/goldengate/operation_type.go index 66baa21b7c..3ab3342a90 100644 --- a/goldengate/operation_type.go +++ b/goldengate/operation_type.go @@ -50,6 +50,12 @@ const ( OperationTypeGoldengateDeploymentUpgradeSnooze OperationTypeEnum = "GOLDENGATE_DEPLOYMENT_UPGRADE_SNOOZE" OperationTypeGoldengateDeploymentCertificateCreate OperationTypeEnum = "GOLDENGATE_DEPLOYMENT_CERTIFICATE_CREATE" OperationTypeGoldengateDeploymentCertificateDelete OperationTypeEnum = "GOLDENGATE_DEPLOYMENT_CERTIFICATE_DELETE" + OperationTypeGoldengatePipelineCreate OperationTypeEnum = "GOLDENGATE_PIPELINE_CREATE" + OperationTypeGoldengatePipelineStart OperationTypeEnum = "GOLDENGATE_PIPELINE_START" + OperationTypeGoldengatePipelineStop OperationTypeEnum = "GOLDENGATE_PIPELINE_STOP" + OperationTypeGoldengatePipelineUpdate OperationTypeEnum = "GOLDENGATE_PIPELINE_UPDATE" + OperationTypeGoldengatePipelineDelete OperationTypeEnum = "GOLDENGATE_PIPELINE_DELETE" + OperationTypeGoldengatePipelineMove OperationTypeEnum = "GOLDENGATE_PIPELINE_MOVE" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -85,6 +91,12 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "GOLDENGATE_DEPLOYMENT_UPGRADE_SNOOZE": OperationTypeGoldengateDeploymentUpgradeSnooze, "GOLDENGATE_DEPLOYMENT_CERTIFICATE_CREATE": OperationTypeGoldengateDeploymentCertificateCreate, "GOLDENGATE_DEPLOYMENT_CERTIFICATE_DELETE": OperationTypeGoldengateDeploymentCertificateDelete, + "GOLDENGATE_PIPELINE_CREATE": OperationTypeGoldengatePipelineCreate, + "GOLDENGATE_PIPELINE_START": OperationTypeGoldengatePipelineStart, + "GOLDENGATE_PIPELINE_STOP": OperationTypeGoldengatePipelineStop, + "GOLDENGATE_PIPELINE_UPDATE": OperationTypeGoldengatePipelineUpdate, + "GOLDENGATE_PIPELINE_DELETE": OperationTypeGoldengatePipelineDelete, + "GOLDENGATE_PIPELINE_MOVE": OperationTypeGoldengatePipelineMove, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -120,6 +132,12 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "goldengate_deployment_upgrade_snooze": OperationTypeGoldengateDeploymentUpgradeSnooze, "goldengate_deployment_certificate_create": OperationTypeGoldengateDeploymentCertificateCreate, "goldengate_deployment_certificate_delete": OperationTypeGoldengateDeploymentCertificateDelete, + "goldengate_pipeline_create": OperationTypeGoldengatePipelineCreate, + "goldengate_pipeline_start": OperationTypeGoldengatePipelineStart, + "goldengate_pipeline_stop": OperationTypeGoldengatePipelineStop, + "goldengate_pipeline_update": OperationTypeGoldengatePipelineUpdate, + "goldengate_pipeline_delete": OperationTypeGoldengatePipelineDelete, + "goldengate_pipeline_move": OperationTypeGoldengatePipelineMove, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -166,6 +184,12 @@ func GetOperationTypeEnumStringValues() []string { "GOLDENGATE_DEPLOYMENT_UPGRADE_SNOOZE", "GOLDENGATE_DEPLOYMENT_CERTIFICATE_CREATE", "GOLDENGATE_DEPLOYMENT_CERTIFICATE_DELETE", + "GOLDENGATE_PIPELINE_CREATE", + "GOLDENGATE_PIPELINE_START", + "GOLDENGATE_PIPELINE_STOP", + "GOLDENGATE_PIPELINE_UPDATE", + "GOLDENGATE_PIPELINE_DELETE", + "GOLDENGATE_PIPELINE_MOVE", } } diff --git a/goldengate/pipeline.go b/goldengate/pipeline.go new file mode 100644 index 0000000000..ea5dd12200 --- /dev/null +++ b/goldengate/pipeline.go @@ -0,0 +1,335 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Pipeline Represents the metadata details of a pipeline in the same compartment. +type Pipeline interface { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + GetId() *string + + // An object's Display Name. + GetDisplayName() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + GetCompartmentId() *string + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + // The Minimum number of OCPUs to be made available for this Deployment. + GetCpuCoreCount() *int + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + GetIsAutoScalingEnabled() *bool + + GetSourceConnectionDetails() *SourcePipelineConnectionDetails + + GetTargetConnectionDetails() *TargetPipelineConnectionDetails + + // Lifecycle state of the pipeline. + GetLifecycleState() PipelineLifecycleStateEnum + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeCreated() *common.SDKTime + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeUpdated() *common.SDKTime + + // Metadata about this specific object. + GetDescription() *string + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + GetSystemTags() map[string]map[string]interface{} + + // Locks associated with this resource. + GetLocks() []ResourceLock + + // Possible lifecycle substates when retrieving a pipeline. + GetLifecycleSubState() PipelineLifecycleSubStateEnum + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + GetLifecycleDetails() *string +} + +type pipeline struct { + 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"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + Locks []ResourceLock `mandatory:"false" json:"locks"` + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *pipeline) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpipeline pipeline + s := struct { + Model Unmarshalerpipeline + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.DisplayName = s.Model.DisplayName + m.CompartmentId = s.Model.CompartmentId + m.LicenseModel = s.Model.LicenseModel + m.CpuCoreCount = s.Model.CpuCoreCount + m.IsAutoScalingEnabled = s.Model.IsAutoScalingEnabled + m.SourceConnectionDetails = s.Model.SourceConnectionDetails + m.TargetConnectionDetails = s.Model.TargetConnectionDetails + m.LifecycleState = s.Model.LifecycleState + m.TimeCreated = s.Model.TimeCreated + m.TimeUpdated = s.Model.TimeUpdated + m.Description = s.Model.Description + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.SystemTags = s.Model.SystemTags + m.Locks = s.Model.Locks + m.LifecycleSubState = s.Model.LifecycleSubState + m.LifecycleDetails = s.Model.LifecycleDetails + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *pipeline) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := ZeroEtlPipeline{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for Pipeline: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDescription returns Description +func (m pipeline) GetDescription() *string { + return m.Description +} + +// GetFreeformTags returns FreeformTags +func (m pipeline) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m pipeline) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m pipeline) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m pipeline) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleSubState returns LifecycleSubState +func (m pipeline) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m pipeline) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id +func (m pipeline) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m pipeline) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m pipeline) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m pipeline) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m pipeline) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m pipeline) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m pipeline) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m pipeline) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetLifecycleState returns LifecycleState +func (m pipeline) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m pipeline) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m pipeline) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m pipeline) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m pipeline) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PipelineLifecycleStateEnum Enum with underlying type: string +type PipelineLifecycleStateEnum string + +// Set of constants representing the allowable values for PipelineLifecycleStateEnum +const ( + PipelineLifecycleStateCreating PipelineLifecycleStateEnum = "CREATING" + PipelineLifecycleStateUpdating PipelineLifecycleStateEnum = "UPDATING" + PipelineLifecycleStateActive PipelineLifecycleStateEnum = "ACTIVE" + PipelineLifecycleStateNeedsAttention PipelineLifecycleStateEnum = "NEEDS_ATTENTION" + PipelineLifecycleStateDeleting PipelineLifecycleStateEnum = "DELETING" + PipelineLifecycleStateDeleted PipelineLifecycleStateEnum = "DELETED" + PipelineLifecycleStateFailed PipelineLifecycleStateEnum = "FAILED" +) + +var mappingPipelineLifecycleStateEnum = map[string]PipelineLifecycleStateEnum{ + "CREATING": PipelineLifecycleStateCreating, + "UPDATING": PipelineLifecycleStateUpdating, + "ACTIVE": PipelineLifecycleStateActive, + "NEEDS_ATTENTION": PipelineLifecycleStateNeedsAttention, + "DELETING": PipelineLifecycleStateDeleting, + "DELETED": PipelineLifecycleStateDeleted, + "FAILED": PipelineLifecycleStateFailed, +} + +var mappingPipelineLifecycleStateEnumLowerCase = map[string]PipelineLifecycleStateEnum{ + "creating": PipelineLifecycleStateCreating, + "updating": PipelineLifecycleStateUpdating, + "active": PipelineLifecycleStateActive, + "needs_attention": PipelineLifecycleStateNeedsAttention, + "deleting": PipelineLifecycleStateDeleting, + "deleted": PipelineLifecycleStateDeleted, + "failed": PipelineLifecycleStateFailed, +} + +// GetPipelineLifecycleStateEnumValues Enumerates the set of values for PipelineLifecycleStateEnum +func GetPipelineLifecycleStateEnumValues() []PipelineLifecycleStateEnum { + values := make([]PipelineLifecycleStateEnum, 0) + for _, v := range mappingPipelineLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPipelineLifecycleStateEnumStringValues Enumerates the set of values in String for PipelineLifecycleStateEnum +func GetPipelineLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "NEEDS_ATTENTION", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingPipelineLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPipelineLifecycleStateEnum(val string) (PipelineLifecycleStateEnum, bool) { + enum, ok := mappingPipelineLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/pipeline_collection.go b/goldengate/pipeline_collection.go new file mode 100644 index 0000000000..2ab568b7fa --- /dev/null +++ b/goldengate/pipeline_collection.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineCollection List of pipeline summary objects. +type PipelineCollection struct { + + // An array of Pipeline summaries. + Items []PipelineSummary `mandatory:"true" json:"items"` +} + +func (m PipelineCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PipelineCollection) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []pipelinesummary `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]PipelineSummary, len(model.Items)) + for i, n := range model.Items { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Items[i] = nn.(PipelineSummary) + } else { + m.Items[i] = nil + } + } + return +} diff --git a/goldengate/pipeline_initialization_step.go b/goldengate/pipeline_initialization_step.go new file mode 100644 index 0000000000..a58e10dfbd --- /dev/null +++ b/goldengate/pipeline_initialization_step.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineInitializationStep The step and its progress based on the recipe type. +type PipelineInitializationStep struct { + + // An object's Display Name. + Name *string `mandatory:"true" json:"name"` + + // Status of the steps in a recipe. This option applies during pipeline initialization. + Status StepStatusTypeEnum `mandatory:"true" json:"status"` + + // Shows the percentage complete of each recipe step during pipeline initialization. + PercentComplete *int `mandatory:"true" json:"percentComplete"` + + // The date and time the request was started. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` + + // The date and time the request was finished. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeFinished *common.SDKTime `mandatory:"true" json:"timeFinished"` + + // The list of messages for each step while running. + Messages []StepMessage `mandatory:"false" json:"messages"` +} + +func (m PipelineInitializationStep) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineInitializationStep) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingStepStatusTypeEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetStepStatusTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_initialization_steps.go b/goldengate/pipeline_initialization_steps.go new file mode 100644 index 0000000000..236722dcd0 --- /dev/null +++ b/goldengate/pipeline_initialization_steps.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineInitializationSteps The steps and their progress, based on the recipe type. +type PipelineInitializationSteps struct { + + // The sequence of pipeline steps based on the recipe type. + Items []PipelineInitializationStep `mandatory:"true" json:"items"` +} + +func (m PipelineInitializationSteps) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineInitializationSteps) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_lifecycle_sub_state.go b/goldengate/pipeline_lifecycle_sub_state.go new file mode 100644 index 0000000000..05bb6e02cc --- /dev/null +++ b/goldengate/pipeline_lifecycle_sub_state.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// PipelineLifecycleSubStateEnum Enum with underlying type: string +type PipelineLifecycleSubStateEnum string + +// Set of constants representing the allowable values for PipelineLifecycleSubStateEnum +const ( + PipelineLifecycleSubStateStarting PipelineLifecycleSubStateEnum = "STARTING" + PipelineLifecycleSubStateStopping PipelineLifecycleSubStateEnum = "STOPPING" + PipelineLifecycleSubStateStopped PipelineLifecycleSubStateEnum = "STOPPED" + PipelineLifecycleSubStateMoving PipelineLifecycleSubStateEnum = "MOVING" + PipelineLifecycleSubStateRunning PipelineLifecycleSubStateEnum = "RUNNING" +) + +var mappingPipelineLifecycleSubStateEnum = map[string]PipelineLifecycleSubStateEnum{ + "STARTING": PipelineLifecycleSubStateStarting, + "STOPPING": PipelineLifecycleSubStateStopping, + "STOPPED": PipelineLifecycleSubStateStopped, + "MOVING": PipelineLifecycleSubStateMoving, + "RUNNING": PipelineLifecycleSubStateRunning, +} + +var mappingPipelineLifecycleSubStateEnumLowerCase = map[string]PipelineLifecycleSubStateEnum{ + "starting": PipelineLifecycleSubStateStarting, + "stopping": PipelineLifecycleSubStateStopping, + "stopped": PipelineLifecycleSubStateStopped, + "moving": PipelineLifecycleSubStateMoving, + "running": PipelineLifecycleSubStateRunning, +} + +// GetPipelineLifecycleSubStateEnumValues Enumerates the set of values for PipelineLifecycleSubStateEnum +func GetPipelineLifecycleSubStateEnumValues() []PipelineLifecycleSubStateEnum { + values := make([]PipelineLifecycleSubStateEnum, 0) + for _, v := range mappingPipelineLifecycleSubStateEnum { + values = append(values, v) + } + return values +} + +// GetPipelineLifecycleSubStateEnumStringValues Enumerates the set of values in String for PipelineLifecycleSubStateEnum +func GetPipelineLifecycleSubStateEnumStringValues() []string { + return []string{ + "STARTING", + "STOPPING", + "STOPPED", + "MOVING", + "RUNNING", + } +} + +// GetMappingPipelineLifecycleSubStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPipelineLifecycleSubStateEnum(val string) (PipelineLifecycleSubStateEnum, bool) { + enum, ok := mappingPipelineLifecycleSubStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/pipeline_running_process_collection.go b/goldengate/pipeline_running_process_collection.go new file mode 100644 index 0000000000..5821f88f63 --- /dev/null +++ b/goldengate/pipeline_running_process_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineRunningProcessCollection The complete replication process and its details. +type PipelineRunningProcessCollection struct { + + // The list of replication processes and their details. + Items []PipelineRunningProcessSummary `mandatory:"true" json:"items"` +} + +func (m PipelineRunningProcessCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineRunningProcessCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_running_process_summary.go b/goldengate/pipeline_running_process_summary.go new file mode 100644 index 0000000000..c4c7ff1ea7 --- /dev/null +++ b/goldengate/pipeline_running_process_summary.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineRunningProcessSummary Each replication process and their summary details. +type PipelineRunningProcessSummary struct { + + // An object's Display Name. + Name *string `mandatory:"true" json:"name"` + + // The type of process running in a replication. For example, Extract or Replicat. This option applies when retrieving running processes. + ProcessType ProcessTypeEnum `mandatory:"true" json:"processType"` + + // The status of the Extract or Replicat process. This option applies when retrieving running processes. + Status ProcessStatusTypeEnum `mandatory:"true" json:"status"` + + // The latency, in seconds, of a process running in a replication. This option applies when retrieving running processes. + LastRecordLagInSeconds *float32 `mandatory:"true" json:"lastRecordLagInSeconds"` + + // The date and time the last record was processed by an Extract or Replicat. This option applies when retrieving running processes. + // The format is defined by RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + TimeLastProcessed *common.SDKTime `mandatory:"true" json:"timeLastProcessed"` +} + +func (m PipelineRunningProcessSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineRunningProcessSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingProcessTypeEnum(string(m.ProcessType)); !ok && m.ProcessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProcessType: %s. Supported values are: %s.", m.ProcessType, strings.Join(GetProcessTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingProcessStatusTypeEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetProcessStatusTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_schema_collection.go b/goldengate/pipeline_schema_collection.go new file mode 100644 index 0000000000..df84c0eefb --- /dev/null +++ b/goldengate/pipeline_schema_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaCollection The list of schemas present in the source/target connection database of a pipeline. +type PipelineSchemaCollection struct { + + // Array of pipeline schemas + Items []PipelineSchemaSummary `mandatory:"true" json:"items"` +} + +func (m PipelineSchemaCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineSchemaCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_schema_summary.go b/goldengate/pipeline_schema_summary.go new file mode 100644 index 0000000000..de5539441f --- /dev/null +++ b/goldengate/pipeline_schema_summary.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaSummary List of source and target schemas of a pipeline's assigned connection. +// 1. If there is no explicit mapping defined for the pipeline then only matched source and target schema names will be returned. +// 2. If there are explicit mappings defined for the pipeline then along with the mapped source and target schema names, the matched source and target schema names also will be returned. +type PipelineSchemaSummary struct { + + // The schema name from the database connection. + SourceSchemaName *string `mandatory:"true" json:"sourceSchemaName"` + + // The schema name from the database connection. + TargetSchemaName *string `mandatory:"true" json:"targetSchemaName"` +} + +func (m PipelineSchemaSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineSchemaSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_schema_table_collection.go b/goldengate/pipeline_schema_table_collection.go new file mode 100644 index 0000000000..544f67a884 --- /dev/null +++ b/goldengate/pipeline_schema_table_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaTableCollection List of source or target schema tables of a pipeline's assigned connection. +type PipelineSchemaTableCollection struct { + + // Array of source or target schema tables of a pipeline's assigned connection. + Items []PipelineSchemaTableSummary `mandatory:"true" json:"items"` + + // The schema name from the database connection. + SourceSchemaName *string `mandatory:"false" json:"sourceSchemaName"` + + // The schema name from the database connection. + TargetSchemaName *string `mandatory:"false" json:"targetSchemaName"` +} + +func (m PipelineSchemaTableCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineSchemaTableCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_schema_table_summary.go b/goldengate/pipeline_schema_table_summary.go new file mode 100644 index 0000000000..0911a0cddf --- /dev/null +++ b/goldengate/pipeline_schema_table_summary.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaTableSummary Summary of source or target schema tables of a pipeline's assigned connection. +// 1. If there is no explicit mapping defined for the pipeline then only matched source and target schema's table names will be returned +// 2. If there are explicit mappings defined for the pipeline then along with the mapped source and target schema's table names, the matched source and target schema's table names also will be returned. +type PipelineSchemaTableSummary struct { + + // The table name from the schema of database connection. + SourceTableName *string `mandatory:"true" json:"sourceTableName"` + + // The table name from the schema of database connection. + TargetTableName *string `mandatory:"true" json:"targetTableName"` +} + +func (m PipelineSchemaTableSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PipelineSchemaTableSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/pipeline_summary.go b/goldengate/pipeline_summary.go new file mode 100644 index 0000000000..cfef09a03b --- /dev/null +++ b/goldengate/pipeline_summary.go @@ -0,0 +1,273 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSummary Summary details of the pipeline. +type PipelineSummary interface { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + GetId() *string + + // An object's Display Name. + GetDisplayName() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + GetCompartmentId() *string + + GetSourceConnectionDetails() *SourcePipelineConnectionDetails + + GetTargetConnectionDetails() *TargetPipelineConnectionDetails + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + // The Minimum number of OCPUs to be made available for this Deployment. + GetCpuCoreCount() *int + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + GetIsAutoScalingEnabled() *bool + + // Lifecycle state for the pipeline summary. + GetLifecycleState() PipelineLifecycleStateEnum + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeCreated() *common.SDKTime + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeUpdated() *common.SDKTime + + // Metadata about this specific object. + GetDescription() *string + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + GetSystemTags() map[string]map[string]interface{} + + // Locks associated with this resource. + GetLocks() []ResourceLock + + // Possible lifecycle substates when retrieving a pipeline. + GetLifecycleSubState() PipelineLifecycleSubStateEnum + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + GetLifecycleDetails() *string +} + +type pipelinesummary struct { + 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"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + Locks []ResourceLock `mandatory:"false" json:"locks"` + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *pipelinesummary) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpipelinesummary pipelinesummary + s := struct { + Model Unmarshalerpipelinesummary + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.DisplayName = s.Model.DisplayName + m.CompartmentId = s.Model.CompartmentId + m.SourceConnectionDetails = s.Model.SourceConnectionDetails + m.TargetConnectionDetails = s.Model.TargetConnectionDetails + m.LicenseModel = s.Model.LicenseModel + m.CpuCoreCount = s.Model.CpuCoreCount + m.IsAutoScalingEnabled = s.Model.IsAutoScalingEnabled + m.LifecycleState = s.Model.LifecycleState + m.TimeCreated = s.Model.TimeCreated + m.TimeUpdated = s.Model.TimeUpdated + m.Description = s.Model.Description + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.SystemTags = s.Model.SystemTags + m.Locks = s.Model.Locks + m.LifecycleSubState = s.Model.LifecycleSubState + m.LifecycleDetails = s.Model.LifecycleDetails + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *pipelinesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := ZeroEtlPipelineSummary{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PipelineSummary: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDescription returns Description +func (m pipelinesummary) GetDescription() *string { + return m.Description +} + +// GetFreeformTags returns FreeformTags +func (m pipelinesummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m pipelinesummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m pipelinesummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m pipelinesummary) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleSubState returns LifecycleSubState +func (m pipelinesummary) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m pipelinesummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id +func (m pipelinesummary) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m pipelinesummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m pipelinesummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m pipelinesummary) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m pipelinesummary) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetLicenseModel returns LicenseModel +func (m pipelinesummary) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m pipelinesummary) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m pipelinesummary) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetLifecycleState returns LifecycleState +func (m pipelinesummary) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m pipelinesummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m pipelinesummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m pipelinesummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m pipelinesummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/process_options.go b/goldengate/process_options.go new file mode 100644 index 0000000000..2a9fbc642c --- /dev/null +++ b/goldengate/process_options.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProcessOptions Required pipeline options to configure the replication process (Extract or Replicat). +type ProcessOptions struct { + InitialDataLoad *InitialDataLoad `mandatory:"true" json:"initialDataLoad"` + + ReplicateSchemaChange *ReplicateSchemaChange `mandatory:"true" json:"replicateSchemaChange"` + + // If ENABLED, then the replication process restarts itself upon failure. This option applies when creating or updating a pipeline. + ShouldRestartOnFailure ProcessOptionsShouldRestartOnFailureEnum `mandatory:"true" json:"shouldRestartOnFailure"` +} + +func (m ProcessOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProcessOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingProcessOptionsShouldRestartOnFailureEnum(string(m.ShouldRestartOnFailure)); !ok && m.ShouldRestartOnFailure != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ShouldRestartOnFailure: %s. Supported values are: %s.", m.ShouldRestartOnFailure, strings.Join(GetProcessOptionsShouldRestartOnFailureEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ProcessOptionsShouldRestartOnFailureEnum Enum with underlying type: string +type ProcessOptionsShouldRestartOnFailureEnum string + +// Set of constants representing the allowable values for ProcessOptionsShouldRestartOnFailureEnum +const ( + ProcessOptionsShouldRestartOnFailureEnabled ProcessOptionsShouldRestartOnFailureEnum = "ENABLED" + ProcessOptionsShouldRestartOnFailureDisabled ProcessOptionsShouldRestartOnFailureEnum = "DISABLED" +) + +var mappingProcessOptionsShouldRestartOnFailureEnum = map[string]ProcessOptionsShouldRestartOnFailureEnum{ + "ENABLED": ProcessOptionsShouldRestartOnFailureEnabled, + "DISABLED": ProcessOptionsShouldRestartOnFailureDisabled, +} + +var mappingProcessOptionsShouldRestartOnFailureEnumLowerCase = map[string]ProcessOptionsShouldRestartOnFailureEnum{ + "enabled": ProcessOptionsShouldRestartOnFailureEnabled, + "disabled": ProcessOptionsShouldRestartOnFailureDisabled, +} + +// GetProcessOptionsShouldRestartOnFailureEnumValues Enumerates the set of values for ProcessOptionsShouldRestartOnFailureEnum +func GetProcessOptionsShouldRestartOnFailureEnumValues() []ProcessOptionsShouldRestartOnFailureEnum { + values := make([]ProcessOptionsShouldRestartOnFailureEnum, 0) + for _, v := range mappingProcessOptionsShouldRestartOnFailureEnum { + values = append(values, v) + } + return values +} + +// GetProcessOptionsShouldRestartOnFailureEnumStringValues Enumerates the set of values in String for ProcessOptionsShouldRestartOnFailureEnum +func GetProcessOptionsShouldRestartOnFailureEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingProcessOptionsShouldRestartOnFailureEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProcessOptionsShouldRestartOnFailureEnum(val string) (ProcessOptionsShouldRestartOnFailureEnum, bool) { + enum, ok := mappingProcessOptionsShouldRestartOnFailureEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/process_status_type.go b/goldengate/process_status_type.go new file mode 100644 index 0000000000..06bc001983 --- /dev/null +++ b/goldengate/process_status_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ProcessStatusTypeEnum Enum with underlying type: string +type ProcessStatusTypeEnum string + +// Set of constants representing the allowable values for ProcessStatusTypeEnum +const ( + ProcessStatusTypeStopped ProcessStatusTypeEnum = "STOPPED" + ProcessStatusTypeRunning ProcessStatusTypeEnum = "RUNNING" + ProcessStatusTypeError ProcessStatusTypeEnum = "ERROR" +) + +var mappingProcessStatusTypeEnum = map[string]ProcessStatusTypeEnum{ + "STOPPED": ProcessStatusTypeStopped, + "RUNNING": ProcessStatusTypeRunning, + "ERROR": ProcessStatusTypeError, +} + +var mappingProcessStatusTypeEnumLowerCase = map[string]ProcessStatusTypeEnum{ + "stopped": ProcessStatusTypeStopped, + "running": ProcessStatusTypeRunning, + "error": ProcessStatusTypeError, +} + +// GetProcessStatusTypeEnumValues Enumerates the set of values for ProcessStatusTypeEnum +func GetProcessStatusTypeEnumValues() []ProcessStatusTypeEnum { + values := make([]ProcessStatusTypeEnum, 0) + for _, v := range mappingProcessStatusTypeEnum { + values = append(values, v) + } + return values +} + +// GetProcessStatusTypeEnumStringValues Enumerates the set of values in String for ProcessStatusTypeEnum +func GetProcessStatusTypeEnumStringValues() []string { + return []string{ + "STOPPED", + "RUNNING", + "ERROR", + } +} + +// GetMappingProcessStatusTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProcessStatusTypeEnum(val string) (ProcessStatusTypeEnum, bool) { + enum, ok := mappingProcessStatusTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/process_type.go b/goldengate/process_type.go new file mode 100644 index 0000000000..a65bc202db --- /dev/null +++ b/goldengate/process_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ProcessTypeEnum Enum with underlying type: string +type ProcessTypeEnum string + +// Set of constants representing the allowable values for ProcessTypeEnum +const ( + ProcessTypeExtract ProcessTypeEnum = "EXTRACT" + ProcessTypeReplicat ProcessTypeEnum = "REPLICAT" +) + +var mappingProcessTypeEnum = map[string]ProcessTypeEnum{ + "EXTRACT": ProcessTypeExtract, + "REPLICAT": ProcessTypeReplicat, +} + +var mappingProcessTypeEnumLowerCase = map[string]ProcessTypeEnum{ + "extract": ProcessTypeExtract, + "replicat": ProcessTypeReplicat, +} + +// GetProcessTypeEnumValues Enumerates the set of values for ProcessTypeEnum +func GetProcessTypeEnumValues() []ProcessTypeEnum { + values := make([]ProcessTypeEnum, 0) + for _, v := range mappingProcessTypeEnum { + values = append(values, v) + } + return values +} + +// GetProcessTypeEnumStringValues Enumerates the set of values in String for ProcessTypeEnum +func GetProcessTypeEnumStringValues() []string { + return []string{ + "EXTRACT", + "REPLICAT", + } +} + +// GetMappingProcessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProcessTypeEnum(val string) (ProcessTypeEnum, bool) { + enum, ok := mappingProcessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/recipe_summary.go b/goldengate/recipe_summary.go new file mode 100644 index 0000000000..1b36e2b333 --- /dev/null +++ b/goldengate/recipe_summary.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RecipeSummary The list of recipe details to create pipelines. +type RecipeSummary struct { + + // The type of the recipe + RecipeType RecipeTypeEnum `mandatory:"true" json:"recipeType"` + + // An object's Display Name. + Name *string `mandatory:"true" json:"name"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Array of supported technology types for this recipe. + SupportedSourceTechnologyTypes []TechnologyTypeEnum `mandatory:"true" json:"supportedSourceTechnologyTypes"` + + // Array of supported technology types for this recipe. + SupportedTargetTechnologyTypes []TechnologyTypeEnum `mandatory:"true" json:"supportedTargetTechnologyTypes"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` +} + +func (m RecipeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RecipeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRecipeTypeEnum(string(m.RecipeType)); !ok && m.RecipeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecipeType: %s. Supported values are: %s.", m.RecipeType, strings.Join(GetRecipeTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/recipe_summary_collection.go b/goldengate/recipe_summary_collection.go new file mode 100644 index 0000000000..943cfaf34c --- /dev/null +++ b/goldengate/recipe_summary_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RecipeSummaryCollection The list of Recipe objects. +type RecipeSummaryCollection struct { + + // Array of Recipe Summary + Items []RecipeSummary `mandatory:"true" json:"items"` +} + +func (m RecipeSummaryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RecipeSummaryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/recipe_type.go b/goldengate/recipe_type.go new file mode 100644 index 0000000000..49c9e0faa5 --- /dev/null +++ b/goldengate/recipe_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// RecipeTypeEnum Enum with underlying type: string +type RecipeTypeEnum string + +// Set of constants representing the allowable values for RecipeTypeEnum +const ( + RecipeTypeZeroEtl RecipeTypeEnum = "ZERO_ETL" +) + +var mappingRecipeTypeEnum = map[string]RecipeTypeEnum{ + "ZERO_ETL": RecipeTypeZeroEtl, +} + +var mappingRecipeTypeEnumLowerCase = map[string]RecipeTypeEnum{ + "zero_etl": RecipeTypeZeroEtl, +} + +// GetRecipeTypeEnumValues Enumerates the set of values for RecipeTypeEnum +func GetRecipeTypeEnumValues() []RecipeTypeEnum { + values := make([]RecipeTypeEnum, 0) + for _, v := range mappingRecipeTypeEnum { + values = append(values, v) + } + return values +} + +// GetRecipeTypeEnumStringValues Enumerates the set of values in String for RecipeTypeEnum +func GetRecipeTypeEnumStringValues() []string { + return []string{ + "ZERO_ETL", + } +} + +// GetMappingRecipeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRecipeTypeEnum(val string) (RecipeTypeEnum, bool) { + enum, ok := mappingRecipeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/replicate_ddl_error_action.go b/goldengate/replicate_ddl_error_action.go new file mode 100644 index 0000000000..0a3b824a8d --- /dev/null +++ b/goldengate/replicate_ddl_error_action.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ReplicateDdlErrorActionEnum Enum with underlying type: string +type ReplicateDdlErrorActionEnum string + +// Set of constants representing the allowable values for ReplicateDdlErrorActionEnum +const ( + ReplicateDdlErrorActionTerminate ReplicateDdlErrorActionEnum = "TERMINATE" + ReplicateDdlErrorActionDiscard ReplicateDdlErrorActionEnum = "DISCARD" + ReplicateDdlErrorActionIgnore ReplicateDdlErrorActionEnum = "IGNORE" +) + +var mappingReplicateDdlErrorActionEnum = map[string]ReplicateDdlErrorActionEnum{ + "TERMINATE": ReplicateDdlErrorActionTerminate, + "DISCARD": ReplicateDdlErrorActionDiscard, + "IGNORE": ReplicateDdlErrorActionIgnore, +} + +var mappingReplicateDdlErrorActionEnumLowerCase = map[string]ReplicateDdlErrorActionEnum{ + "terminate": ReplicateDdlErrorActionTerminate, + "discard": ReplicateDdlErrorActionDiscard, + "ignore": ReplicateDdlErrorActionIgnore, +} + +// GetReplicateDdlErrorActionEnumValues Enumerates the set of values for ReplicateDdlErrorActionEnum +func GetReplicateDdlErrorActionEnumValues() []ReplicateDdlErrorActionEnum { + values := make([]ReplicateDdlErrorActionEnum, 0) + for _, v := range mappingReplicateDdlErrorActionEnum { + values = append(values, v) + } + return values +} + +// GetReplicateDdlErrorActionEnumStringValues Enumerates the set of values in String for ReplicateDdlErrorActionEnum +func GetReplicateDdlErrorActionEnumStringValues() []string { + return []string{ + "TERMINATE", + "DISCARD", + "IGNORE", + } +} + +// GetMappingReplicateDdlErrorActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicateDdlErrorActionEnum(val string) (ReplicateDdlErrorActionEnum, bool) { + enum, ok := mappingReplicateDdlErrorActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/replicate_dml_error_action.go b/goldengate/replicate_dml_error_action.go new file mode 100644 index 0000000000..bc9ca4f725 --- /dev/null +++ b/goldengate/replicate_dml_error_action.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ReplicateDmlErrorActionEnum Enum with underlying type: string +type ReplicateDmlErrorActionEnum string + +// Set of constants representing the allowable values for ReplicateDmlErrorActionEnum +const ( + ReplicateDmlErrorActionTerminate ReplicateDmlErrorActionEnum = "TERMINATE" + ReplicateDmlErrorActionDiscard ReplicateDmlErrorActionEnum = "DISCARD" + ReplicateDmlErrorActionIgnore ReplicateDmlErrorActionEnum = "IGNORE" +) + +var mappingReplicateDmlErrorActionEnum = map[string]ReplicateDmlErrorActionEnum{ + "TERMINATE": ReplicateDmlErrorActionTerminate, + "DISCARD": ReplicateDmlErrorActionDiscard, + "IGNORE": ReplicateDmlErrorActionIgnore, +} + +var mappingReplicateDmlErrorActionEnumLowerCase = map[string]ReplicateDmlErrorActionEnum{ + "terminate": ReplicateDmlErrorActionTerminate, + "discard": ReplicateDmlErrorActionDiscard, + "ignore": ReplicateDmlErrorActionIgnore, +} + +// GetReplicateDmlErrorActionEnumValues Enumerates the set of values for ReplicateDmlErrorActionEnum +func GetReplicateDmlErrorActionEnumValues() []ReplicateDmlErrorActionEnum { + values := make([]ReplicateDmlErrorActionEnum, 0) + for _, v := range mappingReplicateDmlErrorActionEnum { + values = append(values, v) + } + return values +} + +// GetReplicateDmlErrorActionEnumStringValues Enumerates the set of values in String for ReplicateDmlErrorActionEnum +func GetReplicateDmlErrorActionEnumStringValues() []string { + return []string{ + "TERMINATE", + "DISCARD", + "IGNORE", + } +} + +// GetMappingReplicateDmlErrorActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicateDmlErrorActionEnum(val string) (ReplicateDmlErrorActionEnum, bool) { + enum, ok := mappingReplicateDmlErrorActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/replicate_schema_change.go b/goldengate/replicate_schema_change.go new file mode 100644 index 0000000000..71723acb72 --- /dev/null +++ b/goldengate/replicate_schema_change.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReplicateSchemaChange Options required for pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. +type ReplicateSchemaChange struct { + + // If ENABLED, then addition or removal of schema is also replicated, apart from individual tables and records when creating or updating the pipeline. + CanReplicateSchemaChange ReplicateSchemaChangeCanReplicateSchemaChangeEnum `mandatory:"true" json:"canReplicateSchemaChange"` + + // Action upon DDL Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + ActionOnDdlError ReplicateDdlErrorActionEnum `mandatory:"false" json:"actionOnDdlError,omitempty"` + + // Action upon DML Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + ActionOnDmlError ReplicateDmlErrorActionEnum `mandatory:"false" json:"actionOnDmlError,omitempty"` +} + +func (m ReplicateSchemaChange) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ReplicateSchemaChange) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingReplicateSchemaChangeCanReplicateSchemaChangeEnum(string(m.CanReplicateSchemaChange)); !ok && m.CanReplicateSchemaChange != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CanReplicateSchemaChange: %s. Supported values are: %s.", m.CanReplicateSchemaChange, strings.Join(GetReplicateSchemaChangeCanReplicateSchemaChangeEnumStringValues(), ","))) + } + + if _, ok := GetMappingReplicateDdlErrorActionEnum(string(m.ActionOnDdlError)); !ok && m.ActionOnDdlError != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionOnDdlError: %s. Supported values are: %s.", m.ActionOnDdlError, strings.Join(GetReplicateDdlErrorActionEnumStringValues(), ","))) + } + if _, ok := GetMappingReplicateDmlErrorActionEnum(string(m.ActionOnDmlError)); !ok && m.ActionOnDmlError != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionOnDmlError: %s. Supported values are: %s.", m.ActionOnDmlError, strings.Join(GetReplicateDmlErrorActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReplicateSchemaChangeCanReplicateSchemaChangeEnum Enum with underlying type: string +type ReplicateSchemaChangeCanReplicateSchemaChangeEnum string + +// Set of constants representing the allowable values for ReplicateSchemaChangeCanReplicateSchemaChangeEnum +const ( + ReplicateSchemaChangeCanReplicateSchemaChangeEnabled ReplicateSchemaChangeCanReplicateSchemaChangeEnum = "ENABLED" + ReplicateSchemaChangeCanReplicateSchemaChangeDisabled ReplicateSchemaChangeCanReplicateSchemaChangeEnum = "DISABLED" +) + +var mappingReplicateSchemaChangeCanReplicateSchemaChangeEnum = map[string]ReplicateSchemaChangeCanReplicateSchemaChangeEnum{ + "ENABLED": ReplicateSchemaChangeCanReplicateSchemaChangeEnabled, + "DISABLED": ReplicateSchemaChangeCanReplicateSchemaChangeDisabled, +} + +var mappingReplicateSchemaChangeCanReplicateSchemaChangeEnumLowerCase = map[string]ReplicateSchemaChangeCanReplicateSchemaChangeEnum{ + "enabled": ReplicateSchemaChangeCanReplicateSchemaChangeEnabled, + "disabled": ReplicateSchemaChangeCanReplicateSchemaChangeDisabled, +} + +// GetReplicateSchemaChangeCanReplicateSchemaChangeEnumValues Enumerates the set of values for ReplicateSchemaChangeCanReplicateSchemaChangeEnum +func GetReplicateSchemaChangeCanReplicateSchemaChangeEnumValues() []ReplicateSchemaChangeCanReplicateSchemaChangeEnum { + values := make([]ReplicateSchemaChangeCanReplicateSchemaChangeEnum, 0) + for _, v := range mappingReplicateSchemaChangeCanReplicateSchemaChangeEnum { + values = append(values, v) + } + return values +} + +// GetReplicateSchemaChangeCanReplicateSchemaChangeEnumStringValues Enumerates the set of values in String for ReplicateSchemaChangeCanReplicateSchemaChangeEnum +func GetReplicateSchemaChangeCanReplicateSchemaChangeEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingReplicateSchemaChangeCanReplicateSchemaChangeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicateSchemaChangeCanReplicateSchemaChangeEnum(val string) (ReplicateSchemaChangeCanReplicateSchemaChangeEnum, bool) { + enum, ok := mappingReplicateSchemaChangeCanReplicateSchemaChangeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/severity_type.go b/goldengate/severity_type.go new file mode 100644 index 0000000000..a925ff13cd --- /dev/null +++ b/goldengate/severity_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// SeverityTypeEnum Enum with underlying type: string +type SeverityTypeEnum string + +// Set of constants representing the allowable values for SeverityTypeEnum +const ( + SeverityTypeInfo SeverityTypeEnum = "INFO" + SeverityTypeError SeverityTypeEnum = "ERROR" + SeverityTypeWarning SeverityTypeEnum = "WARNING" +) + +var mappingSeverityTypeEnum = map[string]SeverityTypeEnum{ + "INFO": SeverityTypeInfo, + "ERROR": SeverityTypeError, + "WARNING": SeverityTypeWarning, +} + +var mappingSeverityTypeEnumLowerCase = map[string]SeverityTypeEnum{ + "info": SeverityTypeInfo, + "error": SeverityTypeError, + "warning": SeverityTypeWarning, +} + +// GetSeverityTypeEnumValues Enumerates the set of values for SeverityTypeEnum +func GetSeverityTypeEnumValues() []SeverityTypeEnum { + values := make([]SeverityTypeEnum, 0) + for _, v := range mappingSeverityTypeEnum { + values = append(values, v) + } + return values +} + +// GetSeverityTypeEnumStringValues Enumerates the set of values in String for SeverityTypeEnum +func GetSeverityTypeEnumStringValues() []string { + return []string{ + "INFO", + "ERROR", + "WARNING", + } +} + +// GetMappingSeverityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSeverityTypeEnum(val string) (SeverityTypeEnum, bool) { + enum, ok := mappingSeverityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/source_pipeline_connection_details.go b/goldengate/source_pipeline_connection_details.go new file mode 100644 index 0000000000..772644f883 --- /dev/null +++ b/goldengate/source_pipeline_connection_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SourcePipelineConnectionDetails The source connection details for creating a pipeline. +type SourcePipelineConnectionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + ConnectionId *string `mandatory:"true" json:"connectionId"` +} + +func (m SourcePipelineConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SourcePipelineConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/start_pipeline_details.go b/goldengate/start_pipeline_details.go new file mode 100644 index 0000000000..c712edcdca --- /dev/null +++ b/goldengate/start_pipeline_details.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StartPipelineDetails Details with which to start a pipeline. +type StartPipelineDetails interface { +} + +type startpipelinedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *startpipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerstartpipelinedetails startpipelinedetails + s := struct { + Model Unmarshalerstartpipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *startpipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "DEFAULT": + mm := DefaultStartPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for StartPipelineDetails: %s.", m.Type) + return *m, nil + } +} + +func (m startpipelinedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m startpipelinedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/start_pipeline_request_response.go b/goldengate/start_pipeline_request_response.go new file mode 100644 index 0000000000..8c1cac9c0c --- /dev/null +++ b/goldengate/start_pipeline_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StartPipelineRequest wrapper for the StartPipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StartPipeline.go.html to see an example of how to use StartPipelineRequest. +type StartPipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Details to start Pipeline. + StartPipelineDetails `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 is 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"` + + // The client request ID for tracing. + 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 the 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 was deleted and purged + // from the system, then a retry of the original creation request is rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request StartPipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StartPipelineRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request StartPipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StartPipelineRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request StartPipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StartPipelineResponse wrapper for the StartPipeline operation +type StartPipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StartPipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StartPipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/start_pipeline_type.go b/goldengate/start_pipeline_type.go new file mode 100644 index 0000000000..5077c96632 --- /dev/null +++ b/goldengate/start_pipeline_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// StartPipelineTypeEnum Enum with underlying type: string +type StartPipelineTypeEnum string + +// Set of constants representing the allowable values for StartPipelineTypeEnum +const ( + StartPipelineTypeDefault StartPipelineTypeEnum = "DEFAULT" +) + +var mappingStartPipelineTypeEnum = map[string]StartPipelineTypeEnum{ + "DEFAULT": StartPipelineTypeDefault, +} + +var mappingStartPipelineTypeEnumLowerCase = map[string]StartPipelineTypeEnum{ + "default": StartPipelineTypeDefault, +} + +// GetStartPipelineTypeEnumValues Enumerates the set of values for StartPipelineTypeEnum +func GetStartPipelineTypeEnumValues() []StartPipelineTypeEnum { + values := make([]StartPipelineTypeEnum, 0) + for _, v := range mappingStartPipelineTypeEnum { + values = append(values, v) + } + return values +} + +// GetStartPipelineTypeEnumStringValues Enumerates the set of values in String for StartPipelineTypeEnum +func GetStartPipelineTypeEnumStringValues() []string { + return []string{ + "DEFAULT", + } +} + +// GetMappingStartPipelineTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStartPipelineTypeEnum(val string) (StartPipelineTypeEnum, bool) { + enum, ok := mappingStartPipelineTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/step_message.go b/goldengate/step_message.go new file mode 100644 index 0000000000..ee66775108 --- /dev/null +++ b/goldengate/step_message.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StepMessage Contents of a step message. +type StepMessage struct { + + // The status message of the steps in a recipe during pipeline initialization. + // https://docs.oracle.com/en/middleware/goldengate/core/23/oggra/rest-endpoints.html + Message *string `mandatory:"true" json:"message"` + + // The code returned when GoldenGate reports an error while running a step during pipeline initialization. + // https://docs.oracle.com/en/middleware/goldengate/core/23/error-messages/ogg-00001-ogg-40000.html#GUID-97FF7AA7-7A5C-4AA7-B29F-3CC8D26761F2 + Code *string `mandatory:"true" json:"code"` + + // Date and time of a message issued by steps in a recipe during pipeline initialization. + // The format is defined by RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` + + // The severity returned when calling GoldenGate API messages for a step in a recipe during pipeline initialization. + // https://docs.oracle.com/en/middleware/goldengate/core/23/oggra/rest-endpoints.html + Severity SeverityTypeEnum `mandatory:"true" json:"severity"` +} + +func (m StepMessage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m StepMessage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSeverityTypeEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetSeverityTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/step_status_type.go b/goldengate/step_status_type.go new file mode 100644 index 0000000000..2a30b9b745 --- /dev/null +++ b/goldengate/step_status_type.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// StepStatusTypeEnum Enum with underlying type: string +type StepStatusTypeEnum string + +// Set of constants representing the allowable values for StepStatusTypeEnum +const ( + StepStatusTypePending StepStatusTypeEnum = "PENDING" + StepStatusTypeInProgress StepStatusTypeEnum = "IN_PROGRESS" + StepStatusTypeCompleted StepStatusTypeEnum = "COMPLETED" + StepStatusTypeFailed StepStatusTypeEnum = "FAILED" +) + +var mappingStepStatusTypeEnum = map[string]StepStatusTypeEnum{ + "PENDING": StepStatusTypePending, + "IN_PROGRESS": StepStatusTypeInProgress, + "COMPLETED": StepStatusTypeCompleted, + "FAILED": StepStatusTypeFailed, +} + +var mappingStepStatusTypeEnumLowerCase = map[string]StepStatusTypeEnum{ + "pending": StepStatusTypePending, + "in_progress": StepStatusTypeInProgress, + "completed": StepStatusTypeCompleted, + "failed": StepStatusTypeFailed, +} + +// GetStepStatusTypeEnumValues Enumerates the set of values for StepStatusTypeEnum +func GetStepStatusTypeEnumValues() []StepStatusTypeEnum { + values := make([]StepStatusTypeEnum, 0) + for _, v := range mappingStepStatusTypeEnum { + values = append(values, v) + } + return values +} + +// GetStepStatusTypeEnumStringValues Enumerates the set of values in String for StepStatusTypeEnum +func GetStepStatusTypeEnumStringValues() []string { + return []string{ + "PENDING", + "IN_PROGRESS", + "COMPLETED", + "FAILED", + } +} + +// GetMappingStepStatusTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStepStatusTypeEnum(val string) (StepStatusTypeEnum, bool) { + enum, ok := mappingStepStatusTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/stop_pipeline_details.go b/goldengate/stop_pipeline_details.go new file mode 100644 index 0000000000..6ca5e6a452 --- /dev/null +++ b/goldengate/stop_pipeline_details.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StopPipelineDetails Details for a pipeline stop. +type StopPipelineDetails interface { +} + +type stoppipelinedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *stoppipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerstoppipelinedetails stoppipelinedetails + s := struct { + Model Unmarshalerstoppipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *stoppipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "DEFAULT": + mm := DefaultStopPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for StopPipelineDetails: %s.", m.Type) + return *m, nil + } +} + +func (m stoppipelinedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m stoppipelinedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/stop_pipeline_request_response.go b/goldengate/stop_pipeline_request_response.go new file mode 100644 index 0000000000..3462005800 --- /dev/null +++ b/goldengate/stop_pipeline_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StopPipelineRequest wrapper for the StopPipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StopPipeline.go.html to see an example of how to use StopPipelineRequest. +type StopPipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Details to stop the pipeline. + StopPipelineDetails `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 is 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"` + + // The client request ID for tracing. + 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 the 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 was deleted and purged + // from the system, then a retry of the original creation request is rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request StopPipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StopPipelineRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request StopPipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StopPipelineRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request StopPipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StopPipelineResponse wrapper for the StopPipeline operation +type StopPipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StopPipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StopPipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/stop_pipeline_type.go b/goldengate/stop_pipeline_type.go new file mode 100644 index 0000000000..9242a0a5ac --- /dev/null +++ b/goldengate/stop_pipeline_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// StopPipelineTypeEnum Enum with underlying type: string +type StopPipelineTypeEnum string + +// Set of constants representing the allowable values for StopPipelineTypeEnum +const ( + StopPipelineTypeDefault StopPipelineTypeEnum = "DEFAULT" +) + +var mappingStopPipelineTypeEnum = map[string]StopPipelineTypeEnum{ + "DEFAULT": StopPipelineTypeDefault, +} + +var mappingStopPipelineTypeEnumLowerCase = map[string]StopPipelineTypeEnum{ + "default": StopPipelineTypeDefault, +} + +// GetStopPipelineTypeEnumValues Enumerates the set of values for StopPipelineTypeEnum +func GetStopPipelineTypeEnumValues() []StopPipelineTypeEnum { + values := make([]StopPipelineTypeEnum, 0) + for _, v := range mappingStopPipelineTypeEnum { + values = append(values, v) + } + return values +} + +// GetStopPipelineTypeEnumStringValues Enumerates the set of values in String for StopPipelineTypeEnum +func GetStopPipelineTypeEnumStringValues() []string { + return []string{ + "DEFAULT", + } +} + +// GetMappingStopPipelineTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStopPipelineTypeEnum(val string) (StopPipelineTypeEnum, bool) { + enum, ok := mappingStopPipelineTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/target_pipeline_connection_details.go b/goldengate/target_pipeline_connection_details.go new file mode 100644 index 0000000000..8af1675e30 --- /dev/null +++ b/goldengate/target_pipeline_connection_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TargetPipelineConnectionDetails The target connection details for creating a pipeline. +type TargetPipelineConnectionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + ConnectionId *string `mandatory:"true" json:"connectionId"` +} + +func (m TargetPipelineConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TargetPipelineConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/test_pipeline_connection_details.go b/goldengate/test_pipeline_connection_details.go new file mode 100644 index 0000000000..f8a2b0d141 --- /dev/null +++ b/goldengate/test_pipeline_connection_details.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TestPipelineConnectionDetails Details about testing the pipeline's assigned connection. +type TestPipelineConnectionDetails interface { +} + +type testpipelineconnectiondetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *testpipelineconnectiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalertestpipelineconnectiondetails testpipelineconnectiondetails + s := struct { + Model Unmarshalertestpipelineconnectiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *testpipelineconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "DEFAULT": + mm := DefaultTestPipelineConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for TestPipelineConnectionDetails: %s.", m.Type) + return *m, nil + } +} + +func (m testpipelineconnectiondetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m testpipelineconnectiondetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/test_pipeline_connection_error.go b/goldengate/test_pipeline_connection_error.go new file mode 100644 index 0000000000..0da4677013 --- /dev/null +++ b/goldengate/test_pipeline_connection_error.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TestPipelineConnectionError The error returned when a pipeline connection fails to connect. +type TestPipelineConnectionError struct { + + // A short error code that defines the error, meant for programmatic parsing. + Code *string `mandatory:"true" json:"code"` + + // A human-readable error string. + Message *string `mandatory:"true" json:"message"` + + // The text describing the root cause of the reported issue. + Issue *string `mandatory:"false" json:"issue"` + + // The text describing the action required to fix the issue. + Action *string `mandatory:"false" json:"action"` +} + +func (m TestPipelineConnectionError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TestPipelineConnectionError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/test_pipeline_connection_request_response.go b/goldengate/test_pipeline_connection_request_response.go new file mode 100644 index 0000000000..8202717801 --- /dev/null +++ b/goldengate/test_pipeline_connection_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// TestPipelineConnectionRequest wrapper for the TestPipelineConnection operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/TestPipelineConnection.go.html to see an example of how to use TestPipelineConnectionRequest. +type TestPipelineConnectionRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Additional metadata required to test the connection assigned to the pipeline. + TestPipelineConnectionDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // 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 is 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"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is 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 TestPipelineConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request TestPipelineConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request TestPipelineConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TestPipelineConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request TestPipelineConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TestPipelineConnectionResponse wrapper for the TestPipelineConnection operation +type TestPipelineConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TestPipelineConnectionResult instance + TestPipelineConnectionResult `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include 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 TestPipelineConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response TestPipelineConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/test_pipeline_connection_result.go b/goldengate/test_pipeline_connection_result.go new file mode 100644 index 0000000000..ba48b08783 --- /dev/null +++ b/goldengate/test_pipeline_connection_result.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TestPipelineConnectionResult Result of the connectivity test performed on a pipeline's assigned connection. +type TestPipelineConnectionResult struct { + + // Type of result, either Succeeded, Failed, or Timed out. + ResultType TestPipelineConnectionResultResultTypeEnum `mandatory:"true" json:"resultType"` + + Error *TestPipelineConnectionError `mandatory:"false" json:"error"` +} + +func (m TestPipelineConnectionResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TestPipelineConnectionResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTestPipelineConnectionResultResultTypeEnum(string(m.ResultType)); !ok && m.ResultType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResultType: %s. Supported values are: %s.", m.ResultType, strings.Join(GetTestPipelineConnectionResultResultTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TestPipelineConnectionResultResultTypeEnum Enum with underlying type: string +type TestPipelineConnectionResultResultTypeEnum string + +// Set of constants representing the allowable values for TestPipelineConnectionResultResultTypeEnum +const ( + TestPipelineConnectionResultResultTypeSucceeded TestPipelineConnectionResultResultTypeEnum = "SUCCEEDED" + TestPipelineConnectionResultResultTypeFailed TestPipelineConnectionResultResultTypeEnum = "FAILED" + TestPipelineConnectionResultResultTypeTimedOut TestPipelineConnectionResultResultTypeEnum = "TIMED_OUT" +) + +var mappingTestPipelineConnectionResultResultTypeEnum = map[string]TestPipelineConnectionResultResultTypeEnum{ + "SUCCEEDED": TestPipelineConnectionResultResultTypeSucceeded, + "FAILED": TestPipelineConnectionResultResultTypeFailed, + "TIMED_OUT": TestPipelineConnectionResultResultTypeTimedOut, +} + +var mappingTestPipelineConnectionResultResultTypeEnumLowerCase = map[string]TestPipelineConnectionResultResultTypeEnum{ + "succeeded": TestPipelineConnectionResultResultTypeSucceeded, + "failed": TestPipelineConnectionResultResultTypeFailed, + "timed_out": TestPipelineConnectionResultResultTypeTimedOut, +} + +// GetTestPipelineConnectionResultResultTypeEnumValues Enumerates the set of values for TestPipelineConnectionResultResultTypeEnum +func GetTestPipelineConnectionResultResultTypeEnumValues() []TestPipelineConnectionResultResultTypeEnum { + values := make([]TestPipelineConnectionResultResultTypeEnum, 0) + for _, v := range mappingTestPipelineConnectionResultResultTypeEnum { + values = append(values, v) + } + return values +} + +// GetTestPipelineConnectionResultResultTypeEnumStringValues Enumerates the set of values in String for TestPipelineConnectionResultResultTypeEnum +func GetTestPipelineConnectionResultResultTypeEnumStringValues() []string { + return []string{ + "SUCCEEDED", + "FAILED", + "TIMED_OUT", + } +} + +// GetMappingTestPipelineConnectionResultResultTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTestPipelineConnectionResultResultTypeEnum(val string) (TestPipelineConnectionResultResultTypeEnum, bool) { + enum, ok := mappingTestPipelineConnectionResultResultTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/test_pipeline_connection_type.go b/goldengate/test_pipeline_connection_type.go new file mode 100644 index 0000000000..503aa1ecdd --- /dev/null +++ b/goldengate/test_pipeline_connection_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// TestPipelineConnectionTypeEnum Enum with underlying type: string +type TestPipelineConnectionTypeEnum string + +// Set of constants representing the allowable values for TestPipelineConnectionTypeEnum +const ( + TestPipelineConnectionTypeDefault TestPipelineConnectionTypeEnum = "DEFAULT" +) + +var mappingTestPipelineConnectionTypeEnum = map[string]TestPipelineConnectionTypeEnum{ + "DEFAULT": TestPipelineConnectionTypeDefault, +} + +var mappingTestPipelineConnectionTypeEnumLowerCase = map[string]TestPipelineConnectionTypeEnum{ + "default": TestPipelineConnectionTypeDefault, +} + +// GetTestPipelineConnectionTypeEnumValues Enumerates the set of values for TestPipelineConnectionTypeEnum +func GetTestPipelineConnectionTypeEnumValues() []TestPipelineConnectionTypeEnum { + values := make([]TestPipelineConnectionTypeEnum, 0) + for _, v := range mappingTestPipelineConnectionTypeEnum { + values = append(values, v) + } + return values +} + +// GetTestPipelineConnectionTypeEnumStringValues Enumerates the set of values in String for TestPipelineConnectionTypeEnum +func GetTestPipelineConnectionTypeEnumStringValues() []string { + return []string{ + "DEFAULT", + } +} + +// GetMappingTestPipelineConnectionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTestPipelineConnectionTypeEnum(val string) (TestPipelineConnectionTypeEnum, bool) { + enum, ok := mappingTestPipelineConnectionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/update_mysql_connection_details.go b/goldengate/update_mysql_connection_details.go index 3d6e74aa82..4c66115c68 100644 --- a/goldengate/update_mysql_connection_details.go +++ b/goldengate/update_mysql_connection_details.go @@ -89,7 +89,7 @@ type UpdateMysqlConnectionDetails struct { // containing the client public key (for 2-way SSL). SslCert *string `mandatory:"false" json:"sslCert"` - // Client Key – The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). + // Client Key - The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). SslKey *string `mandatory:"false" json:"sslKey"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key diff --git a/goldengate/update_pipeline_details.go b/goldengate/update_pipeline_details.go new file mode 100644 index 0000000000..3d7f51769d --- /dev/null +++ b/goldengate/update_pipeline_details.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePipelineDetails Information with which to update a pipeline. +type UpdatePipelineDetails interface { + + // An object's Display Name. + GetDisplayName() *string + + // Metadata about this specific object. + GetDescription() *string + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} +} + +type updatepipelinedetails struct { + JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` + Description *string `mandatory:"false" json:"description"` + LicenseModel LicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *updatepipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdatepipelinedetails updatepipelinedetails + s := struct { + Model Unmarshalerupdatepipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.DisplayName = s.Model.DisplayName + m.Description = s.Model.Description + m.LicenseModel = s.Model.LicenseModel + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updatepipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := UpdateZeroEtlPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for UpdatePipelineDetails: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDisplayName returns DisplayName +func (m updatepipelinedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m updatepipelinedetails) GetDescription() *string { + return m.Description +} + +// GetLicenseModel returns LicenseModel +func (m updatepipelinedetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetFreeformTags returns FreeformTags +func (m updatepipelinedetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m updatepipelinedetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m updatepipelinedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updatepipelinedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/goldengate/update_pipeline_request_response.go b/goldengate/update_pipeline_request_response.go new file mode 100644 index 0000000000..2b1eda8793 --- /dev/null +++ b/goldengate/update_pipeline_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePipelineRequest wrapper for the UpdatePipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/UpdatePipeline.go.html to see an example of how to use UpdatePipelineRequest. +type UpdatePipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // The existing pipeline specifications to apply. + UpdatePipelineDetails `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 is 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"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePipelineRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePipelineRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePipelineResponse wrapper for the UpdatePipeline operation +type UpdatePipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/goldengate/update_zero_etl_pipeline_details.go b/goldengate/update_zero_etl_pipeline_details.go new file mode 100644 index 0000000000..2a0f66114d --- /dev/null +++ b/goldengate/update_zero_etl_pipeline_details.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateZeroEtlPipelineDetails Information to update for an existing ZeroETL pipeline. +type UpdateZeroEtlPipelineDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + ProcessOptions *ProcessOptions `mandatory:"false" json:"processOptions"` + + // Mapping for source/target schema/tables for the pipeline data replication. + MappingRules []MappingRule `mandatory:"false" json:"mappingRules"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` +} + +// GetDisplayName returns DisplayName +func (m UpdateZeroEtlPipelineDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m UpdateZeroEtlPipelineDetails) GetDescription() *string { + return m.Description +} + +// GetLicenseModel returns LicenseModel +func (m UpdateZeroEtlPipelineDetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetFreeformTags returns FreeformTags +func (m UpdateZeroEtlPipelineDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateZeroEtlPipelineDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateZeroEtlPipelineDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateZeroEtlPipelineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateZeroEtlPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateZeroEtlPipelineDetails UpdateZeroEtlPipelineDetails + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeUpdateZeroEtlPipelineDetails + }{ + "ZERO_ETL", + (MarshalTypeUpdateZeroEtlPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/zero_etl_pipeline.go b/goldengate/zero_etl_pipeline.go new file mode 100644 index 0000000000..d4a4349640 --- /dev/null +++ b/goldengate/zero_etl_pipeline.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ZeroEtlPipeline The details of a ZeroETL pipeline. +type ZeroEtlPipeline struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The Minimum number of OCPUs to be made available for this Deployment. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Mapping for source/target schema/tables for the pipeline data replication. + MappingRules []MappingRule `mandatory:"false" json:"mappingRules"` + + ProcessOptions *ProcessOptions `mandatory:"false" json:"processOptions"` + + // When the resource was last updated. This option applies when retrieving a pipeline. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + TimeLastRecorded *common.SDKTime `mandatory:"false" json:"timeLastRecorded"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + + // Lifecycle state of the pipeline. + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Possible lifecycle substates when retrieving a pipeline. + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` +} + +// GetId returns Id +func (m ZeroEtlPipeline) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m ZeroEtlPipeline) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m ZeroEtlPipeline) GetDescription() *string { + return m.Description +} + +// GetCompartmentId returns CompartmentId +func (m ZeroEtlPipeline) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m ZeroEtlPipeline) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m ZeroEtlPipeline) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m ZeroEtlPipeline) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m ZeroEtlPipeline) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m ZeroEtlPipeline) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetFreeformTags returns FreeformTags +func (m ZeroEtlPipeline) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m ZeroEtlPipeline) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m ZeroEtlPipeline) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m ZeroEtlPipeline) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleState returns LifecycleState +func (m ZeroEtlPipeline) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleSubState returns LifecycleSubState +func (m ZeroEtlPipeline) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m ZeroEtlPipeline) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeCreated returns TimeCreated +func (m ZeroEtlPipeline) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m ZeroEtlPipeline) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m ZeroEtlPipeline) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ZeroEtlPipeline) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ZeroEtlPipeline) MarshalJSON() (buff []byte, e error) { + type MarshalTypeZeroEtlPipeline ZeroEtlPipeline + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeZeroEtlPipeline + }{ + "ZERO_ETL", + (MarshalTypeZeroEtlPipeline)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/zero_etl_pipeline_summary.go b/goldengate/zero_etl_pipeline_summary.go new file mode 100644 index 0000000000..ac83c19789 --- /dev/null +++ b/goldengate/zero_etl_pipeline_summary.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ZeroEtlPipelineSummary Summary of the ZeroETL pipeline. +type ZeroEtlPipelineSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + + // The Minimum number of OCPUs to be made available for this Deployment. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + ProcessOptions *ProcessOptions `mandatory:"true" json:"processOptions"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // When the resource was last updated. This option applies when retrieving a pipeline. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + TimeLastRecorded *common.SDKTime `mandatory:"false" json:"timeLastRecorded"` + + // Lifecycle state for the pipeline summary. + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + + // Possible lifecycle substates when retrieving a pipeline. + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` +} + +// GetId returns Id +func (m ZeroEtlPipelineSummary) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m ZeroEtlPipelineSummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m ZeroEtlPipelineSummary) GetDescription() *string { + return m.Description +} + +// GetCompartmentId returns CompartmentId +func (m ZeroEtlPipelineSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m ZeroEtlPipelineSummary) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m ZeroEtlPipelineSummary) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetFreeformTags returns FreeformTags +func (m ZeroEtlPipelineSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetLicenseModel returns LicenseModel +func (m ZeroEtlPipelineSummary) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m ZeroEtlPipelineSummary) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m ZeroEtlPipelineSummary) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetDefinedTags returns DefinedTags +func (m ZeroEtlPipelineSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m ZeroEtlPipelineSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m ZeroEtlPipelineSummary) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleState returns LifecycleState +func (m ZeroEtlPipelineSummary) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleSubState returns LifecycleSubState +func (m ZeroEtlPipelineSummary) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m ZeroEtlPipelineSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeCreated returns TimeCreated +func (m ZeroEtlPipelineSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m ZeroEtlPipelineSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m ZeroEtlPipelineSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ZeroEtlPipelineSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPipelineLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ZeroEtlPipelineSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeZeroEtlPipelineSummary ZeroEtlPipelineSummary + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeZeroEtlPipelineSummary + }{ + "ZERO_ETL", + (MarshalTypeZeroEtlPipelineSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/stackmonitoring/http_protocol_types.go b/stackmonitoring/http_protocol_types.go new file mode 100644 index 0000000000..a010bea8a3 --- /dev/null +++ b/stackmonitoring/http_protocol_types.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "strings" +) + +// HttpProtocolTypesEnum Enum with underlying type: string +type HttpProtocolTypesEnum string + +// Set of constants representing the allowable values for HttpProtocolTypesEnum +const ( + HttpProtocolTypesHttp HttpProtocolTypesEnum = "HTTP" + HttpProtocolTypesHttps HttpProtocolTypesEnum = "HTTPS" +) + +var mappingHttpProtocolTypesEnum = map[string]HttpProtocolTypesEnum{ + "HTTP": HttpProtocolTypesHttp, + "HTTPS": HttpProtocolTypesHttps, +} + +var mappingHttpProtocolTypesEnumLowerCase = map[string]HttpProtocolTypesEnum{ + "http": HttpProtocolTypesHttp, + "https": HttpProtocolTypesHttps, +} + +// GetHttpProtocolTypesEnumValues Enumerates the set of values for HttpProtocolTypesEnum +func GetHttpProtocolTypesEnumValues() []HttpProtocolTypesEnum { + values := make([]HttpProtocolTypesEnum, 0) + for _, v := range mappingHttpProtocolTypesEnum { + values = append(values, v) + } + return values +} + +// GetHttpProtocolTypesEnumStringValues Enumerates the set of values in String for HttpProtocolTypesEnum +func GetHttpProtocolTypesEnumStringValues() []string { + return []string{ + "HTTP", + "HTTPS", + } +} + +// GetMappingHttpProtocolTypesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHttpProtocolTypesEnum(val string) (HttpProtocolTypesEnum, bool) { + enum, ok := mappingHttpProtocolTypesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/stackmonitoring/http_query_properties.go b/stackmonitoring/http_query_properties.go new file mode 100644 index 0000000000..6a1bf3daf9 --- /dev/null +++ b/stackmonitoring/http_query_properties.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpQueryProperties Query properties applicable to HTTP type of collection method +type HttpQueryProperties struct { + + // Http(s) end point URL + Url *string `mandatory:"true" json:"url"` + + ScriptDetails *HttpScriptFileDetails `mandatory:"true" json:"scriptDetails"` + + // Type of content response given by the http(s) URL + ResponseContentType HttpResponseContentTypesEnum `mandatory:"true" json:"responseContentType"` + + // Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + ProtocolType HttpProtocolTypesEnum `mandatory:"false" json:"protocolType,omitempty"` +} + +func (m HttpQueryProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HttpQueryProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingHttpResponseContentTypesEnum(string(m.ResponseContentType)); !ok && m.ResponseContentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResponseContentType: %s. Supported values are: %s.", m.ResponseContentType, strings.Join(GetHttpResponseContentTypesEnumStringValues(), ","))) + } + if _, ok := GetMappingHttpProtocolTypesEnum(string(m.ProtocolType)); !ok && m.ProtocolType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtocolType: %s. Supported values are: %s.", m.ProtocolType, strings.Join(GetHttpProtocolTypesEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HttpQueryProperties) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHttpQueryProperties HttpQueryProperties + s := struct { + DiscriminatorParam string `json:"collectionMethod"` + MarshalTypeHttpQueryProperties + }{ + "HTTP", + (MarshalTypeHttpQueryProperties)(m), + } + + return json.Marshal(&s) +} diff --git a/stackmonitoring/http_response_content_types.go b/stackmonitoring/http_response_content_types.go new file mode 100644 index 0000000000..5dc0d4fe98 --- /dev/null +++ b/stackmonitoring/http_response_content_types.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "strings" +) + +// HttpResponseContentTypesEnum Enum with underlying type: string +type HttpResponseContentTypesEnum string + +// Set of constants representing the allowable values for HttpResponseContentTypesEnum +const ( + HttpResponseContentTypesTextPlain HttpResponseContentTypesEnum = "TEXT_PLAIN" + HttpResponseContentTypesTextHtml HttpResponseContentTypesEnum = "TEXT_HTML" + HttpResponseContentTypesApplicationJson HttpResponseContentTypesEnum = "APPLICATION_JSON" + HttpResponseContentTypesApplicationXml HttpResponseContentTypesEnum = "APPLICATION_XML" +) + +var mappingHttpResponseContentTypesEnum = map[string]HttpResponseContentTypesEnum{ + "TEXT_PLAIN": HttpResponseContentTypesTextPlain, + "TEXT_HTML": HttpResponseContentTypesTextHtml, + "APPLICATION_JSON": HttpResponseContentTypesApplicationJson, + "APPLICATION_XML": HttpResponseContentTypesApplicationXml, +} + +var mappingHttpResponseContentTypesEnumLowerCase = map[string]HttpResponseContentTypesEnum{ + "text_plain": HttpResponseContentTypesTextPlain, + "text_html": HttpResponseContentTypesTextHtml, + "application_json": HttpResponseContentTypesApplicationJson, + "application_xml": HttpResponseContentTypesApplicationXml, +} + +// GetHttpResponseContentTypesEnumValues Enumerates the set of values for HttpResponseContentTypesEnum +func GetHttpResponseContentTypesEnumValues() []HttpResponseContentTypesEnum { + values := make([]HttpResponseContentTypesEnum, 0) + for _, v := range mappingHttpResponseContentTypesEnum { + values = append(values, v) + } + return values +} + +// GetHttpResponseContentTypesEnumStringValues Enumerates the set of values in String for HttpResponseContentTypesEnum +func GetHttpResponseContentTypesEnumStringValues() []string { + return []string{ + "TEXT_PLAIN", + "TEXT_HTML", + "APPLICATION_JSON", + "APPLICATION_XML", + } +} + +// GetMappingHttpResponseContentTypesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHttpResponseContentTypesEnum(val string) (HttpResponseContentTypesEnum, bool) { + enum, ok := mappingHttpResponseContentTypesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/stackmonitoring/http_script_file_details.go b/stackmonitoring/http_script_file_details.go new file mode 100644 index 0000000000..ff82d6940b --- /dev/null +++ b/stackmonitoring/http_script_file_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpScriptFileDetails JavaScript file details which is used to convert http(s) response into metric data +type HttpScriptFileDetails struct { + + // Name of the script file + Name *string `mandatory:"true" json:"name"` + + // Content of the JavaScript file as base64 encoded string + Content *string `mandatory:"true" json:"content"` +} + +func (m HttpScriptFileDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HttpScriptFileDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/stackmonitoring/http_update_query_properties.go b/stackmonitoring/http_update_query_properties.go new file mode 100644 index 0000000000..35bd25ae9f --- /dev/null +++ b/stackmonitoring/http_update_query_properties.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpUpdateQueryProperties Query properties applicable to HTTP type of collection method +type HttpUpdateQueryProperties struct { + + // Http(s) end point URL + Url *string `mandatory:"false" json:"url"` + + ScriptDetails *UpdateHttpScriptFileDetails `mandatory:"false" json:"scriptDetails"` + + // Type of content response given by the http(s) URL + ResponseContentType HttpResponseContentTypesEnum `mandatory:"false" json:"responseContentType,omitempty"` + + // Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + ProtocolType HttpProtocolTypesEnum `mandatory:"false" json:"protocolType,omitempty"` +} + +func (m HttpUpdateQueryProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HttpUpdateQueryProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingHttpResponseContentTypesEnum(string(m.ResponseContentType)); !ok && m.ResponseContentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResponseContentType: %s. Supported values are: %s.", m.ResponseContentType, strings.Join(GetHttpResponseContentTypesEnumStringValues(), ","))) + } + if _, ok := GetMappingHttpProtocolTypesEnum(string(m.ProtocolType)); !ok && m.ProtocolType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtocolType: %s. Supported values are: %s.", m.ProtocolType, strings.Join(GetHttpProtocolTypesEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HttpUpdateQueryProperties) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHttpUpdateQueryProperties HttpUpdateQueryProperties + s := struct { + DiscriminatorParam string `json:"collectionMethod"` + MarshalTypeHttpUpdateQueryProperties + }{ + "HTTP", + (MarshalTypeHttpUpdateQueryProperties)(m), + } + + return json.Marshal(&s) +} diff --git a/stackmonitoring/list_metric_extensions_request_response.go b/stackmonitoring/list_metric_extensions_request_response.go index 68c0b9bbb1..92672b7173 100644 --- a/stackmonitoring/list_metric_extensions_request_response.go +++ b/stackmonitoring/list_metric_extensions_request_response.go @@ -18,9 +18,6 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/stackmonitoring/ListMetricExtensions.go.html to see an example of how to use ListMetricExtensionsRequest. type ListMetricExtensionsRequest struct { - // The ID of the compartment in which data is listed. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - // For list pagination. The maximum number of results per page, or items to return in a // paginated "List" call. For important details about how pagination works, see // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -38,6 +35,9 @@ type ListMetricExtensionsRequest struct { // The sort order to use, either ascending (`ASC`) or descending (`DESC`). SortOrder ListMetricExtensionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + // The ID of the compartment in which data is listed. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + // A filter to return resources based on resource type. ResourceType *string `mandatory:"false" contributesTo:"query" name:"resourceType"` @@ -53,6 +53,9 @@ type ListMetricExtensionsRequest struct { // A filter to return metric extensions based on input resource Id on which metric extension is enabled EnabledOnResourceId *string `mandatory:"false" contributesTo:"query" name:"enabledOnResourceId"` + // Identifier for the metric extension + MetricExtensionId *string `mandatory:"false" contributesTo:"query" name:"metricExtensionId"` + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a // particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` @@ -144,18 +147,21 @@ type ListMetricExtensionsSortByEnum string // Set of constants representing the allowable values for ListMetricExtensionsSortByEnum const ( - ListMetricExtensionsSortByName ListMetricExtensionsSortByEnum = "NAME" - ListMetricExtensionsSortByTimeCreated ListMetricExtensionsSortByEnum = "TIME_CREATED" + ListMetricExtensionsSortByName ListMetricExtensionsSortByEnum = "NAME" + ListMetricExtensionsSortByTimeCreated ListMetricExtensionsSortByEnum = "TIME_CREATED" + ListMetricExtensionsSortByEnabledOnResourceCount ListMetricExtensionsSortByEnum = "ENABLED_ON_RESOURCE_COUNT" ) var mappingListMetricExtensionsSortByEnum = map[string]ListMetricExtensionsSortByEnum{ - "NAME": ListMetricExtensionsSortByName, - "TIME_CREATED": ListMetricExtensionsSortByTimeCreated, + "NAME": ListMetricExtensionsSortByName, + "TIME_CREATED": ListMetricExtensionsSortByTimeCreated, + "ENABLED_ON_RESOURCE_COUNT": ListMetricExtensionsSortByEnabledOnResourceCount, } var mappingListMetricExtensionsSortByEnumLowerCase = map[string]ListMetricExtensionsSortByEnum{ - "name": ListMetricExtensionsSortByName, - "time_created": ListMetricExtensionsSortByTimeCreated, + "name": ListMetricExtensionsSortByName, + "time_created": ListMetricExtensionsSortByTimeCreated, + "enabled_on_resource_count": ListMetricExtensionsSortByEnabledOnResourceCount, } // GetListMetricExtensionsSortByEnumValues Enumerates the set of values for ListMetricExtensionsSortByEnum @@ -172,6 +178,7 @@ func GetListMetricExtensionsSortByEnumStringValues() []string { return []string{ "NAME", "TIME_CREATED", + "ENABLED_ON_RESOURCE_COUNT", } } diff --git a/stackmonitoring/metric_extension_collection_methods.go b/stackmonitoring/metric_extension_collection_methods.go index 319ac9c9b2..f80b101db8 100644 --- a/stackmonitoring/metric_extension_collection_methods.go +++ b/stackmonitoring/metric_extension_collection_methods.go @@ -21,18 +21,21 @@ const ( MetricExtensionCollectionMethodsOsCommand MetricExtensionCollectionMethodsEnum = "OS_COMMAND" MetricExtensionCollectionMethodsSql MetricExtensionCollectionMethodsEnum = "SQL" MetricExtensionCollectionMethodsJmx MetricExtensionCollectionMethodsEnum = "JMX" + MetricExtensionCollectionMethodsHttp MetricExtensionCollectionMethodsEnum = "HTTP" ) var mappingMetricExtensionCollectionMethodsEnum = map[string]MetricExtensionCollectionMethodsEnum{ "OS_COMMAND": MetricExtensionCollectionMethodsOsCommand, "SQL": MetricExtensionCollectionMethodsSql, "JMX": MetricExtensionCollectionMethodsJmx, + "HTTP": MetricExtensionCollectionMethodsHttp, } var mappingMetricExtensionCollectionMethodsEnumLowerCase = map[string]MetricExtensionCollectionMethodsEnum{ "os_command": MetricExtensionCollectionMethodsOsCommand, "sql": MetricExtensionCollectionMethodsSql, "jmx": MetricExtensionCollectionMethodsJmx, + "http": MetricExtensionCollectionMethodsHttp, } // GetMetricExtensionCollectionMethodsEnumValues Enumerates the set of values for MetricExtensionCollectionMethodsEnum @@ -50,6 +53,7 @@ func GetMetricExtensionCollectionMethodsEnumStringValues() []string { "OS_COMMAND", "SQL", "JMX", + "HTTP", } } diff --git a/stackmonitoring/metric_extension_query_properties.go b/stackmonitoring/metric_extension_query_properties.go index 97afa6eaf0..a24eb98bac 100644 --- a/stackmonitoring/metric_extension_query_properties.go +++ b/stackmonitoring/metric_extension_query_properties.go @@ -62,6 +62,10 @@ func (m *metricextensionqueryproperties) UnmarshalPolymorphicJSON(data []byte) ( mm := JmxQueryProperties{} err = json.Unmarshal(data, &mm) return mm, err + case "HTTP": + mm := HttpQueryProperties{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for MetricExtensionQueryProperties: %s.", m.CollectionMethod) return *m, nil diff --git a/stackmonitoring/metric_extension_sort_by.go b/stackmonitoring/metric_extension_sort_by.go index 7eb15bd835..fc8003bcaa 100644 --- a/stackmonitoring/metric_extension_sort_by.go +++ b/stackmonitoring/metric_extension_sort_by.go @@ -18,18 +18,21 @@ type MetricExtensionSortByEnum string // Set of constants representing the allowable values for MetricExtensionSortByEnum const ( - MetricExtensionSortByName MetricExtensionSortByEnum = "NAME" - MetricExtensionSortByTimeCreated MetricExtensionSortByEnum = "TIME_CREATED" + MetricExtensionSortByName MetricExtensionSortByEnum = "NAME" + MetricExtensionSortByTimeCreated MetricExtensionSortByEnum = "TIME_CREATED" + MetricExtensionSortByEnabledOnResourceCount MetricExtensionSortByEnum = "ENABLED_ON_RESOURCE_COUNT" ) var mappingMetricExtensionSortByEnum = map[string]MetricExtensionSortByEnum{ - "NAME": MetricExtensionSortByName, - "TIME_CREATED": MetricExtensionSortByTimeCreated, + "NAME": MetricExtensionSortByName, + "TIME_CREATED": MetricExtensionSortByTimeCreated, + "ENABLED_ON_RESOURCE_COUNT": MetricExtensionSortByEnabledOnResourceCount, } var mappingMetricExtensionSortByEnumLowerCase = map[string]MetricExtensionSortByEnum{ - "name": MetricExtensionSortByName, - "time_created": MetricExtensionSortByTimeCreated, + "name": MetricExtensionSortByName, + "time_created": MetricExtensionSortByTimeCreated, + "enabled_on_resource_count": MetricExtensionSortByEnabledOnResourceCount, } // GetMetricExtensionSortByEnumValues Enumerates the set of values for MetricExtensionSortByEnum @@ -46,6 +49,7 @@ func GetMetricExtensionSortByEnumStringValues() []string { return []string{ "NAME", "TIME_CREATED", + "ENABLED_ON_RESOURCE_COUNT", } } diff --git a/stackmonitoring/metric_extension_update_query_properties.go b/stackmonitoring/metric_extension_update_query_properties.go index 7577f1d5b3..84b71ac4b1 100644 --- a/stackmonitoring/metric_extension_update_query_properties.go +++ b/stackmonitoring/metric_extension_update_query_properties.go @@ -62,6 +62,10 @@ func (m *metricextensionupdatequeryproperties) UnmarshalPolymorphicJSON(data []b mm := OsCommandUpdateQueryProperties{} err = json.Unmarshal(data, &mm) return mm, err + case "HTTP": + mm := HttpUpdateQueryProperties{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for MetricExtensionUpdateQueryProperties: %s.", m.CollectionMethod) return *m, nil diff --git a/stackmonitoring/script_file_details.go b/stackmonitoring/script_file_details.go index 855fb2b186..d31e0630c8 100644 --- a/stackmonitoring/script_file_details.go +++ b/stackmonitoring/script_file_details.go @@ -15,7 +15,7 @@ import ( "strings" ) -// ScriptFileDetails Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data +// ScriptFileDetails Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data. For removing it during update, set its "content" property to an empty string. In that case, "name" property value is ignored. type ScriptFileDetails struct { // Name of the script file diff --git a/stackmonitoring/sql_out_param_details.go b/stackmonitoring/sql_out_param_details.go index 3b75c1c9fa..3330d39200 100644 --- a/stackmonitoring/sql_out_param_details.go +++ b/stackmonitoring/sql_out_param_details.go @@ -18,11 +18,14 @@ import ( // SqlOutParamDetails Position and SQL Type of PL/SQL OUT parameter type SqlOutParamDetails struct { - // Position of PL/SQL procedure OUT parameter + // Position of PL/SQL procedure OUT parameter. The value of this property is ignored during update, if "outParamType" is set to NO_OUT_PARAM value. OutParamPosition *int `mandatory:"true" json:"outParamPosition"` - // SQL Type of PL/SQL procedure OUT parameter + // SQL Type of PL/SQL procedure OUT parameter. During the update, to completely remove the out parameter, use the value NO_OUT_PARAM. In that case, the value of "outParamPosition" will be ignored. OutParamType SqlOutParamTypesEnum `mandatory:"true" json:"outParamType"` + + // Name of the Out Parameter + OutParamName *string `mandatory:"false" json:"outParamName"` } func (m SqlOutParamDetails) String() string { diff --git a/stackmonitoring/sql_out_param_types.go b/stackmonitoring/sql_out_param_types.go index cf5f19d754..679f38ee65 100644 --- a/stackmonitoring/sql_out_param_types.go +++ b/stackmonitoring/sql_out_param_types.go @@ -18,18 +18,21 @@ type SqlOutParamTypesEnum string // Set of constants representing the allowable values for SqlOutParamTypesEnum const ( - SqlOutParamTypesSqlCursor SqlOutParamTypesEnum = "SQL_CURSOR" - SqlOutParamTypesArray SqlOutParamTypesEnum = "ARRAY" + SqlOutParamTypesSqlCursor SqlOutParamTypesEnum = "SQL_CURSOR" + SqlOutParamTypesArray SqlOutParamTypesEnum = "ARRAY" + SqlOutParamTypesNoOutParam SqlOutParamTypesEnum = "NO_OUT_PARAM" ) var mappingSqlOutParamTypesEnum = map[string]SqlOutParamTypesEnum{ - "SQL_CURSOR": SqlOutParamTypesSqlCursor, - "ARRAY": SqlOutParamTypesArray, + "SQL_CURSOR": SqlOutParamTypesSqlCursor, + "ARRAY": SqlOutParamTypesArray, + "NO_OUT_PARAM": SqlOutParamTypesNoOutParam, } var mappingSqlOutParamTypesEnumLowerCase = map[string]SqlOutParamTypesEnum{ - "sql_cursor": SqlOutParamTypesSqlCursor, - "array": SqlOutParamTypesArray, + "sql_cursor": SqlOutParamTypesSqlCursor, + "array": SqlOutParamTypesArray, + "no_out_param": SqlOutParamTypesNoOutParam, } // GetSqlOutParamTypesEnumValues Enumerates the set of values for SqlOutParamTypesEnum @@ -46,6 +49,7 @@ func GetSqlOutParamTypesEnumStringValues() []string { return []string{ "SQL_CURSOR", "ARRAY", + "NO_OUT_PARAM", } } diff --git a/stackmonitoring/update_http_script_file_details.go b/stackmonitoring/update_http_script_file_details.go new file mode 100644 index 0000000000..09a37de519 --- /dev/null +++ b/stackmonitoring/update_http_script_file_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateHttpScriptFileDetails JavaScript file details which is used to convert http(s) response into metric data +type UpdateHttpScriptFileDetails struct { + + // Name of the script file + Name *string `mandatory:"false" json:"name"` + + // Content of the JavaScript file as base64 encoded string + Content *string `mandatory:"false" json:"content"` +} + +func (m UpdateHttpScriptFileDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateHttpScriptFileDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +}