From d7d3e35b54238bbe10eee71de833daabbcf6d0eb Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 6 Aug 2024 08:35:28 +0000 Subject: [PATCH] Releasing version 65.71.0 --- CHANGELOG.md | 27 + bds/auto_scale_policy_metric_rule.go | 12 +- bds/batching_based_odh_patching_config.go | 57 + bds/batching_based_patching_configs.go | 2 +- bds/bds_client.go | 357 ++ ...esource_principal_configuration_details.go | 45 + ...rincipal_configuration_request_response.go | 100 + bds/domain_based_odh_patching_config.go | 54 + bds/domain_based_patching_configs.go | 57 + bds/downtime_based_odh_patching_config.go | 51 + ...orce_refresh_resource_principal_details.go | 39 + ...esh_resource_principal_request_response.go | 110 + ...rincipal_configuration_request_response.go | 96 + bds/install_patch_details.go | 33 + ...incipal_configurations_request_response.go | 206 + bds/node.go | 3 + bds/odh_patching_config.go | 131 + bds/operation_types.go | 286 +- bds/patching_configs.go | 10 +- ...esource_principal_configuration_details.go | 39 + ...rincipal_configuration_request_response.go | 103 + bds/resource_principal_configuration.go | 124 + ...esource_principal_configuration_summary.go | 63 + ...esource_principal_configuration_details.go | 42 + ...rincipal_configuration_request_response.go | 110 + .../auth/resource_principal_key_provider.go | 99 + .../resource_principal_key_provider_test.go | 77 + .../resource_principal_token_path_provider.go | 27 + common/auth/resource_principals_v3.go | 351 ++ common/auth/resource_principals_v3_test.go | 150 + common/regions.go | 4 + common/regions.json | 6 + common/version.go | 2 +- devops/approval_activity_summary.go | 130 + devops/approval_rule.go | 48 + devops/approval_rule_collection.go | 39 + devops/approval_rule_merge_check.go | 159 + devops/build_merge_check.go | 60 + devops/build_run_snapshot.go | 121 + devops/build_run_snapshot_collection.go | 39 + devops/build_run_snapshot_summary.go | 63 + devops/comment_activity_summary.go | 85 + devops/commit_activity_summary.go | 88 + devops/commit_analytics_author_collection.go | 39 + devops/commit_analytics_author_summary.go | 42 + devops/conflict_merge_check.go | 99 + devops/create_or_update_git_branch_details.go | 62 + devops/create_or_update_git_ref_details.go | 133 + ...eate_or_update_git_ref_request_response.go | 107 + devops/create_or_update_git_tag_details.go | 62 + ...eate_or_update_protected_branch_details.go | 48 + ...pdate_protected_branch_request_response.go | 104 + ...ull_request_attachment_request_response.go | 110 + devops/create_pull_request_comment_details.go | 57 + ...e_pull_request_comment_request_response.go | 98 + devops/create_pull_request_details.go | 63 + .../create_pull_request_request_response.go | 104 + devops/create_repository_details.go | 4 + devops/create_reviewer_details.go | 39 + .../decline_pull_request_request_response.go | 98 + devops/delete_git_ref_details.go | 39 + devops/delete_git_ref_request_response.go | 98 + ...ct_repository_settings_request_response.go | 92 + devops/delete_protected_branch_details.go | 39 + ...elete_protected_branch_request_response.go | 95 + ...ull_request_attachment_request_response.go | 92 + ...e_pull_request_comment_request_response.go | 92 + .../delete_pull_request_request_response.go | 89 + ...te_repository_settings_request_response.go | 92 + devops/deploy_artifact_source.go | 20 +- devops/devops_client.go | 5346 +++++++++++++---- devops/devops_code_repository_filter.go | 14 +- ...evops_code_repository_filter_attributes.go | 3 + devops/execute_merge_pull_request_details.go | 108 + devops/fork_sync_status_collection.go | 39 + devops/fork_sync_status_summary.go | 94 + devops/generic_artifact_location_details.go | 115 + devops/generic_artifacts.go | 94 + devops/get_commit_diff_request_response.go | 3 + ...otification_preference_request_response.go | 95 + ...ct_repository_settings_request_response.go | 92 + ...est_attachment_content_request_response.go | 96 + ...ull_request_attachment_request_response.go | 95 + ...change_summary_metrics_request_response.go | 89 + ...t_pull_request_comment_request_response.go | 95 + ...otification_preference_request_response.go | 95 + devops/get_pull_request_request_response.go | 92 + ...otification_preference_request_response.go | 95 + ...et_repository_settings_request_response.go | 92 + ...e_pull_request_comment_request_response.go | 98 + ...st_build_run_snapshots_request_response.go | 203 + devops/list_commit_diffs_request_response.go | 3 + ...ist_fork_sync_statuses_request_response.go | 98 + ...mmit_analytics_authors_request_response.go | 190 + ...ist_protected_branches_request_response.go | 193 + ...ull_request_activities_request_response.go | 206 + ...ll_request_attachments_request_response.go | 204 + ...t_pull_request_authors_request_response.go | 146 + ..._pull_request_comments_request_response.go | 206 + ...t_pull_request_commits_request_response.go | 98 + ...l_request_file_changes_request_response.go | 101 + devops/list_pull_requests_request_response.go | 230 + ...mmit_analytics_authors_request_response.go | 190 + devops/merge_check.go | 131 + devops/merge_check_collection.go | 93 + devops/merge_check_settings_value.go | 56 + devops/merge_checks.go | 42 + devops/merge_pull_request_details.go | 123 + devops/merge_pull_request_request_response.go | 107 + devops/merge_settings.go | 45 + devops/merge_strategy.go | 76 + devops/metric_name.go | 92 + devops/mirror_repository_config.go | 2 +- ...orage_generic_artifact_location_details.go | 63 + devops/operation_type.go | 28 + devops/patch_insert_instruction.go | 117 + devops/patch_instruction.go | 175 + devops/patch_merge_instruction.go | 70 + devops/patch_move_instruction.go | 121 + devops/patch_prohibit_instruction.go | 69 + devops/patch_pull_request_details.go | 66 + devops/patch_pull_request_request_response.go | 101 + devops/patch_remove_instruction.go | 62 + devops/patch_replace_instruction.go | 67 + devops/patch_require_instruction.go | 68 + devops/principal_details.go | 150 + devops/project_notification_preference.go | 94 + devops/project_repository_settings.go | 39 + devops/protected_branch.go | 53 + devops/protected_branch_collection.go | 39 + devops/protected_branch_summary.go | 56 + devops/protection_level.go | 56 + devops/pull_request.go | 220 + devops/pull_request_activity_collection.go | 66 + devops/pull_request_activity_summary.go | 186 + devops/pull_request_attachment.go | 50 + devops/pull_request_attachment_collection.go | 39 + devops/pull_request_attachment_summary.go | 50 + devops/pull_request_author_collection.go | 39 + devops/pull_request_author_summary.go | 37 + devops/pull_request_change_summary_metrics.go | 45 + devops/pull_request_collection.go | 39 + devops/pull_request_comment.go | 216 + devops/pull_request_comment_collection.go | 39 + .../pull_request_comment_like_collection.go | 42 + devops/pull_request_comment_summary.go | 90 + devops/pull_request_file_change_collection.go | 39 + devops/pull_request_file_change_summary.go | 75 + ...pull_request_lifecycle_activity_summary.go | 138 + .../pull_request_notification_preference.go | 94 + devops/pull_request_summary.go | 101 + .../reopen_pull_request_request_response.go | 98 + devops/repository.go | 12 + devops/repository_analytics_details.go | 153 + devops/repository_metric_aggregation.go | 39 + devops/repository_metric_summary.go | 58 + devops/repository_notification_preference.go | 98 + devops/repository_settings.go | 41 + devops/repository_summary.go | 4 + devops/review_pull_request_details.go | 84 + .../review_pull_request_request_response.go | 104 + devops/reviewer.go | 198 + devops/reviewer_activity_summary.go | 88 + devops/stage_output.go | 133 + ...ze_project_repository_analytics_details.go | 153 + ...t_repository_analytics_request_response.go | 101 + .../summarize_repository_analytics_details.go | 153 + ...e_repository_analytics_request_response.go | 101 + devops/sync_repository_details.go | 42 + devops/sync_repository_request_response.go | 147 + devops/test_report_output.go | 62 + ...e_pull_request_comment_request_response.go | 98 + ...subscribe_pull_request_request_response.go | 102 + devops/update_approval_rule_details.go | 48 + ...update_approval_rule_details_collection.go | 39 + ...project_notification_preference_details.go | 42 + ...otification_preference_request_response.go | 104 + ...ate_project_repository_settings_details.go | 39 + ...ct_repository_settings_request_response.go | 104 + devops/update_pull_request_comment_details.go | 39 + ...e_pull_request_comment_request_response.go | 101 + devops/update_pull_request_details.go | 54 + ...request_notification_preference_details.go | 42 + ...otification_preference_request_response.go | 104 + .../update_pull_request_request_response.go | 104 + devops/update_repository_details.go | 1 + ...ository_notification_preference_details.go | 42 + ...otification_preference_request_response.go | 104 + devops/update_repository_settings_details.go | 41 + ...te_repository_settings_request_response.go | 104 + devops/update_reviewer_details.go | 39 + devops/validate_merge_pull_request_details.go | 51 + emwarehouse/emwarehouse_client.go | 26 +- jms/action_type.go | 4 +- jms/add_fleet_installation_sites_details.go | 4 +- ...eet_installation_sites_request_response.go | 2 +- jms/advanced_usage_tracking.go | 4 +- jms/agent.go | 4 +- jms/agent_installer_collection.go | 39 + jms/agent_installer_sort_by.go | 60 + jms/agent_installer_summary.go | 75 + jms/agent_type.go | 4 +- jms/algorithms.go | 4 +- jms/announcement_collection.go | 4 +- jms/announcement_sort_by.go | 4 +- jms/announcement_summary.go | 4 +- jms/application_execution_type.go | 4 +- jms/application_installation_sort_by.go | 8 +- jms/application_installation_usage_summary.go | 10 +- ...n_installation_usage_summary_collection.go | 4 +- jms/application_sort_by.go | 8 +- jms/application_usage.go | 11 +- jms/application_usage_collection.go | 4 +- jms/application_work_item_details.go | 4 +- jms/artifact_content_type.go | 4 +- jms/basic_work_item_details.go | 4 +- jms/blocklist.go | 4 +- jms/blocklist_collection.go | 4 +- jms/blocklist_entry.go | 4 +- jms/blocklist_sort_by.go | 4 +- jms/blocklist_target.go | 4 +- jms/cancel_work_request_request_response.go | 2 +- jms/change_fleet_compartment_details.go | 4 +- ...ange_fleet_compartment_request_response.go | 2 +- jms/create_blocklist_details.go | 4 +- jms/create_blocklist_request_response.go | 2 +- jms/create_drs_file_details.go | 4 +- jms/create_drs_file_request_response.go | 2 +- jms/create_fleet_details.go | 4 +- jms/create_fleet_request_response.go | 2 +- jms/create_jms_plugin_details.go | 53 + jms/create_jms_plugin_request_response.go | 100 + jms/crypto_analysis_result.go | 10 +- jms/crypto_analysis_result_collection.go | 4 +- jms/crypto_analysis_result_mode.go | 4 +- jms/crypto_analysis_result_sort_by.go | 4 +- jms/crypto_analysis_result_summary.go | 10 +- jms/crypto_event_analysis.go | 4 +- jms/custom_log.go | 4 +- jms/delete_blocklist_request_response.go | 2 +- ...crypto_analysis_result_request_response.go | 2 +- jms/delete_drs_file_request_response.go | 2 +- jms/delete_fleet_request_response.go | 2 +- ...ration_analysis_result_request_response.go | 2 +- jms/delete_jms_plugin_request_response.go | 94 + ...tuning_analysis_result_request_response.go | 2 +- ...ployed_application_installation_sort_by.go | 54 +- ..._application_installation_usage_summary.go | 9 +- ...n_installation_usage_summary_collection.go | 4 +- ...d_application_migration_analyses_target.go | 52 + jms/deployed_application_sort_by.go | 48 +- jms/deployed_application_usage.go | 7 +- jms/deployed_application_usage_collection.go | 4 +- jms/deployed_application_work_item_details.go | 74 + jms/disable_drs_details.go | 4 +- jms/disable_drs_request_response.go | 2 +- jms/drs_file.go | 4 +- jms/drs_file_collection.go | 4 +- jms/drs_file_sort_by.go | 4 +- jms/drs_file_status.go | 4 +- jms/drs_file_summary.go | 4 +- jms/drs_target.go | 4 +- jms/enable_drs_details.go | 4 +- jms/enable_drs_request_response.go | 2 +- jms/existing_installation_site_id.go | 4 +- jms/export_duration.go | 4 +- jms/export_frequency.go | 4 +- jms/export_resources.go | 4 +- jms/export_run_status.go | 4 +- jms/export_setting.go | 8 +- jms/export_status.go | 4 +- jms/fleet.go | 4 +- jms/fleet_advanced_feature_configuration.go | 4 +- jms/fleet_agent_configuration.go | 10 +- jms/fleet_agent_os_configuration.go | 4 +- jms/fleet_collection.go | 4 +- jms/fleet_diagnosis_collection.go | 4 +- jms/fleet_diagnosis_summary.go | 4 +- jms/fleet_summary.go | 4 +- jms/generate_agent_deploy_script_details.go | 4 +- ...te_agent_deploy_script_request_response.go | 2 +- ...e_agent_installer_configuration_details.go | 42 + ...nstaller_configuration_request_response.go | 97 + jms/generate_load_pipeline_script_details.go | 48 + ...e_load_pipeline_script_request_response.go | 100 + ...crypto_analysis_result_request_response.go | 2 +- jms/get_drs_file_request_response.go | 2 +- jms/get_export_setting_request_response.go | 2 +- jms/get_export_status_request_response.go | 2 +- ..._feature_configuration_request_response.go | 2 +- ...et_agent_configuration_request_response.go | 2 +- jms/get_fleet_request_response.go | 2 +- jms/get_java_family_request_response.go | 2 +- ...ration_analysis_result_request_response.go | 2 +- jms/get_java_release_request_response.go | 2 +- jms/get_jms_plugin_request_response.go | 96 + ...tuning_analysis_result_request_response.go | 2 +- jms/get_work_request_request_response.go | 2 +- jms/global_logging_level.go | 4 +- jms/installation_site.go | 4 +- jms/installation_site_collection.go | 4 +- jms/installation_site_sort_by.go | 4 +- jms/installation_site_summary.go | 4 +- jms/installation_sort_by.go | 4 +- jms/installation_usage.go | 4 +- jms/installation_usage_collection.go | 4 +- jms/java_artifact.go | 6 +- jms/java_family.go | 7 +- jms/java_family_collection.go | 4 +- jms/java_family_sort_by.go | 4 +- jms/java_family_summary.go | 7 +- jms/java_license.go | 4 +- jms/java_migration_analysis.go | 4 +- jms/java_migration_analysis_result.go | 4 +- ...va_migration_analysis_result_collection.go | 4 +- jms/java_migration_analysis_result_sort_by.go | 4 +- jms/java_migration_analysis_result_summary.go | 4 +- jms/java_migration_analysis_target.go | 9 +- jms/java_release.go | 4 +- jms/java_release_collection.go | 4 +- jms/java_release_sort_by.go | 4 +- jms/java_release_summary.go | 4 +- jms/java_runtime_id.go | 4 +- jms/java_server_instance_sort_by.go | 4 +- jms/java_server_instance_usage.go | 7 +- jms/java_server_instance_usage_collection.go | 4 +- jms/java_server_sort_by.go | 4 +- jms/java_server_usage.go | 4 +- jms/java_server_usage_collection.go | 4 +- jms/jfr_attachment_target.go | 4 +- jms/jfr_recording.go | 4 +- jms/jms_javamanagementservice_client.go | 675 ++- jms/jms_plugin.go | 107 + jms/jms_plugin_availability_status.go | 60 + jms/jms_plugin_collection.go | 39 + jms/jms_plugin_lifecycle_state.go | 64 + jms/jms_plugin_sort_by.go | 104 + jms/jms_plugin_summary.go | 107 + jms/jre_security_status.go | 4 +- jms/jre_sort_by.go | 4 +- jms/jre_usage.go | 4 +- jms/jre_usage_collection.go | 4 +- jms/key_size_algorithm.go | 4 +- jms/lcm.go | 4 +- jms/lcm_work_item_details.go | 4 +- jms/library_sort_by.go | 4 +- jms/library_usage.go | 10 +- jms/library_usage_collection.go | 4 +- jms/license_type.go | 4 +- jms/lifecycle_state.go | 4 +- jms/list_agent_installers_request_response.go | 314 + jms/list_announcements_request_response.go | 4 +- jms/list_blocklists_request_response.go | 4 +- ...rypto_analysis_results_request_response.go | 31 +- jms/list_drs_files_request_response.go | 4 +- jms/list_fleet_diagnoses_request_response.go | 4 +- jms/list_fleets_request_response.go | 6 +- ...ist_installation_sites_request_response.go | 4 +- jms/list_java_families_request_response.go | 4 +- ...ation_analysis_results_request_response.go | 22 +- jms/list_java_releases_request_response.go | 4 +- jms/list_jms_plugins_request_response.go | 376 ++ jms/list_jre_usage_request_response.go | 4 +- ...uning_analysis_results_request_response.go | 23 +- jms/list_work_items_request_response.go | 4 +- ...st_work_request_errors_request_response.go | 4 +- ...list_work_request_logs_request_response.go | 4 +- jms/list_work_requests_request_response.go | 133 +- jms/manage_drs_details.go | 4 +- jms/managed_instance_sort_by.go | 4 +- jms/managed_instance_type.go | 8 +- jms/managed_instance_usage.go | 7 +- jms/managed_instance_usage_collection.go | 4 +- jms/minimum_key_size_settings.go | 4 +- jms/new_installation_site.go | 4 +- jms/operating_system.go | 6 +- jms/operation_status.go | 4 +- jms/operation_type.go | 4 +- jms/os_family.go | 4 +- jms/package_type.go | 56 + jms/patch_detail.go | 4 +- jms/performance_tuning_analysis.go | 4 +- jms/performance_tuning_analysis_result.go | 8 +- ...mance_tuning_analysis_result_collection.go | 4 +- ...formance_tuning_analysis_result_sort_by.go | 8 +- ...formance_tuning_analysis_result_summary.go | 8 +- jms/performance_tuning_result_status.go | 4 +- jms/platform_architecture_type.go | 60 + jms/plugin.go | 4 +- jms/post_installation_action_settings.go | 4 +- jms/post_installation_actions.go | 4 +- jms/principal.go | 4 +- jms/proxies.go | 4 +- jms/release_type.go | 4 +- ...remove_fleet_installation_sites_details.go | 4 +- ...eet_installation_sites_request_response.go | 2 +- jms/request_crypto_analyses_details.go | 4 +- ...equest_crypto_analyses_request_response.go | 2 +- ..._application_migration_analyses_details.go | 40 + ...ion_migration_analyses_request_response.go | 94 + ...request_java_migration_analyses_details.go | 4 +- ...ava_migration_analyses_request_response.go | 2 +- jms/request_jfr_recordings_details.go | 4 +- ...request_jfr_recordings_request_response.go | 2 +- ...est_performance_tuning_analyses_details.go | 4 +- ...rmance_tuning_analyses_request_response.go | 2 +- jms/resource_inventory.go | 4 +- jms/scan_java_server_usage_details.go | 4 +- ...scan_java_server_usage_request_response.go | 2 +- jms/scan_library_usage_details.go | 4 +- jms/scan_library_usage_request_response.go | 2 +- jms/sort_by.go | 4 +- jms/sort_order.go | 4 +- ...ion_installation_usage_request_response.go | 8 +- jms/summarize_application_usage_fields.go | 4 +- ...rize_application_usage_request_response.go | 8 +- ...ion_installation_usage_request_response.go | 54 +- ...oyed_application_usage_request_response.go | 48 +- jms/summarize_installation_usage_fields.go | 4 +- ...ize_installation_usage_request_response.go | 4 +- ..._server_instance_usage_request_response.go | 4 +- ...rize_java_server_usage_request_response.go | 4 +- jms/summarize_jre_usage_fields.go | 4 +- jms/summarize_jre_usage_request_response.go | 4 +- ...ummarize_library_usage_request_response.go | 10 +- ...summarize_managed_instance_usage_fields.go | 4 +- ...managed_instance_usage_request_response.go | 14 +- ...ize_resource_inventory_request_response.go | 2 +- jms/summarized_events_log.go | 4 +- jms/support_type.go | 4 +- jms/tls_versions.go | 4 +- jms/update_drs_file_details.go | 4 +- jms/update_drs_file_request_response.go | 2 +- jms/update_export_setting_details.go | 8 +- jms/update_export_setting_request_response.go | 4 +- ..._advanced_feature_configuration_details.go | 4 +- ..._feature_configuration_request_response.go | 2 +- ...pdate_fleet_agent_configuration_details.go | 10 +- ...et_agent_configuration_request_response.go | 2 +- jms/update_fleet_details.go | 4 +- jms/update_fleet_request_response.go | 2 +- jms/update_jms_plugin_details.go | 47 + jms/update_jms_plugin_request_response.go | 103 + jms/work_item_collection.go | 4 +- jms/work_item_details.go | 30 +- jms/work_item_status.go | 8 +- jms/work_item_summary.go | 4 +- jms/work_item_type.go | 4 +- jms/work_request.go | 4 +- jms/work_request_collection.go | 4 +- jms/work_request_error.go | 4 +- jms/work_request_error_collection.go | 4 +- jms/work_request_log_entry.go | 4 +- jms/work_request_log_entry_collection.go | 4 +- jms/work_request_resource.go | 4 +- .../generate_artifact_download_url_details.go | 3 + .../jmsjavadownloads_javadownload_client.go | 6 +- ...t_java_download_tokens_request_response.go | 2 +- ...nse_acceptance_records_request_response.go | 2 +- .../create_custom_software_source_details.go | 8 + ...ersioned_custom_software_source_details.go | 8 + osmanagementhub/custom_software_source.go | 8 + .../osmanagementhub_softwaresource_client.go | 2 +- .../update_custom_software_source_details.go | 8 + .../versioned_custom_software_source.go | 8 + psql/backup.go | 2 +- psql/backup_summary.go | 2 +- psql/configuration.go | 59 +- psql/configuration_summary.go | 11 +- psql/create_configuration_details.go | 23 +- psql/create_db_system_details.go | 10 +- psql/default_configuration.go | 13 +- psql/default_configuration_summary.go | 13 +- psql/list_configurations_request_response.go | 2 +- ...default_configurations_request_response.go | 2 +- psql/management_policy_details.go | 5 +- psql/shape_memory_options.go | 52 + psql/shape_ocpu_options.go | 43 + psql/shape_summary.go | 7 + psql/update_db_system_details.go | 12 + psql/update_network_details.go | 40 + 481 files changed, 24767 insertions(+), 1962 deletions(-) create mode 100644 bds/batching_based_odh_patching_config.go create mode 100644 bds/create_resource_principal_configuration_details.go create mode 100644 bds/create_resource_principal_configuration_request_response.go create mode 100644 bds/domain_based_odh_patching_config.go create mode 100644 bds/domain_based_patching_configs.go create mode 100644 bds/downtime_based_odh_patching_config.go create mode 100644 bds/force_refresh_resource_principal_details.go create mode 100644 bds/force_refresh_resource_principal_request_response.go create mode 100644 bds/get_resource_principal_configuration_request_response.go create mode 100644 bds/list_resource_principal_configurations_request_response.go create mode 100644 bds/odh_patching_config.go create mode 100644 bds/remove_resource_principal_configuration_details.go create mode 100644 bds/remove_resource_principal_configuration_request_response.go create mode 100644 bds/resource_principal_configuration.go create mode 100644 bds/resource_principal_configuration_summary.go create mode 100644 bds/update_resource_principal_configuration_details.go create mode 100644 bds/update_resource_principal_configuration_request_response.go create mode 100644 common/auth/resource_principals_v3.go create mode 100644 common/auth/resource_principals_v3_test.go create mode 100644 devops/approval_activity_summary.go create mode 100644 devops/approval_rule.go create mode 100644 devops/approval_rule_collection.go create mode 100644 devops/approval_rule_merge_check.go create mode 100644 devops/build_merge_check.go create mode 100644 devops/build_run_snapshot.go create mode 100644 devops/build_run_snapshot_collection.go create mode 100644 devops/build_run_snapshot_summary.go create mode 100644 devops/comment_activity_summary.go create mode 100644 devops/commit_activity_summary.go create mode 100644 devops/commit_analytics_author_collection.go create mode 100644 devops/commit_analytics_author_summary.go create mode 100644 devops/conflict_merge_check.go create mode 100644 devops/create_or_update_git_branch_details.go create mode 100644 devops/create_or_update_git_ref_details.go create mode 100644 devops/create_or_update_git_ref_request_response.go create mode 100644 devops/create_or_update_git_tag_details.go create mode 100644 devops/create_or_update_protected_branch_details.go create mode 100644 devops/create_or_update_protected_branch_request_response.go create mode 100644 devops/create_pull_request_attachment_request_response.go create mode 100644 devops/create_pull_request_comment_details.go create mode 100644 devops/create_pull_request_comment_request_response.go create mode 100644 devops/create_pull_request_details.go create mode 100644 devops/create_pull_request_request_response.go create mode 100644 devops/create_reviewer_details.go create mode 100644 devops/decline_pull_request_request_response.go create mode 100644 devops/delete_git_ref_details.go create mode 100644 devops/delete_git_ref_request_response.go create mode 100644 devops/delete_project_repository_settings_request_response.go create mode 100644 devops/delete_protected_branch_details.go create mode 100644 devops/delete_protected_branch_request_response.go create mode 100644 devops/delete_pull_request_attachment_request_response.go create mode 100644 devops/delete_pull_request_comment_request_response.go create mode 100644 devops/delete_pull_request_request_response.go create mode 100644 devops/delete_repository_settings_request_response.go create mode 100644 devops/execute_merge_pull_request_details.go create mode 100644 devops/fork_sync_status_collection.go create mode 100644 devops/fork_sync_status_summary.go create mode 100644 devops/generic_artifact_location_details.go create mode 100644 devops/generic_artifacts.go create mode 100644 devops/get_project_notification_preference_request_response.go create mode 100644 devops/get_project_repository_settings_request_response.go create mode 100644 devops/get_pull_request_attachment_content_request_response.go create mode 100644 devops/get_pull_request_attachment_request_response.go create mode 100644 devops/get_pull_request_change_summary_metrics_request_response.go create mode 100644 devops/get_pull_request_comment_request_response.go create mode 100644 devops/get_pull_request_notification_preference_request_response.go create mode 100644 devops/get_pull_request_request_response.go create mode 100644 devops/get_repository_notification_preference_request_response.go create mode 100644 devops/get_repository_settings_request_response.go create mode 100644 devops/like_pull_request_comment_request_response.go create mode 100644 devops/list_build_run_snapshots_request_response.go create mode 100644 devops/list_fork_sync_statuses_request_response.go create mode 100644 devops/list_project_commit_analytics_authors_request_response.go create mode 100644 devops/list_protected_branches_request_response.go create mode 100644 devops/list_pull_request_activities_request_response.go create mode 100644 devops/list_pull_request_attachments_request_response.go create mode 100644 devops/list_pull_request_authors_request_response.go create mode 100644 devops/list_pull_request_comments_request_response.go create mode 100644 devops/list_pull_request_commits_request_response.go create mode 100644 devops/list_pull_request_file_changes_request_response.go create mode 100644 devops/list_pull_requests_request_response.go create mode 100644 devops/list_repository_commit_analytics_authors_request_response.go create mode 100644 devops/merge_check.go create mode 100644 devops/merge_check_collection.go create mode 100644 devops/merge_check_settings_value.go create mode 100644 devops/merge_checks.go create mode 100644 devops/merge_pull_request_details.go create mode 100644 devops/merge_pull_request_request_response.go create mode 100644 devops/merge_settings.go create mode 100644 devops/merge_strategy.go create mode 100644 devops/metric_name.go create mode 100644 devops/object_storage_generic_artifact_location_details.go create mode 100644 devops/patch_insert_instruction.go create mode 100644 devops/patch_instruction.go create mode 100644 devops/patch_merge_instruction.go create mode 100644 devops/patch_move_instruction.go create mode 100644 devops/patch_prohibit_instruction.go create mode 100644 devops/patch_pull_request_details.go create mode 100644 devops/patch_pull_request_request_response.go create mode 100644 devops/patch_remove_instruction.go create mode 100644 devops/patch_replace_instruction.go create mode 100644 devops/patch_require_instruction.go create mode 100644 devops/principal_details.go create mode 100644 devops/project_notification_preference.go create mode 100644 devops/project_repository_settings.go create mode 100644 devops/protected_branch.go create mode 100644 devops/protected_branch_collection.go create mode 100644 devops/protected_branch_summary.go create mode 100644 devops/protection_level.go create mode 100644 devops/pull_request.go create mode 100644 devops/pull_request_activity_collection.go create mode 100644 devops/pull_request_activity_summary.go create mode 100644 devops/pull_request_attachment.go create mode 100644 devops/pull_request_attachment_collection.go create mode 100644 devops/pull_request_attachment_summary.go create mode 100644 devops/pull_request_author_collection.go create mode 100644 devops/pull_request_author_summary.go create mode 100644 devops/pull_request_change_summary_metrics.go create mode 100644 devops/pull_request_collection.go create mode 100644 devops/pull_request_comment.go create mode 100644 devops/pull_request_comment_collection.go create mode 100644 devops/pull_request_comment_like_collection.go create mode 100644 devops/pull_request_comment_summary.go create mode 100644 devops/pull_request_file_change_collection.go create mode 100644 devops/pull_request_file_change_summary.go create mode 100644 devops/pull_request_lifecycle_activity_summary.go create mode 100644 devops/pull_request_notification_preference.go create mode 100644 devops/pull_request_summary.go create mode 100644 devops/reopen_pull_request_request_response.go create mode 100644 devops/repository_analytics_details.go create mode 100644 devops/repository_metric_aggregation.go create mode 100644 devops/repository_metric_summary.go create mode 100644 devops/repository_notification_preference.go create mode 100644 devops/repository_settings.go create mode 100644 devops/review_pull_request_details.go create mode 100644 devops/review_pull_request_request_response.go create mode 100644 devops/reviewer.go create mode 100644 devops/reviewer_activity_summary.go create mode 100644 devops/stage_output.go create mode 100644 devops/summarize_project_repository_analytics_details.go create mode 100644 devops/summarize_project_repository_analytics_request_response.go create mode 100644 devops/summarize_repository_analytics_details.go create mode 100644 devops/summarize_repository_analytics_request_response.go create mode 100644 devops/sync_repository_details.go create mode 100644 devops/sync_repository_request_response.go create mode 100644 devops/test_report_output.go create mode 100644 devops/unlike_pull_request_comment_request_response.go create mode 100644 devops/unsubscribe_pull_request_request_response.go create mode 100644 devops/update_approval_rule_details.go create mode 100644 devops/update_approval_rule_details_collection.go create mode 100644 devops/update_project_notification_preference_details.go create mode 100644 devops/update_project_notification_preference_request_response.go create mode 100644 devops/update_project_repository_settings_details.go create mode 100644 devops/update_project_repository_settings_request_response.go create mode 100644 devops/update_pull_request_comment_details.go create mode 100644 devops/update_pull_request_comment_request_response.go create mode 100644 devops/update_pull_request_details.go create mode 100644 devops/update_pull_request_notification_preference_details.go create mode 100644 devops/update_pull_request_notification_preference_request_response.go create mode 100644 devops/update_pull_request_request_response.go create mode 100644 devops/update_repository_notification_preference_details.go create mode 100644 devops/update_repository_notification_preference_request_response.go create mode 100644 devops/update_repository_settings_details.go create mode 100644 devops/update_repository_settings_request_response.go create mode 100644 devops/update_reviewer_details.go create mode 100644 devops/validate_merge_pull_request_details.go create mode 100644 jms/agent_installer_collection.go create mode 100644 jms/agent_installer_sort_by.go create mode 100644 jms/agent_installer_summary.go create mode 100644 jms/create_jms_plugin_details.go create mode 100644 jms/create_jms_plugin_request_response.go create mode 100644 jms/delete_jms_plugin_request_response.go create mode 100644 jms/deployed_application_migration_analyses_target.go create mode 100644 jms/deployed_application_work_item_details.go create mode 100644 jms/generate_agent_installer_configuration_details.go create mode 100644 jms/generate_agent_installer_configuration_request_response.go create mode 100644 jms/generate_load_pipeline_script_details.go create mode 100644 jms/generate_load_pipeline_script_request_response.go create mode 100644 jms/get_jms_plugin_request_response.go create mode 100644 jms/jms_plugin.go create mode 100644 jms/jms_plugin_availability_status.go create mode 100644 jms/jms_plugin_collection.go create mode 100644 jms/jms_plugin_lifecycle_state.go create mode 100644 jms/jms_plugin_sort_by.go create mode 100644 jms/jms_plugin_summary.go create mode 100644 jms/list_agent_installers_request_response.go create mode 100644 jms/list_jms_plugins_request_response.go create mode 100644 jms/package_type.go create mode 100644 jms/platform_architecture_type.go create mode 100644 jms/request_deployed_application_migration_analyses_details.go create mode 100644 jms/request_deployed_application_migration_analyses_request_response.go create mode 100644 jms/update_jms_plugin_details.go create mode 100644 jms/update_jms_plugin_request_response.go create mode 100644 psql/shape_memory_options.go create mode 100644 psql/shape_ocpu_options.go create mode 100644 psql/update_network_details.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 21f773197a..a67360da34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.71.0 - 2024-08-06 +### Added +- Support for Nested Resource Principals (RPv3.0) +- Support for calling Oracle Cloud Infrastructure services in the `me-riyadh-1` region +- Support for vertically scaling a Database system in the PostgreSQL service +- Support for flex shapes in the PostgreSQL service +- Support for new fork repository feature in the Source Code Management service +- Support for Developer Charts in the Source Code Management service +- Support for pull requests and merge in Source Code Management service +- Support for limiting custom and versioned custom software source content to the latest package versions in the OS Management service +- Support for Open Data Hub (ODH) patching in a staged manner in the Big Data service +- Support for Autoscale Memory Utilization in the Big Data service +- Support for Resource Principal configuration feature in the Big Data service +- Support for a new optional parameter compartment ID in the Java Management service +- Support for Agent Installer in the Java Management service +- Support for Java migration analysis request of deployed applications in the Java Management service +- Support for JmsPlugin in the Java Management service +- Support for improved cryptographic analysis result listing in the Java Management service +- Support for improved fleet agent configuration setting in the Java Management service +- Support for improved Java migration analysis result listing in the Java Management service +- Support for improved library usage summary in the Java Management service +- Support for improved performance tuning analysis result listing in the Java Management service +- Support for improved work request listing in the Java Management service + +### Breaking Changes +- The property `Credentials` was made required in the model `CreateDbSystemDetails` in the PostgreSQL service + ## 65.70.0 - 2024-07-30 ### Added - Support for cluster placement groups on get operations in the Database service diff --git a/bds/auto_scale_policy_metric_rule.go b/bds/auto_scale_policy_metric_rule.go index 3b270606a1..fb21221ebb 100644 --- a/bds/auto_scale_policy_metric_rule.go +++ b/bds/auto_scale_policy_metric_rule.go @@ -18,7 +18,7 @@ import ( // AutoScalePolicyMetricRule Metric and threshold details for triggering an autoscale action. type AutoScalePolicyMetricRule struct { - // Allowed value is CPU_UTILIZATION. + // Allowed values are CPU_UTILIZATION and MEMORY_UTILIZATION. MetricType AutoScalePolicyMetricRuleMetricTypeEnum `mandatory:"true" json:"metricType"` Threshold *MetricThresholdRule `mandatory:"true" json:"threshold"` @@ -48,15 +48,18 @@ type AutoScalePolicyMetricRuleMetricTypeEnum string // Set of constants representing the allowable values for AutoScalePolicyMetricRuleMetricTypeEnum const ( - AutoScalePolicyMetricRuleMetricTypeCpuUtilization AutoScalePolicyMetricRuleMetricTypeEnum = "CPU_UTILIZATION" + AutoScalePolicyMetricRuleMetricTypeCpuUtilization AutoScalePolicyMetricRuleMetricTypeEnum = "CPU_UTILIZATION" + AutoScalePolicyMetricRuleMetricTypeMemoryUtilization AutoScalePolicyMetricRuleMetricTypeEnum = "MEMORY_UTILIZATION" ) var mappingAutoScalePolicyMetricRuleMetricTypeEnum = map[string]AutoScalePolicyMetricRuleMetricTypeEnum{ - "CPU_UTILIZATION": AutoScalePolicyMetricRuleMetricTypeCpuUtilization, + "CPU_UTILIZATION": AutoScalePolicyMetricRuleMetricTypeCpuUtilization, + "MEMORY_UTILIZATION": AutoScalePolicyMetricRuleMetricTypeMemoryUtilization, } var mappingAutoScalePolicyMetricRuleMetricTypeEnumLowerCase = map[string]AutoScalePolicyMetricRuleMetricTypeEnum{ - "cpu_utilization": AutoScalePolicyMetricRuleMetricTypeCpuUtilization, + "cpu_utilization": AutoScalePolicyMetricRuleMetricTypeCpuUtilization, + "memory_utilization": AutoScalePolicyMetricRuleMetricTypeMemoryUtilization, } // GetAutoScalePolicyMetricRuleMetricTypeEnumValues Enumerates the set of values for AutoScalePolicyMetricRuleMetricTypeEnum @@ -72,6 +75,7 @@ func GetAutoScalePolicyMetricRuleMetricTypeEnumValues() []AutoScalePolicyMetricR func GetAutoScalePolicyMetricRuleMetricTypeEnumStringValues() []string { return []string{ "CPU_UTILIZATION", + "MEMORY_UTILIZATION", } } diff --git a/bds/batching_based_odh_patching_config.go b/bds/batching_based_odh_patching_config.go new file mode 100644 index 0000000000..d8d63a9379 --- /dev/null +++ b/bds/batching_based_odh_patching_config.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. + +// 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 ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BatchingBasedOdhPatchingConfig Patching configurations which allows patch the nodes batch by batch. +type BatchingBasedOdhPatchingConfig struct { + + // How many nodes to be patched in each iteration. + BatchSize *int `mandatory:"true" json:"batchSize"` + + // The wait time between batches in seconds. + WaitTimeBetweenBatchInSeconds *int `mandatory:"true" json:"waitTimeBetweenBatchInSeconds"` +} + +func (m BatchingBasedOdhPatchingConfig) 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 BatchingBasedOdhPatchingConfig) 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 BatchingBasedOdhPatchingConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBatchingBasedOdhPatchingConfig BatchingBasedOdhPatchingConfig + s := struct { + DiscriminatorParam string `json:"patchingConfigStrategy"` + MarshalTypeBatchingBasedOdhPatchingConfig + }{ + "BATCHING_BASED", + (MarshalTypeBatchingBasedOdhPatchingConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/bds/batching_based_patching_configs.go b/bds/batching_based_patching_configs.go index 77de9a82dd..09d954dd2b 100644 --- a/bds/batching_based_patching_configs.go +++ b/bds/batching_based_patching_configs.go @@ -16,7 +16,7 @@ import ( "strings" ) -// BatchingBasedPatchingConfigs Patching configurations which allows patch the nodes batch by batch. +// BatchingBasedPatchingConfigs Configuration that applies the patch in batches, the batch size is a user defined parameter. type BatchingBasedPatchingConfigs struct { // How many nodes to be patched and rebooted in each iteration. diff --git a/bds/bds_client.go b/bds/bds_client.go index 7c01912b72..9ebc455438 100644 --- a/bds/bds_client.go +++ b/bds/bds_client.go @@ -1145,6 +1145,68 @@ func (client BdsClient) createNodeReplaceConfiguration(ctx context.Context, requ return response, err } +// CreateResourcePrincipalConfiguration Create a resource principal session token configuration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CreateResourcePrincipalConfiguration.go.html to see an example of how to use CreateResourcePrincipalConfiguration API. +func (client BdsClient) CreateResourcePrincipalConfiguration(ctx context.Context, request CreateResourcePrincipalConfigurationRequest) (response CreateResourcePrincipalConfigurationResponse, 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.createResourcePrincipalConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateResourcePrincipalConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateResourcePrincipalConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateResourcePrincipalConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateResourcePrincipalConfigurationResponse") + } + return +} + +// createResourcePrincipalConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) createResourcePrincipalConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/resourcePrincipalConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateResourcePrincipalConfigurationResponse + 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/CreateResourcePrincipalConfiguration" + err = common.PostProcessServiceError(err, "Bds", "CreateResourcePrincipalConfiguration", 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 @@ -1616,6 +1678,68 @@ func (client BdsClient) executeBootstrapScript(ctx context.Context, request comm return response, err } +// ForceRefreshResourcePrincipal Force Refresh Resource Principal for the cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ForceRefreshResourcePrincipal.go.html to see an example of how to use ForceRefreshResourcePrincipal API. +func (client BdsClient) ForceRefreshResourcePrincipal(ctx context.Context, request ForceRefreshResourcePrincipalRequest) (response ForceRefreshResourcePrincipalResponse, 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.forceRefreshResourcePrincipal, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ForceRefreshResourcePrincipalResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ForceRefreshResourcePrincipalResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ForceRefreshResourcePrincipalResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ForceRefreshResourcePrincipalResponse") + } + return +} + +// forceRefreshResourcePrincipal implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) forceRefreshResourcePrincipal(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/resourcePrincipalConfigurations/{resourcePrincipalConfigurationId}/actions/forceRefreshResourcePrincipal", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ForceRefreshResourcePrincipalResponse + 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/ForceRefreshResourcePrincipal" + err = common.PostProcessServiceError(err, "Bds", "ForceRefreshResourcePrincipal", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetAutoScalingConfiguration Returns details of the autoscale configuration identified by the given ID. // // # See also @@ -2077,6 +2201,63 @@ func (client BdsClient) getOsPatchDetails(ctx context.Context, request common.OC return response, err } +// GetResourcePrincipalConfiguration Returns details of the resourcePrincipalConfiguration identified by the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetResourcePrincipalConfiguration.go.html to see an example of how to use GetResourcePrincipalConfiguration API. +func (client BdsClient) GetResourcePrincipalConfiguration(ctx context.Context, request GetResourcePrincipalConfigurationRequest) (response GetResourcePrincipalConfigurationResponse, 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.getResourcePrincipalConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetResourcePrincipalConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetResourcePrincipalConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetResourcePrincipalConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetResourcePrincipalConfigurationResponse") + } + return +} + +// getResourcePrincipalConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) getResourcePrincipalConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/resourcePrincipalConfigurations/{resourcePrincipalConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetResourcePrincipalConfigurationResponse + 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/GetResourcePrincipalConfiguration" + err = common.PostProcessServiceError(err, "Bds", "GetResourcePrincipalConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetWorkRequest Returns the status of the work request identified by the given ID. // // # See also @@ -2833,6 +3014,63 @@ func (client BdsClient) listPatches(ctx context.Context, request common.OCIReque return response, err } +// ListResourcePrincipalConfigurations Returns information about the ResourcePrincipalConfiguration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListResourcePrincipalConfigurations.go.html to see an example of how to use ListResourcePrincipalConfigurations API. +func (client BdsClient) ListResourcePrincipalConfigurations(ctx context.Context, request ListResourcePrincipalConfigurationsRequest) (response ListResourcePrincipalConfigurationsResponse, 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.listResourcePrincipalConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListResourcePrincipalConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListResourcePrincipalConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListResourcePrincipalConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListResourcePrincipalConfigurationsResponse") + } + return +} + +// listResourcePrincipalConfigurations implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) listResourcePrincipalConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/resourcePrincipalConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListResourcePrincipalConfigurationsResponse + 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/ListResourcePrincipalConfigurations" + err = common.PostProcessServiceError(err, "Bds", "ListResourcePrincipalConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListWorkRequestErrors Returns a paginated list of errors for a work request identified by the given ID. // // # See also @@ -3309,6 +3547,63 @@ func (client BdsClient) removeNodeReplaceConfiguration(ctx context.Context, requ return response, err } +// RemoveResourcePrincipalConfiguration Delete the resource principal configuration for the cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RemoveResourcePrincipalConfiguration.go.html to see an example of how to use RemoveResourcePrincipalConfiguration API. +func (client BdsClient) RemoveResourcePrincipalConfiguration(ctx context.Context, request RemoveResourcePrincipalConfigurationRequest) (response RemoveResourcePrincipalConfigurationResponse, 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.removeResourcePrincipalConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveResourcePrincipalConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveResourcePrincipalConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveResourcePrincipalConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveResourcePrincipalConfigurationResponse") + } + return +} + +// removeResourcePrincipalConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) removeResourcePrincipalConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/resourcePrincipalConfigurations/{resourcePrincipalConfigurationId}/actions/remove", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RemoveResourcePrincipalConfigurationResponse + 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/ResourcePrincipalConfiguration/RemoveResourcePrincipalConfiguration" + err = common.PostProcessServiceError(err, "Bds", "RemoveResourcePrincipalConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RenewCertificate Renewing TLS/SSL for various ODH services running on the BDS cluster. // // # See also @@ -4022,3 +4317,65 @@ func (client BdsClient) updateNodeReplaceConfiguration(ctx context.Context, requ err = common.UnmarshalResponse(httpResponse, &response) return response, err } + +// UpdateResourcePrincipalConfiguration Updates fields on resourcePrincipalConfiguration, including the name, the lifeSpanInHours of the token. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/UpdateResourcePrincipalConfiguration.go.html to see an example of how to use UpdateResourcePrincipalConfiguration API. +func (client BdsClient) UpdateResourcePrincipalConfiguration(ctx context.Context, request UpdateResourcePrincipalConfigurationRequest) (response UpdateResourcePrincipalConfigurationResponse, 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.updateResourcePrincipalConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateResourcePrincipalConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateResourcePrincipalConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateResourcePrincipalConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateResourcePrincipalConfigurationResponse") + } + return +} + +// updateResourcePrincipalConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) updateResourcePrincipalConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bdsInstances/{bdsInstanceId}/resourcePrincipalConfigurations/{resourcePrincipalConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateResourcePrincipalConfigurationResponse + 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/UpdateResourcePrincipalConfiguration" + err = common.PostProcessServiceError(err, "Bds", "UpdateResourcePrincipalConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/bds/create_resource_principal_configuration_details.go b/bds/create_resource_principal_configuration_details.go new file mode 100644 index 0000000000..eced9a5bd7 --- /dev/null +++ b/bds/create_resource_principal_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" +) + +// CreateResourcePrincipalConfigurationDetails Details of creating a resource principal configuration for the cluster. +type CreateResourcePrincipalConfigurationDetails struct { + + // A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Base-64 encoded Cluster Admin Password for cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // Life span in hours for the resource principal session token. + SessionTokenLifeSpanDurationInHours *int `mandatory:"false" json:"sessionTokenLifeSpanDurationInHours"` +} + +func (m CreateResourcePrincipalConfigurationDetails) 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 CreateResourcePrincipalConfigurationDetails) 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_resource_principal_configuration_request_response.go b/bds/create_resource_principal_configuration_request_response.go new file mode 100644 index 0000000000..dfe1c7645c --- /dev/null +++ b/bds/create_resource_principal_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" +) + +// CreateResourcePrincipalConfigurationRequest wrapper for the CreateResourcePrincipalConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CreateResourcePrincipalConfiguration.go.html to see an example of how to use CreateResourcePrincipalConfigurationRequest. +type CreateResourcePrincipalConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Details of creating resource principal session token for the bds cluster. + CreateResourcePrincipalConfigurationDetails `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"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateResourcePrincipalConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateResourcePrincipalConfigurationRequest) 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 CreateResourcePrincipalConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateResourcePrincipalConfigurationRequest) 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 CreateResourcePrincipalConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateResourcePrincipalConfigurationResponse wrapper for the CreateResourcePrincipalConfiguration operation +type CreateResourcePrincipalConfigurationResponse 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 CreateResourcePrincipalConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateResourcePrincipalConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/domain_based_odh_patching_config.go b/bds/domain_based_odh_patching_config.go new file mode 100644 index 0000000000..bf9e25eb44 --- /dev/null +++ b/bds/domain_based_odh_patching_config.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. + +// 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 ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DomainBasedOdhPatchingConfig This patching config will patch all nodes in one AD/FD at a time. +type DomainBasedOdhPatchingConfig struct { + + // The wait time between AD/FD in seconds. + WaitTimeBetweenDomainInSeconds *int `mandatory:"true" json:"waitTimeBetweenDomainInSeconds"` +} + +func (m DomainBasedOdhPatchingConfig) 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 DomainBasedOdhPatchingConfig) 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 DomainBasedOdhPatchingConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDomainBasedOdhPatchingConfig DomainBasedOdhPatchingConfig + s := struct { + DiscriminatorParam string `json:"patchingConfigStrategy"` + MarshalTypeDomainBasedOdhPatchingConfig + }{ + "DOMAIN_BASED", + (MarshalTypeDomainBasedOdhPatchingConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/bds/domain_based_patching_configs.go b/bds/domain_based_patching_configs.go new file mode 100644 index 0000000000..03de1a2ee4 --- /dev/null +++ b/bds/domain_based_patching_configs.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. + +// 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 ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DomainBasedPatchingConfigs This patching config will patch all nodes in one AD/FD at a time. +type DomainBasedPatchingConfigs 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 nodes. + ToleranceThresholdPerDomain *int `mandatory:"true" json:"toleranceThresholdPerDomain"` +} + +func (m DomainBasedPatchingConfigs) 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 DomainBasedPatchingConfigs) 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 DomainBasedPatchingConfigs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDomainBasedPatchingConfigs DomainBasedPatchingConfigs + s := struct { + DiscriminatorParam string `json:"patchingConfigStrategy"` + MarshalTypeDomainBasedPatchingConfigs + }{ + "DOMAIN_BASED", + (MarshalTypeDomainBasedPatchingConfigs)(m), + } + + return json.Marshal(&s) +} diff --git a/bds/downtime_based_odh_patching_config.go b/bds/downtime_based_odh_patching_config.go new file mode 100644 index 0000000000..0e81abfe0e --- /dev/null +++ b/bds/downtime_based_odh_patching_config.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. + +// 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 ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DowntimeBasedOdhPatchingConfig Patching configurations which allows downtime. This patching config will patch all the nodes in parallel. +type DowntimeBasedOdhPatchingConfig struct { +} + +func (m DowntimeBasedOdhPatchingConfig) 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 DowntimeBasedOdhPatchingConfig) 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 DowntimeBasedOdhPatchingConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDowntimeBasedOdhPatchingConfig DowntimeBasedOdhPatchingConfig + s := struct { + DiscriminatorParam string `json:"patchingConfigStrategy"` + MarshalTypeDowntimeBasedOdhPatchingConfig + }{ + "DOWNTIME_BASED", + (MarshalTypeDowntimeBasedOdhPatchingConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/bds/force_refresh_resource_principal_details.go b/bds/force_refresh_resource_principal_details.go new file mode 100644 index 0000000000..29386a08a2 --- /dev/null +++ b/bds/force_refresh_resource_principal_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" +) + +// ForceRefreshResourcePrincipalDetails Force Refresh Resource Principal Session Token Details. +type ForceRefreshResourcePrincipalDetails struct { + + // Base-64 encoded Cluster Admin Password for cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m ForceRefreshResourcePrincipalDetails) 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 ForceRefreshResourcePrincipalDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/force_refresh_resource_principal_request_response.go b/bds/force_refresh_resource_principal_request_response.go new file mode 100644 index 0000000000..c763f039dd --- /dev/null +++ b/bds/force_refresh_resource_principal_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" +) + +// ForceRefreshResourcePrincipalRequest wrapper for the ForceRefreshResourcePrincipal operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ForceRefreshResourcePrincipal.go.html to see an example of how to use ForceRefreshResourcePrincipalRequest. +type ForceRefreshResourcePrincipalRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + ResourcePrincipalConfigurationId *string `mandatory:"true" contributesTo:"path" name:"resourcePrincipalConfigurationId"` + + // Details of refreshing resource principal session token + ForceRefreshResourcePrincipalDetails `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 ForceRefreshResourcePrincipalRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ForceRefreshResourcePrincipalRequest) 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 ForceRefreshResourcePrincipalRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ForceRefreshResourcePrincipalRequest) 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 ForceRefreshResourcePrincipalRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ForceRefreshResourcePrincipalResponse wrapper for the ForceRefreshResourcePrincipal operation +type ForceRefreshResourcePrincipalResponse 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 ForceRefreshResourcePrincipalResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ForceRefreshResourcePrincipalResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/get_resource_principal_configuration_request_response.go b/bds/get_resource_principal_configuration_request_response.go new file mode 100644 index 0000000000..6711de64c8 --- /dev/null +++ b/bds/get_resource_principal_configuration_request_response.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. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetResourcePrincipalConfigurationRequest wrapper for the GetResourcePrincipalConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetResourcePrincipalConfiguration.go.html to see an example of how to use GetResourcePrincipalConfigurationRequest. +type GetResourcePrincipalConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + ResourcePrincipalConfigurationId *string `mandatory:"true" contributesTo:"path" name:"resourcePrincipalConfigurationId"` + + // 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 GetResourcePrincipalConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetResourcePrincipalConfigurationRequest) 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 GetResourcePrincipalConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetResourcePrincipalConfigurationRequest) 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 GetResourcePrincipalConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetResourcePrincipalConfigurationResponse wrapper for the GetResourcePrincipalConfiguration operation +type GetResourcePrincipalConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ResourcePrincipalConfiguration instance + ResourcePrincipalConfiguration `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 GetResourcePrincipalConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetResourcePrincipalConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/install_patch_details.go b/bds/install_patch_details.go index 04d94653da..fc0d37ab93 100644 --- a/bds/install_patch_details.go +++ b/bds/install_patch_details.go @@ -10,6 +10,7 @@ package bds import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -23,6 +24,8 @@ type InstallPatchDetails struct { // Base-64 encoded password for the cluster admin user. ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + PatchingConfig OdhPatchingConfig `mandatory:"false" json:"patchingConfig"` } func (m InstallPatchDetails) String() string { @@ -40,3 +43,33 @@ func (m InstallPatchDetails) ValidateEnumValue() (bool, error) { } return false, nil } + +// UnmarshalJSON unmarshals from json +func (m *InstallPatchDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + PatchingConfig odhpatchingconfig `json:"patchingConfig"` + Version *string `json:"version"` + ClusterAdminPassword *string `json:"clusterAdminPassword"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.PatchingConfig.UnmarshalPolymorphicJSON(model.PatchingConfig.JsonData) + if e != nil { + return + } + if nn != nil { + m.PatchingConfig = nn.(OdhPatchingConfig) + } else { + m.PatchingConfig = nil + } + + m.Version = model.Version + + m.ClusterAdminPassword = model.ClusterAdminPassword + + return +} diff --git a/bds/list_resource_principal_configurations_request_response.go b/bds/list_resource_principal_configurations_request_response.go new file mode 100644 index 0000000000..06871e5c4e --- /dev/null +++ b/bds/list_resource_principal_configurations_request_response.go @@ -0,0 +1,206 @@ +// 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" +) + +// ListResourcePrincipalConfigurationsRequest wrapper for the ListResourcePrincipalConfigurations operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListResourcePrincipalConfigurations.go.html to see an example of how to use ListResourcePrincipalConfigurationsRequest. +type ListResourcePrincipalConfigurationsRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // 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 ListResourcePrincipalConfigurationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListResourcePrincipalConfigurationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The state of the ResourcePrincipalConfiguration. + LifecycleState ResourcePrincipalConfigurationLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" 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 ListResourcePrincipalConfigurationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListResourcePrincipalConfigurationsRequest) 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 ListResourcePrincipalConfigurationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListResourcePrincipalConfigurationsRequest) 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 ListResourcePrincipalConfigurationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListResourcePrincipalConfigurationsSortByEnum(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(GetListResourcePrincipalConfigurationsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListResourcePrincipalConfigurationsSortOrderEnum(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(GetListResourcePrincipalConfigurationsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingResourcePrincipalConfigurationLifecycleStateEnum(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(GetResourcePrincipalConfigurationLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListResourcePrincipalConfigurationsResponse wrapper for the ListResourcePrincipalConfigurations operation +type ListResourcePrincipalConfigurationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ResourcePrincipalConfigurationSummary instances + Items []ResourcePrincipalConfigurationSummary `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 ListResourcePrincipalConfigurationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListResourcePrincipalConfigurationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListResourcePrincipalConfigurationsSortByEnum Enum with underlying type: string +type ListResourcePrincipalConfigurationsSortByEnum string + +// Set of constants representing the allowable values for ListResourcePrincipalConfigurationsSortByEnum +const ( + ListResourcePrincipalConfigurationsSortByTimecreated ListResourcePrincipalConfigurationsSortByEnum = "timeCreated" + ListResourcePrincipalConfigurationsSortByDisplayname ListResourcePrincipalConfigurationsSortByEnum = "displayName" +) + +var mappingListResourcePrincipalConfigurationsSortByEnum = map[string]ListResourcePrincipalConfigurationsSortByEnum{ + "timeCreated": ListResourcePrincipalConfigurationsSortByTimecreated, + "displayName": ListResourcePrincipalConfigurationsSortByDisplayname, +} + +var mappingListResourcePrincipalConfigurationsSortByEnumLowerCase = map[string]ListResourcePrincipalConfigurationsSortByEnum{ + "timecreated": ListResourcePrincipalConfigurationsSortByTimecreated, + "displayname": ListResourcePrincipalConfigurationsSortByDisplayname, +} + +// GetListResourcePrincipalConfigurationsSortByEnumValues Enumerates the set of values for ListResourcePrincipalConfigurationsSortByEnum +func GetListResourcePrincipalConfigurationsSortByEnumValues() []ListResourcePrincipalConfigurationsSortByEnum { + values := make([]ListResourcePrincipalConfigurationsSortByEnum, 0) + for _, v := range mappingListResourcePrincipalConfigurationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListResourcePrincipalConfigurationsSortByEnumStringValues Enumerates the set of values in String for ListResourcePrincipalConfigurationsSortByEnum +func GetListResourcePrincipalConfigurationsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListResourcePrincipalConfigurationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListResourcePrincipalConfigurationsSortByEnum(val string) (ListResourcePrincipalConfigurationsSortByEnum, bool) { + enum, ok := mappingListResourcePrincipalConfigurationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListResourcePrincipalConfigurationsSortOrderEnum Enum with underlying type: string +type ListResourcePrincipalConfigurationsSortOrderEnum string + +// Set of constants representing the allowable values for ListResourcePrincipalConfigurationsSortOrderEnum +const ( + ListResourcePrincipalConfigurationsSortOrderAsc ListResourcePrincipalConfigurationsSortOrderEnum = "ASC" + ListResourcePrincipalConfigurationsSortOrderDesc ListResourcePrincipalConfigurationsSortOrderEnum = "DESC" +) + +var mappingListResourcePrincipalConfigurationsSortOrderEnum = map[string]ListResourcePrincipalConfigurationsSortOrderEnum{ + "ASC": ListResourcePrincipalConfigurationsSortOrderAsc, + "DESC": ListResourcePrincipalConfigurationsSortOrderDesc, +} + +var mappingListResourcePrincipalConfigurationsSortOrderEnumLowerCase = map[string]ListResourcePrincipalConfigurationsSortOrderEnum{ + "asc": ListResourcePrincipalConfigurationsSortOrderAsc, + "desc": ListResourcePrincipalConfigurationsSortOrderDesc, +} + +// GetListResourcePrincipalConfigurationsSortOrderEnumValues Enumerates the set of values for ListResourcePrincipalConfigurationsSortOrderEnum +func GetListResourcePrincipalConfigurationsSortOrderEnumValues() []ListResourcePrincipalConfigurationsSortOrderEnum { + values := make([]ListResourcePrincipalConfigurationsSortOrderEnum, 0) + for _, v := range mappingListResourcePrincipalConfigurationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListResourcePrincipalConfigurationsSortOrderEnumStringValues Enumerates the set of values in String for ListResourcePrincipalConfigurationsSortOrderEnum +func GetListResourcePrincipalConfigurationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListResourcePrincipalConfigurationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListResourcePrincipalConfigurationsSortOrderEnum(val string) (ListResourcePrincipalConfigurationsSortOrderEnum, bool) { + enum, ok := mappingListResourcePrincipalConfigurationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/node.go b/bds/node.go index 775b622de8..f2387ede4f 100644 --- a/bds/node.go +++ b/bds/node.go @@ -84,6 +84,9 @@ type Node struct { // Indicates if the node requires a reboot to either reflect the latest os kernel or take actions for maintenance reboot. IsRebootRequired *bool `mandatory:"false" json:"isRebootRequired"` + // Version of the ODH (Oracle Distribution including Apache Hadoop) for the node. + OdhVersion *string `mandatory:"false" json:"odhVersion"` + // The date and time the instance was replaced by a new vm with a node backup. TimeReplaced *common.SDKTime `mandatory:"false" json:"timeReplaced"` diff --git a/bds/odh_patching_config.go b/bds/odh_patching_config.go new file mode 100644 index 0000000000..9e0de6f7df --- /dev/null +++ b/bds/odh_patching_config.go @@ -0,0 +1,131 @@ +// 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 ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OdhPatchingConfig Detailed configurations for defining the behavior when installing ODH patches. If not provided, nodes will be patched with down time. +type OdhPatchingConfig interface { +} + +type odhpatchingconfig struct { + JsonData []byte + PatchingConfigStrategy string `json:"patchingConfigStrategy"` +} + +// UnmarshalJSON unmarshals json +func (m *odhpatchingconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerodhpatchingconfig odhpatchingconfig + s := struct { + Model Unmarshalerodhpatchingconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.PatchingConfigStrategy = s.Model.PatchingConfigStrategy + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *odhpatchingconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.PatchingConfigStrategy { + case "DOWNTIME_BASED": + mm := DowntimeBasedOdhPatchingConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "DOMAIN_BASED": + mm := DomainBasedOdhPatchingConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "BATCHING_BASED": + mm := BatchingBasedOdhPatchingConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for OdhPatchingConfig: %s.", m.PatchingConfigStrategy) + return *m, nil + } +} + +func (m odhpatchingconfig) 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 odhpatchingconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// OdhPatchingConfigPatchingConfigStrategyEnum Enum with underlying type: string +type OdhPatchingConfigPatchingConfigStrategyEnum string + +// Set of constants representing the allowable values for OdhPatchingConfigPatchingConfigStrategyEnum +const ( + OdhPatchingConfigPatchingConfigStrategyDowntimeBased OdhPatchingConfigPatchingConfigStrategyEnum = "DOWNTIME_BASED" + OdhPatchingConfigPatchingConfigStrategyBatchingBased OdhPatchingConfigPatchingConfigStrategyEnum = "BATCHING_BASED" + OdhPatchingConfigPatchingConfigStrategyDomainBased OdhPatchingConfigPatchingConfigStrategyEnum = "DOMAIN_BASED" +) + +var mappingOdhPatchingConfigPatchingConfigStrategyEnum = map[string]OdhPatchingConfigPatchingConfigStrategyEnum{ + "DOWNTIME_BASED": OdhPatchingConfigPatchingConfigStrategyDowntimeBased, + "BATCHING_BASED": OdhPatchingConfigPatchingConfigStrategyBatchingBased, + "DOMAIN_BASED": OdhPatchingConfigPatchingConfigStrategyDomainBased, +} + +var mappingOdhPatchingConfigPatchingConfigStrategyEnumLowerCase = map[string]OdhPatchingConfigPatchingConfigStrategyEnum{ + "downtime_based": OdhPatchingConfigPatchingConfigStrategyDowntimeBased, + "batching_based": OdhPatchingConfigPatchingConfigStrategyBatchingBased, + "domain_based": OdhPatchingConfigPatchingConfigStrategyDomainBased, +} + +// GetOdhPatchingConfigPatchingConfigStrategyEnumValues Enumerates the set of values for OdhPatchingConfigPatchingConfigStrategyEnum +func GetOdhPatchingConfigPatchingConfigStrategyEnumValues() []OdhPatchingConfigPatchingConfigStrategyEnum { + values := make([]OdhPatchingConfigPatchingConfigStrategyEnum, 0) + for _, v := range mappingOdhPatchingConfigPatchingConfigStrategyEnum { + values = append(values, v) + } + return values +} + +// GetOdhPatchingConfigPatchingConfigStrategyEnumStringValues Enumerates the set of values in String for OdhPatchingConfigPatchingConfigStrategyEnum +func GetOdhPatchingConfigPatchingConfigStrategyEnumStringValues() []string { + return []string{ + "DOWNTIME_BASED", + "BATCHING_BASED", + "DOMAIN_BASED", + } +} + +// GetMappingOdhPatchingConfigPatchingConfigStrategyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOdhPatchingConfigPatchingConfigStrategyEnum(val string) (OdhPatchingConfigPatchingConfigStrategyEnum, bool) { + enum, ok := mappingOdhPatchingConfigPatchingConfigStrategyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/operation_types.go b/bds/operation_types.go index 1b40f698b3..c11a4ba8dc 100644 --- a/bds/operation_types.go +++ b/bds/operation_types.go @@ -18,147 +18,159 @@ type OperationTypesEnum string // Set of constants representing the allowable values for OperationTypesEnum const ( - OperationTypesCreateBds OperationTypesEnum = "CREATE_BDS" - OperationTypesUpdateBds OperationTypesEnum = "UPDATE_BDS" - OperationTypesDeleteBds OperationTypesEnum = "DELETE_BDS" - OperationTypesAddBlockStorage OperationTypesEnum = "ADD_BLOCK_STORAGE" - OperationTypesAddMasterNodes OperationTypesEnum = "ADD_MASTER_NODES" - OperationTypesAddUtilityNodes OperationTypesEnum = "ADD_UTILITY_NODES" - OperationTypesAddWorkerNodes OperationTypesEnum = "ADD_WORKER_NODES" - OperationTypesAddCloudSql OperationTypesEnum = "ADD_CLOUD_SQL" - OperationTypesRemoveCloudSql OperationTypesEnum = "REMOVE_CLOUD_SQL" - OperationTypesChangeCompartmentForBds OperationTypesEnum = "CHANGE_COMPARTMENT_FOR_BDS" - OperationTypesChangeShape OperationTypesEnum = "CHANGE_SHAPE" - OperationTypesUpdateInfra OperationTypesEnum = "UPDATE_INFRA" - OperationTypesRestartNode OperationTypesEnum = "RESTART_NODE" - OperationTypesRemoveNode OperationTypesEnum = "REMOVE_NODE" - OperationTypesCreateAutoscaleConfig OperationTypesEnum = "CREATE_AUTOSCALE_CONFIG" - OperationTypesUpdateAutoscaleConfig OperationTypesEnum = "UPDATE_AUTOSCALE_CONFIG" - OperationTypesDeleteAutoscaleConfig OperationTypesEnum = "DELETE_AUTOSCALE_CONFIG" - OperationTypesAutoscaleConfig OperationTypesEnum = "AUTOSCALE_CONFIG" - OperationTypesAutoscaleRun OperationTypesEnum = "AUTOSCALE_RUN" - OperationTypesCreateApiKey OperationTypesEnum = "CREATE_API_KEY" - OperationTypesDeleteApiKey OperationTypesEnum = "DELETE_API_KEY" - OperationTypesTestObjectStoreConnection OperationTypesEnum = "TEST_OBJECT_STORE_CONNECTION" - OperationTypesCreateMetastoreConfig OperationTypesEnum = "CREATE_METASTORE_CONFIG" - OperationTypesDeleteMetastoreConfig OperationTypesEnum = "DELETE_METASTORE_CONFIG" - OperationTypesUpdateMetastoreConfig OperationTypesEnum = "UPDATE_METASTORE_CONFIG" - OperationTypesActivateMetastoreConfig OperationTypesEnum = "ACTIVATE_METASTORE_CONFIG" - OperationTypesTestMetastoreConfig OperationTypesEnum = "TEST_METASTORE_CONFIG" - OperationTypesPatchBds OperationTypesEnum = "PATCH_BDS" - OperationTypesPatchOdh OperationTypesEnum = "PATCH_ODH" - OperationTypesPatchOs OperationTypesEnum = "PATCH_OS" - OperationTypesStopBds OperationTypesEnum = "STOP_BDS" - OperationTypesStartBds OperationTypesEnum = "START_BDS" - OperationTypesAddKafka OperationTypesEnum = "ADD_KAFKA" - OperationTypesRemoveKafka OperationTypesEnum = "REMOVE_KAFKA" - OperationTypesExecuteBootstrapScript OperationTypesEnum = "EXECUTE_BOOTSTRAP_SCRIPT" - OperationTypesOdhServiceCertificateUpdate OperationTypesEnum = "ODH_SERVICE_CERTIFICATE_UPDATE" - OperationTypesCreateBackupConfig OperationTypesEnum = "CREATE_BACKUP_CONFIG" - OperationTypesUpdateBackupConfig OperationTypesEnum = "UPDATE_BACKUP_CONFIG" - OperationTypesDeleteBackupConfig OperationTypesEnum = "DELETE_BACKUP_CONFIG" - OperationTypesCreateNodeReplaceConfig OperationTypesEnum = "CREATE_NODE_REPLACE_CONFIG" - OperationTypesUpdateNodeReplaceConfig OperationTypesEnum = "UPDATE_NODE_REPLACE_CONFIG" - OperationTypesDeleteNodeReplaceConfig OperationTypesEnum = "DELETE_NODE_REPLACE_CONFIG" - OperationTypesBackupNodes OperationTypesEnum = "BACKUP_NODES" - OperationTypesDeleteNodeBackup OperationTypesEnum = "DELETE_NODE_BACKUP" - OperationTypesReplaceNode OperationTypesEnum = "REPLACE_NODE" + OperationTypesCreateBds OperationTypesEnum = "CREATE_BDS" + OperationTypesUpdateBds OperationTypesEnum = "UPDATE_BDS" + OperationTypesDeleteBds OperationTypesEnum = "DELETE_BDS" + OperationTypesAddBlockStorage OperationTypesEnum = "ADD_BLOCK_STORAGE" + OperationTypesAddMasterNodes OperationTypesEnum = "ADD_MASTER_NODES" + OperationTypesAddUtilityNodes OperationTypesEnum = "ADD_UTILITY_NODES" + OperationTypesAddWorkerNodes OperationTypesEnum = "ADD_WORKER_NODES" + OperationTypesAddCloudSql OperationTypesEnum = "ADD_CLOUD_SQL" + OperationTypesRemoveCloudSql OperationTypesEnum = "REMOVE_CLOUD_SQL" + OperationTypesChangeCompartmentForBds OperationTypesEnum = "CHANGE_COMPARTMENT_FOR_BDS" + OperationTypesChangeShape OperationTypesEnum = "CHANGE_SHAPE" + OperationTypesUpdateInfra OperationTypesEnum = "UPDATE_INFRA" + OperationTypesRestartNode OperationTypesEnum = "RESTART_NODE" + OperationTypesRemoveNode OperationTypesEnum = "REMOVE_NODE" + OperationTypesCreateAutoscaleConfig OperationTypesEnum = "CREATE_AUTOSCALE_CONFIG" + OperationTypesUpdateAutoscaleConfig OperationTypesEnum = "UPDATE_AUTOSCALE_CONFIG" + OperationTypesDeleteAutoscaleConfig OperationTypesEnum = "DELETE_AUTOSCALE_CONFIG" + OperationTypesAutoscaleConfig OperationTypesEnum = "AUTOSCALE_CONFIG" + OperationTypesAutoscaleRun OperationTypesEnum = "AUTOSCALE_RUN" + OperationTypesCreateApiKey OperationTypesEnum = "CREATE_API_KEY" + OperationTypesDeleteApiKey OperationTypesEnum = "DELETE_API_KEY" + OperationTypesTestObjectStoreConnection OperationTypesEnum = "TEST_OBJECT_STORE_CONNECTION" + OperationTypesCreateMetastoreConfig OperationTypesEnum = "CREATE_METASTORE_CONFIG" + OperationTypesDeleteMetastoreConfig OperationTypesEnum = "DELETE_METASTORE_CONFIG" + OperationTypesUpdateMetastoreConfig OperationTypesEnum = "UPDATE_METASTORE_CONFIG" + OperationTypesActivateMetastoreConfig OperationTypesEnum = "ACTIVATE_METASTORE_CONFIG" + OperationTypesTestMetastoreConfig OperationTypesEnum = "TEST_METASTORE_CONFIG" + OperationTypesPatchBds OperationTypesEnum = "PATCH_BDS" + OperationTypesPatchOdh OperationTypesEnum = "PATCH_ODH" + OperationTypesPatchOs OperationTypesEnum = "PATCH_OS" + OperationTypesStopBds OperationTypesEnum = "STOP_BDS" + OperationTypesStartBds OperationTypesEnum = "START_BDS" + OperationTypesAddKafka OperationTypesEnum = "ADD_KAFKA" + OperationTypesRemoveKafka OperationTypesEnum = "REMOVE_KAFKA" + OperationTypesExecuteBootstrapScript OperationTypesEnum = "EXECUTE_BOOTSTRAP_SCRIPT" + OperationTypesOdhServiceCertificateUpdate OperationTypesEnum = "ODH_SERVICE_CERTIFICATE_UPDATE" + OperationTypesCreateBackupConfig OperationTypesEnum = "CREATE_BACKUP_CONFIG" + OperationTypesUpdateBackupConfig OperationTypesEnum = "UPDATE_BACKUP_CONFIG" + OperationTypesDeleteBackupConfig OperationTypesEnum = "DELETE_BACKUP_CONFIG" + OperationTypesCreateNodeReplaceConfig OperationTypesEnum = "CREATE_NODE_REPLACE_CONFIG" + OperationTypesUpdateNodeReplaceConfig OperationTypesEnum = "UPDATE_NODE_REPLACE_CONFIG" + OperationTypesDeleteNodeReplaceConfig OperationTypesEnum = "DELETE_NODE_REPLACE_CONFIG" + OperationTypesBackupNodes OperationTypesEnum = "BACKUP_NODES" + OperationTypesDeleteNodeBackup OperationTypesEnum = "DELETE_NODE_BACKUP" + OperationTypesReplaceNode OperationTypesEnum = "REPLACE_NODE" + OperationTypesCreateResourcePrincipalConfiguration OperationTypesEnum = "CREATE_RESOURCE_PRINCIPAL_CONFIGURATION" + OperationTypesDeleteResourcePrincipalConfiguration OperationTypesEnum = "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION" + OperationTypesUpdateResourcePrincipalConfiguration OperationTypesEnum = "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION" + OperationTypesRefreshResourcePrincipal OperationTypesEnum = "REFRESH_RESOURCE_PRINCIPAL" ) var mappingOperationTypesEnum = map[string]OperationTypesEnum{ - "CREATE_BDS": OperationTypesCreateBds, - "UPDATE_BDS": OperationTypesUpdateBds, - "DELETE_BDS": OperationTypesDeleteBds, - "ADD_BLOCK_STORAGE": OperationTypesAddBlockStorage, - "ADD_MASTER_NODES": OperationTypesAddMasterNodes, - "ADD_UTILITY_NODES": OperationTypesAddUtilityNodes, - "ADD_WORKER_NODES": OperationTypesAddWorkerNodes, - "ADD_CLOUD_SQL": OperationTypesAddCloudSql, - "REMOVE_CLOUD_SQL": OperationTypesRemoveCloudSql, - "CHANGE_COMPARTMENT_FOR_BDS": OperationTypesChangeCompartmentForBds, - "CHANGE_SHAPE": OperationTypesChangeShape, - "UPDATE_INFRA": OperationTypesUpdateInfra, - "RESTART_NODE": OperationTypesRestartNode, - "REMOVE_NODE": OperationTypesRemoveNode, - "CREATE_AUTOSCALE_CONFIG": OperationTypesCreateAutoscaleConfig, - "UPDATE_AUTOSCALE_CONFIG": OperationTypesUpdateAutoscaleConfig, - "DELETE_AUTOSCALE_CONFIG": OperationTypesDeleteAutoscaleConfig, - "AUTOSCALE_CONFIG": OperationTypesAutoscaleConfig, - "AUTOSCALE_RUN": OperationTypesAutoscaleRun, - "CREATE_API_KEY": OperationTypesCreateApiKey, - "DELETE_API_KEY": OperationTypesDeleteApiKey, - "TEST_OBJECT_STORE_CONNECTION": OperationTypesTestObjectStoreConnection, - "CREATE_METASTORE_CONFIG": OperationTypesCreateMetastoreConfig, - "DELETE_METASTORE_CONFIG": OperationTypesDeleteMetastoreConfig, - "UPDATE_METASTORE_CONFIG": OperationTypesUpdateMetastoreConfig, - "ACTIVATE_METASTORE_CONFIG": OperationTypesActivateMetastoreConfig, - "TEST_METASTORE_CONFIG": OperationTypesTestMetastoreConfig, - "PATCH_BDS": OperationTypesPatchBds, - "PATCH_ODH": OperationTypesPatchOdh, - "PATCH_OS": OperationTypesPatchOs, - "STOP_BDS": OperationTypesStopBds, - "START_BDS": OperationTypesStartBds, - "ADD_KAFKA": OperationTypesAddKafka, - "REMOVE_KAFKA": OperationTypesRemoveKafka, - "EXECUTE_BOOTSTRAP_SCRIPT": OperationTypesExecuteBootstrapScript, - "ODH_SERVICE_CERTIFICATE_UPDATE": OperationTypesOdhServiceCertificateUpdate, - "CREATE_BACKUP_CONFIG": OperationTypesCreateBackupConfig, - "UPDATE_BACKUP_CONFIG": OperationTypesUpdateBackupConfig, - "DELETE_BACKUP_CONFIG": OperationTypesDeleteBackupConfig, - "CREATE_NODE_REPLACE_CONFIG": OperationTypesCreateNodeReplaceConfig, - "UPDATE_NODE_REPLACE_CONFIG": OperationTypesUpdateNodeReplaceConfig, - "DELETE_NODE_REPLACE_CONFIG": OperationTypesDeleteNodeReplaceConfig, - "BACKUP_NODES": OperationTypesBackupNodes, - "DELETE_NODE_BACKUP": OperationTypesDeleteNodeBackup, - "REPLACE_NODE": OperationTypesReplaceNode, + "CREATE_BDS": OperationTypesCreateBds, + "UPDATE_BDS": OperationTypesUpdateBds, + "DELETE_BDS": OperationTypesDeleteBds, + "ADD_BLOCK_STORAGE": OperationTypesAddBlockStorage, + "ADD_MASTER_NODES": OperationTypesAddMasterNodes, + "ADD_UTILITY_NODES": OperationTypesAddUtilityNodes, + "ADD_WORKER_NODES": OperationTypesAddWorkerNodes, + "ADD_CLOUD_SQL": OperationTypesAddCloudSql, + "REMOVE_CLOUD_SQL": OperationTypesRemoveCloudSql, + "CHANGE_COMPARTMENT_FOR_BDS": OperationTypesChangeCompartmentForBds, + "CHANGE_SHAPE": OperationTypesChangeShape, + "UPDATE_INFRA": OperationTypesUpdateInfra, + "RESTART_NODE": OperationTypesRestartNode, + "REMOVE_NODE": OperationTypesRemoveNode, + "CREATE_AUTOSCALE_CONFIG": OperationTypesCreateAutoscaleConfig, + "UPDATE_AUTOSCALE_CONFIG": OperationTypesUpdateAutoscaleConfig, + "DELETE_AUTOSCALE_CONFIG": OperationTypesDeleteAutoscaleConfig, + "AUTOSCALE_CONFIG": OperationTypesAutoscaleConfig, + "AUTOSCALE_RUN": OperationTypesAutoscaleRun, + "CREATE_API_KEY": OperationTypesCreateApiKey, + "DELETE_API_KEY": OperationTypesDeleteApiKey, + "TEST_OBJECT_STORE_CONNECTION": OperationTypesTestObjectStoreConnection, + "CREATE_METASTORE_CONFIG": OperationTypesCreateMetastoreConfig, + "DELETE_METASTORE_CONFIG": OperationTypesDeleteMetastoreConfig, + "UPDATE_METASTORE_CONFIG": OperationTypesUpdateMetastoreConfig, + "ACTIVATE_METASTORE_CONFIG": OperationTypesActivateMetastoreConfig, + "TEST_METASTORE_CONFIG": OperationTypesTestMetastoreConfig, + "PATCH_BDS": OperationTypesPatchBds, + "PATCH_ODH": OperationTypesPatchOdh, + "PATCH_OS": OperationTypesPatchOs, + "STOP_BDS": OperationTypesStopBds, + "START_BDS": OperationTypesStartBds, + "ADD_KAFKA": OperationTypesAddKafka, + "REMOVE_KAFKA": OperationTypesRemoveKafka, + "EXECUTE_BOOTSTRAP_SCRIPT": OperationTypesExecuteBootstrapScript, + "ODH_SERVICE_CERTIFICATE_UPDATE": OperationTypesOdhServiceCertificateUpdate, + "CREATE_BACKUP_CONFIG": OperationTypesCreateBackupConfig, + "UPDATE_BACKUP_CONFIG": OperationTypesUpdateBackupConfig, + "DELETE_BACKUP_CONFIG": OperationTypesDeleteBackupConfig, + "CREATE_NODE_REPLACE_CONFIG": OperationTypesCreateNodeReplaceConfig, + "UPDATE_NODE_REPLACE_CONFIG": OperationTypesUpdateNodeReplaceConfig, + "DELETE_NODE_REPLACE_CONFIG": OperationTypesDeleteNodeReplaceConfig, + "BACKUP_NODES": OperationTypesBackupNodes, + "DELETE_NODE_BACKUP": OperationTypesDeleteNodeBackup, + "REPLACE_NODE": OperationTypesReplaceNode, + "CREATE_RESOURCE_PRINCIPAL_CONFIGURATION": OperationTypesCreateResourcePrincipalConfiguration, + "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION": OperationTypesDeleteResourcePrincipalConfiguration, + "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION": OperationTypesUpdateResourcePrincipalConfiguration, + "REFRESH_RESOURCE_PRINCIPAL": OperationTypesRefreshResourcePrincipal, } var mappingOperationTypesEnumLowerCase = map[string]OperationTypesEnum{ - "create_bds": OperationTypesCreateBds, - "update_bds": OperationTypesUpdateBds, - "delete_bds": OperationTypesDeleteBds, - "add_block_storage": OperationTypesAddBlockStorage, - "add_master_nodes": OperationTypesAddMasterNodes, - "add_utility_nodes": OperationTypesAddUtilityNodes, - "add_worker_nodes": OperationTypesAddWorkerNodes, - "add_cloud_sql": OperationTypesAddCloudSql, - "remove_cloud_sql": OperationTypesRemoveCloudSql, - "change_compartment_for_bds": OperationTypesChangeCompartmentForBds, - "change_shape": OperationTypesChangeShape, - "update_infra": OperationTypesUpdateInfra, - "restart_node": OperationTypesRestartNode, - "remove_node": OperationTypesRemoveNode, - "create_autoscale_config": OperationTypesCreateAutoscaleConfig, - "update_autoscale_config": OperationTypesUpdateAutoscaleConfig, - "delete_autoscale_config": OperationTypesDeleteAutoscaleConfig, - "autoscale_config": OperationTypesAutoscaleConfig, - "autoscale_run": OperationTypesAutoscaleRun, - "create_api_key": OperationTypesCreateApiKey, - "delete_api_key": OperationTypesDeleteApiKey, - "test_object_store_connection": OperationTypesTestObjectStoreConnection, - "create_metastore_config": OperationTypesCreateMetastoreConfig, - "delete_metastore_config": OperationTypesDeleteMetastoreConfig, - "update_metastore_config": OperationTypesUpdateMetastoreConfig, - "activate_metastore_config": OperationTypesActivateMetastoreConfig, - "test_metastore_config": OperationTypesTestMetastoreConfig, - "patch_bds": OperationTypesPatchBds, - "patch_odh": OperationTypesPatchOdh, - "patch_os": OperationTypesPatchOs, - "stop_bds": OperationTypesStopBds, - "start_bds": OperationTypesStartBds, - "add_kafka": OperationTypesAddKafka, - "remove_kafka": OperationTypesRemoveKafka, - "execute_bootstrap_script": OperationTypesExecuteBootstrapScript, - "odh_service_certificate_update": OperationTypesOdhServiceCertificateUpdate, - "create_backup_config": OperationTypesCreateBackupConfig, - "update_backup_config": OperationTypesUpdateBackupConfig, - "delete_backup_config": OperationTypesDeleteBackupConfig, - "create_node_replace_config": OperationTypesCreateNodeReplaceConfig, - "update_node_replace_config": OperationTypesUpdateNodeReplaceConfig, - "delete_node_replace_config": OperationTypesDeleteNodeReplaceConfig, - "backup_nodes": OperationTypesBackupNodes, - "delete_node_backup": OperationTypesDeleteNodeBackup, - "replace_node": OperationTypesReplaceNode, + "create_bds": OperationTypesCreateBds, + "update_bds": OperationTypesUpdateBds, + "delete_bds": OperationTypesDeleteBds, + "add_block_storage": OperationTypesAddBlockStorage, + "add_master_nodes": OperationTypesAddMasterNodes, + "add_utility_nodes": OperationTypesAddUtilityNodes, + "add_worker_nodes": OperationTypesAddWorkerNodes, + "add_cloud_sql": OperationTypesAddCloudSql, + "remove_cloud_sql": OperationTypesRemoveCloudSql, + "change_compartment_for_bds": OperationTypesChangeCompartmentForBds, + "change_shape": OperationTypesChangeShape, + "update_infra": OperationTypesUpdateInfra, + "restart_node": OperationTypesRestartNode, + "remove_node": OperationTypesRemoveNode, + "create_autoscale_config": OperationTypesCreateAutoscaleConfig, + "update_autoscale_config": OperationTypesUpdateAutoscaleConfig, + "delete_autoscale_config": OperationTypesDeleteAutoscaleConfig, + "autoscale_config": OperationTypesAutoscaleConfig, + "autoscale_run": OperationTypesAutoscaleRun, + "create_api_key": OperationTypesCreateApiKey, + "delete_api_key": OperationTypesDeleteApiKey, + "test_object_store_connection": OperationTypesTestObjectStoreConnection, + "create_metastore_config": OperationTypesCreateMetastoreConfig, + "delete_metastore_config": OperationTypesDeleteMetastoreConfig, + "update_metastore_config": OperationTypesUpdateMetastoreConfig, + "activate_metastore_config": OperationTypesActivateMetastoreConfig, + "test_metastore_config": OperationTypesTestMetastoreConfig, + "patch_bds": OperationTypesPatchBds, + "patch_odh": OperationTypesPatchOdh, + "patch_os": OperationTypesPatchOs, + "stop_bds": OperationTypesStopBds, + "start_bds": OperationTypesStartBds, + "add_kafka": OperationTypesAddKafka, + "remove_kafka": OperationTypesRemoveKafka, + "execute_bootstrap_script": OperationTypesExecuteBootstrapScript, + "odh_service_certificate_update": OperationTypesOdhServiceCertificateUpdate, + "create_backup_config": OperationTypesCreateBackupConfig, + "update_backup_config": OperationTypesUpdateBackupConfig, + "delete_backup_config": OperationTypesDeleteBackupConfig, + "create_node_replace_config": OperationTypesCreateNodeReplaceConfig, + "update_node_replace_config": OperationTypesUpdateNodeReplaceConfig, + "delete_node_replace_config": OperationTypesDeleteNodeReplaceConfig, + "backup_nodes": OperationTypesBackupNodes, + "delete_node_backup": OperationTypesDeleteNodeBackup, + "replace_node": OperationTypesReplaceNode, + "create_resource_principal_configuration": OperationTypesCreateResourcePrincipalConfiguration, + "delete_resource_principal_configuration": OperationTypesDeleteResourcePrincipalConfiguration, + "update_resource_principal_configuration": OperationTypesUpdateResourcePrincipalConfiguration, + "refresh_resource_principal": OperationTypesRefreshResourcePrincipal, } // GetOperationTypesEnumValues Enumerates the set of values for OperationTypesEnum @@ -218,6 +230,10 @@ func GetOperationTypesEnumStringValues() []string { "BACKUP_NODES", "DELETE_NODE_BACKUP", "REPLACE_NODE", + "CREATE_RESOURCE_PRINCIPAL_CONFIGURATION", + "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION", + "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION", + "REFRESH_RESOURCE_PRINCIPAL", } } diff --git a/bds/patching_configs.go b/bds/patching_configs.go index ccf63fda9e..acc5b1f23a 100644 --- a/bds/patching_configs.go +++ b/bds/patching_configs.go @@ -16,7 +16,7 @@ import ( "strings" ) -// PatchingConfigs Detailed configurations for defining the behavior when installing os patches. If not provided, nodes will be patched and rebooted AD/FD by AD/FD. +// PatchingConfigs Detailed configurations for defining the behavior when installing os patches. If not provided, nodes will be patched and rebooted AD/FD by AD/FD for regular patches or will be patched with down time if the patch is an emergent patch. type PatchingConfigs interface { } @@ -58,6 +58,10 @@ func (m *patchingconfigs) UnmarshalPolymorphicJSON(data []byte) (interface{}, er mm := DowntimeBasedPatchingConfigs{} err = json.Unmarshal(data, &mm) return mm, err + case "DOMAIN_BASED": + mm := DomainBasedPatchingConfigs{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for PatchingConfigs: %s.", m.PatchingConfigStrategy) return *m, nil @@ -87,16 +91,19 @@ type PatchingConfigsPatchingConfigStrategyEnum string const ( PatchingConfigsPatchingConfigStrategyDowntimeBased PatchingConfigsPatchingConfigStrategyEnum = "DOWNTIME_BASED" PatchingConfigsPatchingConfigStrategyBatchingBased PatchingConfigsPatchingConfigStrategyEnum = "BATCHING_BASED" + PatchingConfigsPatchingConfigStrategyDomainBased PatchingConfigsPatchingConfigStrategyEnum = "DOMAIN_BASED" ) var mappingPatchingConfigsPatchingConfigStrategyEnum = map[string]PatchingConfigsPatchingConfigStrategyEnum{ "DOWNTIME_BASED": PatchingConfigsPatchingConfigStrategyDowntimeBased, "BATCHING_BASED": PatchingConfigsPatchingConfigStrategyBatchingBased, + "DOMAIN_BASED": PatchingConfigsPatchingConfigStrategyDomainBased, } var mappingPatchingConfigsPatchingConfigStrategyEnumLowerCase = map[string]PatchingConfigsPatchingConfigStrategyEnum{ "downtime_based": PatchingConfigsPatchingConfigStrategyDowntimeBased, "batching_based": PatchingConfigsPatchingConfigStrategyBatchingBased, + "domain_based": PatchingConfigsPatchingConfigStrategyDomainBased, } // GetPatchingConfigsPatchingConfigStrategyEnumValues Enumerates the set of values for PatchingConfigsPatchingConfigStrategyEnum @@ -113,6 +120,7 @@ func GetPatchingConfigsPatchingConfigStrategyEnumStringValues() []string { return []string{ "DOWNTIME_BASED", "BATCHING_BASED", + "DOMAIN_BASED", } } diff --git a/bds/remove_resource_principal_configuration_details.go b/bds/remove_resource_principal_configuration_details.go new file mode 100644 index 0000000000..3767065e82 --- /dev/null +++ b/bds/remove_resource_principal_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" +) + +// RemoveResourcePrincipalConfigurationDetails Details of removing a resource principal configuration for the cluster. +type RemoveResourcePrincipalConfigurationDetails struct { + + // Base-64 encoded Cluster Admin Password for cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m RemoveResourcePrincipalConfigurationDetails) 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 RemoveResourcePrincipalConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/remove_resource_principal_configuration_request_response.go b/bds/remove_resource_principal_configuration_request_response.go new file mode 100644 index 0000000000..e6730f680b --- /dev/null +++ b/bds/remove_resource_principal_configuration_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 bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveResourcePrincipalConfigurationRequest wrapper for the RemoveResourcePrincipalConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RemoveResourcePrincipalConfiguration.go.html to see an example of how to use RemoveResourcePrincipalConfigurationRequest. +type RemoveResourcePrincipalConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + ResourcePrincipalConfigurationId *string `mandatory:"true" contributesTo:"path" name:"resourcePrincipalConfigurationId"` + + // Details of removing a resource principal for the bds cluster. + RemoveResourcePrincipalConfigurationDetails `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"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveResourcePrincipalConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveResourcePrincipalConfigurationRequest) 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 RemoveResourcePrincipalConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveResourcePrincipalConfigurationRequest) 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 RemoveResourcePrincipalConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveResourcePrincipalConfigurationResponse wrapper for the RemoveResourcePrincipalConfiguration operation +type RemoveResourcePrincipalConfigurationResponse 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 RemoveResourcePrincipalConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveResourcePrincipalConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/resource_principal_configuration.go b/bds/resource_principal_configuration.go new file mode 100644 index 0000000000..9cd28a7831 --- /dev/null +++ b/bds/resource_principal_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" +) + +// ResourcePrincipalConfiguration Resource Principal Session Token Details. +type ResourcePrincipalConfiguration struct { + + // The id of the ResourcePrincipalConfiguration. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the bdsInstance which is the parent resource id. + BdsInstanceId *string `mandatory:"true" json:"bdsInstanceId"` + + // A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Life span in hours of each resource principal session token. + SessionTokenLifeSpanDurationInHours *int `mandatory:"true" json:"sessionTokenLifeSpanDurationInHours"` + + // The state of the ResourcePrincipalConfiguration. + LifecycleState ResourcePrincipalConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time the ResourcePrincipalConfiguration was created, shown as an RFC 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the ResourcePrincipalConfiguration was updated, shown as an RFC 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + TimeTokenRefreshed *common.SDKTime `mandatory:"false" json:"timeTokenRefreshed"` + + // the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + TimeTokenExpiry *common.SDKTime `mandatory:"false" json:"timeTokenExpiry"` +} + +func (m ResourcePrincipalConfiguration) 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 ResourcePrincipalConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingResourcePrincipalConfigurationLifecycleStateEnum(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(GetResourcePrincipalConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ResourcePrincipalConfigurationLifecycleStateEnum Enum with underlying type: string +type ResourcePrincipalConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for ResourcePrincipalConfigurationLifecycleStateEnum +const ( + ResourcePrincipalConfigurationLifecycleStateCreating ResourcePrincipalConfigurationLifecycleStateEnum = "CREATING" + ResourcePrincipalConfigurationLifecycleStateActive ResourcePrincipalConfigurationLifecycleStateEnum = "ACTIVE" + ResourcePrincipalConfigurationLifecycleStateUpdating ResourcePrincipalConfigurationLifecycleStateEnum = "UPDATING" + ResourcePrincipalConfigurationLifecycleStateDeleting ResourcePrincipalConfigurationLifecycleStateEnum = "DELETING" + ResourcePrincipalConfigurationLifecycleStateDeleted ResourcePrincipalConfigurationLifecycleStateEnum = "DELETED" + ResourcePrincipalConfigurationLifecycleStateFailed ResourcePrincipalConfigurationLifecycleStateEnum = "FAILED" +) + +var mappingResourcePrincipalConfigurationLifecycleStateEnum = map[string]ResourcePrincipalConfigurationLifecycleStateEnum{ + "CREATING": ResourcePrincipalConfigurationLifecycleStateCreating, + "ACTIVE": ResourcePrincipalConfigurationLifecycleStateActive, + "UPDATING": ResourcePrincipalConfigurationLifecycleStateUpdating, + "DELETING": ResourcePrincipalConfigurationLifecycleStateDeleting, + "DELETED": ResourcePrincipalConfigurationLifecycleStateDeleted, + "FAILED": ResourcePrincipalConfigurationLifecycleStateFailed, +} + +var mappingResourcePrincipalConfigurationLifecycleStateEnumLowerCase = map[string]ResourcePrincipalConfigurationLifecycleStateEnum{ + "creating": ResourcePrincipalConfigurationLifecycleStateCreating, + "active": ResourcePrincipalConfigurationLifecycleStateActive, + "updating": ResourcePrincipalConfigurationLifecycleStateUpdating, + "deleting": ResourcePrincipalConfigurationLifecycleStateDeleting, + "deleted": ResourcePrincipalConfigurationLifecycleStateDeleted, + "failed": ResourcePrincipalConfigurationLifecycleStateFailed, +} + +// GetResourcePrincipalConfigurationLifecycleStateEnumValues Enumerates the set of values for ResourcePrincipalConfigurationLifecycleStateEnum +func GetResourcePrincipalConfigurationLifecycleStateEnumValues() []ResourcePrincipalConfigurationLifecycleStateEnum { + values := make([]ResourcePrincipalConfigurationLifecycleStateEnum, 0) + for _, v := range mappingResourcePrincipalConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetResourcePrincipalConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for ResourcePrincipalConfigurationLifecycleStateEnum +func GetResourcePrincipalConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingResourcePrincipalConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingResourcePrincipalConfigurationLifecycleStateEnum(val string) (ResourcePrincipalConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingResourcePrincipalConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/resource_principal_configuration_summary.go b/bds/resource_principal_configuration_summary.go new file mode 100644 index 0000000000..6bdc8c409d --- /dev/null +++ b/bds/resource_principal_configuration_summary.go @@ -0,0 +1,63 @@ +// 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" +) + +// ResourcePrincipalConfigurationSummary Resource Principal Session Token Details. +type ResourcePrincipalConfigurationSummary struct { + + // the ID of the ResourcePrincipalConfiguration. + Id *string `mandatory:"true" json:"id"` + + // the OCID of the bdsInstance which is the parent resource id. + BdsInstanceId *string `mandatory:"true" json:"bdsInstanceId"` + + // a user-friendly name. only ascii alphanumeric characters with no spaces allowed. the name does not have to be unique, and it may be changed. avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // the state of the ResourcePrincipalConfiguration. + LifecycleState ResourcePrincipalConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // the time the ResourcePrincipalConfiguration was created, shown as an rfc 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // the time the ResourcePrincipalConfiguration was updated, shown as an rfc 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + TimeTokenRefreshed *common.SDKTime `mandatory:"false" json:"timeTokenRefreshed"` + + // the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + TimeTokenExpiry *common.SDKTime `mandatory:"false" json:"timeTokenExpiry"` +} + +func (m ResourcePrincipalConfigurationSummary) 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 ResourcePrincipalConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingResourcePrincipalConfigurationLifecycleStateEnum(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(GetResourcePrincipalConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/update_resource_principal_configuration_details.go b/bds/update_resource_principal_configuration_details.go new file mode 100644 index 0000000000..97b6c1134c --- /dev/null +++ b/bds/update_resource_principal_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" +) + +// UpdateResourcePrincipalConfigurationDetails Details of updating the resource principal configuration for the cluster. +type UpdateResourcePrincipalConfigurationDetails struct { + + // A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Life span in hours for the resource principal session token. + SessionTokenLifeSpanDurationInHours *int `mandatory:"false" json:"sessionTokenLifeSpanDurationInHours"` +} + +func (m UpdateResourcePrincipalConfigurationDetails) 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 UpdateResourcePrincipalConfigurationDetails) 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_resource_principal_configuration_request_response.go b/bds/update_resource_principal_configuration_request_response.go new file mode 100644 index 0000000000..00a52cd706 --- /dev/null +++ b/bds/update_resource_principal_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" +) + +// UpdateResourcePrincipalConfigurationRequest wrapper for the UpdateResourcePrincipalConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/UpdateResourcePrincipalConfiguration.go.html to see an example of how to use UpdateResourcePrincipalConfigurationRequest. +type UpdateResourcePrincipalConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + ResourcePrincipalConfigurationId *string `mandatory:"true" contributesTo:"path" name:"resourcePrincipalConfigurationId"` + + // Details for updating the resourcePrincipalConfiguration. + UpdateResourcePrincipalConfigurationDetails `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 UpdateResourcePrincipalConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateResourcePrincipalConfigurationRequest) 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 UpdateResourcePrincipalConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateResourcePrincipalConfigurationRequest) 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 UpdateResourcePrincipalConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateResourcePrincipalConfigurationResponse wrapper for the UpdateResourcePrincipalConfiguration operation +type UpdateResourcePrincipalConfigurationResponse 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 UpdateResourcePrincipalConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateResourcePrincipalConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/common/auth/resource_principal_key_provider.go b/common/auth/resource_principal_key_provider.go index b51c349095..6ae1348d1d 100644 --- a/common/auth/resource_principal_key_provider.go +++ b/common/auth/resource_principal_key_provider.go @@ -35,6 +35,23 @@ const ( ResourcePrincipalSessionTokenEndpoint = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT" //ResourcePrincipalTokenEndpoint endpoint for retrieving the Resource Principal Token ResourcePrincipalTokenEndpoint = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT" + + //ResourcePrincipalVersion3_0 is a supported version for resource principals + ResourcePrincipalVersion3_0 = "3.0" + ResourcePrincipalVersionForLeaf = "OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE" + ResourcePrincipalRptEndpointForLeaf = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE" + ResourcePrincipalRptPathForLeaf = "OCI_RESOURCE_PRINCIPAL_RPT_PATH_FOR_LEAF_RESOURCE" + ResourcePrincipalRpstEndpointForLeaf = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE" + ResourcePrincipalResourceIdForLeaf = "OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE" + ResourcePrincipalPrivatePemForLeaf = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE" + ResourcePrincipalPrivatePemPassphraseForLeaf = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE" + ResourcePrincipalRpstForLeaf = "OCI_RESOURCE_PRINCIPAL_RPST_FOR_LEAF_RESOURCE" + ResourcePrincipalRegionForLeaf = "OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE" + ResourcePrincipalRptURLForParent = "OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE" + ResourcePrincipalRpstEndpointForParent = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_PARENT_RESOURCE" + ResourcePrincipalTenancyIDForLeaf = "OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE" + OpcParentRptUrlHeader = "opc-parent-rpt-url" + // KubernetesServiceAccountTokenPath that contains cluster information KubernetesServiceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" // DefaultKubernetesServiceAccountCertPath that contains cluster information @@ -90,6 +107,8 @@ func ResourcePrincipalConfigurationProvider() (ConfigurationProviderWithClaimAcc *rpst, *private, passphrase, *region) case ResourcePrincipalVersion1_1: return newResourcePrincipalKeyProvider11(DefaultRptPathProvider{}) + case ResourcePrincipalVersion3_0: + return newResourcePrincipalKeyProvider30() default: err := fmt.Errorf("can not create resource principal, environment variable: %s, must be valid", ResourcePrincipalVersionEnvVar) return nil, resourcePrincipalError{err: err} @@ -151,6 +170,41 @@ func OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider(saT return nil, resourcePrincipalError{err: err} } +func OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProviderK8sService(k8sServiceHost *string, saTokenProvider ServiceAccountTokenProvider, remoteCAbytes []byte) (ConfigurationProviderWithClaimAccess, error) { + saCertPath := requireEnv(OciKubernetesServiceAccountCertPath) + + if saCertPath == nil { + tmp := DefaultKubernetesServiceAccountCertPath + saCertPath = &tmp + } + + kubernetesServiceAccountCertRaw, err := ioutil.ReadFile(*saCertPath) + if err != nil { + err = fmt.Errorf("can not create resource principal, error getting Kubernetes Service Account Token at %s", *saCertPath) + return nil, resourcePrincipalError{err: err} + } + + kubernetesServiceAccountCert := x509.NewCertPool() + kubernetesServiceAccountCert.AppendCertsFromPEM(kubernetesServiceAccountCertRaw) + if ok := kubernetesServiceAccountCert.AppendCertsFromPEM(remoteCAbytes); !ok { + err := fmt.Errorf("failed to load remote CA") + return nil, resourcePrincipalError{err: err} + } + + region := requireEnv(ResourcePrincipalRegionEnvVar) + if region == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", + ResourcePrincipalRegionEnvVar) + return nil, resourcePrincipalError{err: err} + } + + proxymuxEndpoint := fmt.Sprintf("https://%s:%s/resourcePrincipalSessionTokens", *k8sServiceHost, KubernetesProxymuxServicePort) + + return newOkeWorkloadIdentityProvider(proxymuxEndpoint, saTokenProvider, kubernetesServiceAccountCert, *region) + + return nil, resourcePrincipalError{err: err} +} + // ResourcePrincipalConfigurationProviderForRegion returns a resource principal configuration provider using well known // environment variables to look up token information, for a given region. The environment variables can either paths or contain the material value // of the keys. However, in the case of the keys and tokens paths and values can not be mixed @@ -295,6 +349,51 @@ func newResourcePrincipalKeyProvider22(sessionTokenLocation, privatePemLocation return &rs, nil } +func newResourcePrincipalKeyProvider30() (ConfigurationProviderWithClaimAccess, error) { + rpVersionForLeafResource := requireEnv(ResourcePrincipalVersionForLeaf) + if rpVersionForLeafResource == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalVersionForLeaf) + return nil, resourcePrincipalError{err: err} + } + var leafResourceAuthProvider ConfigurationProviderWithClaimAccess + var err error + switch *rpVersionForLeafResource { + case ResourcePrincipalVersion1_1: + leafResourceAuthProvider, err = newResourcePrincipalKeyProvider11(RptPathProviderForLeafResource{}) + if err != nil { + return nil, err + } + return ResourcePrincipalConfigurationProviderV3(leafResourceAuthProvider) + case ResourcePrincipalVersion2_2: + rpst := requireEnv(ResourcePrincipalRpstForLeaf) + if rpst == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalRpstForLeaf) + return nil, resourcePrincipalError{err: err} + } + private := requireEnv(ResourcePrincipalPrivatePemForLeaf) + if private == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalPrivatePemForLeaf) + return nil, resourcePrincipalError{err: err} + } + passphrase := requireEnv(ResourcePrincipalPrivatePemPassphraseForLeaf) + region := requireEnv(ResourcePrincipalRegionForLeaf) + if region == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalRegionForLeaf) + return nil, resourcePrincipalError{err: err} + } + leafResourceAuthProvider, err = newResourcePrincipalKeyProvider22( + *rpst, *private, passphrase, *region) + if err != nil { + return nil, err + } + return ResourcePrincipalConfigurationProviderV3(leafResourceAuthProvider) + default: + err := fmt.Errorf("can not create resource principal, environment variable: %s, must be valid", ResourcePrincipalVersionForLeaf) + return nil, resourcePrincipalError{err: err} + + } +} + func newOkeWorkloadIdentityProvider(proxymuxEndpoint string, saTokenProvider ServiceAccountTokenProvider, kubernetesServiceAccountCert *x509.CertPool, region string) (*resourcePrincipalKeyProvider, error) { var err error diff --git a/common/auth/resource_principal_key_provider_test.go b/common/auth/resource_principal_key_provider_test.go index 4c1dff8507..727a1b5ada 100644 --- a/common/auth/resource_principal_key_provider_test.go +++ b/common/auth/resource_principal_key_provider_test.go @@ -77,6 +77,42 @@ BjYWARWBrZbkAz3+8y9EIHV9aRmnX1jGOVUJ0MhaYyZ18KTzi32gAG8s7V7r57Sv // Generated RPST duplicates the Java SDK test resources rpst = `eyJraWQiOiJhc3ciLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJvY2lkMS5kYXRhd2FyZWhvdXNlLmN1c3RvbWVyLWJpZy1kYi0xIiwiaXNzIjoiYXV0aFNlcnZpY2Uub3JhY2xlLmNvbSIsInJlc190ZW5hbnQiOiJjdXN0b21lci10ZW5hbnQtMSIsInB0eXBlIjoicmVzb3VyY2UiLCJyZXNfdHlwZSI6ImRhdGF3YXJlaG91c2UiLCJhdWQiOiJvY2kiLCJvcGMtdGFnIjoiVjEsb2NpZDEuZHluYW1pY2dyb3VwLmRldi4uYWFhYWFhYWEsb28ycHA2M3Y3NTMyNXpiNnJuNHYzYWgzYnRlam5ubTJvdDN1NWJyZnd1Y2VvczRpZDZ0YSIsIm9wYy1idW1wIjoiSDRzSUFBQUFBQUFBQUUyUHpRcUNRQlNGTTExTVJSQXRLbHBHYlFRSE1sSm8xVVAwQXVQTWJSeHJISnVmMHA0LUF4SFA5bjczTzV6bFRWSEJqcGcxSlpHQ2NxMWNoUm04TVNaZDVGM3cwMHZGejhaQnduaVpTZjA0eDBWaThuZGVrSlJMY0o4NnF3cWFmRTJkMGx3bE5RbFQ1Qy04N1ZxRFVVNVR3RlRKaW1ncm9iUllzTjJLT21PVkJCME5EdEh4T2dvbktGaE1ROThiLS1FZWpWdkh2SGZZcG9MZG5CRkxQa1JEcnB5Qjl1R0N2SmFhOVZSclAzU1RoaVR1R3pQQkk1Yjl5LUlBZVp2Z0IxX2paUVFDQVFBQSIsInR0eXBlIjoicmVzIiwicmVzX2lkIjoib2NpZDEuZGF0YXdhcmVob3VzZS5jdXN0b21lci1iaWctZGItMSIsIm9wYy1pbnN0YW5jZSI6Im9jaWQxLmluc3RhbmNlLmpveWZ1bC5kYm5vZGUuMSIsInJlc190YWciOiIiLCJyZXNfY29tcGFydG1lbnQiOiJjdXN0b21lci1jb21wYXJ0bWVudC0xIiwiZXhwIjoxNTUyNjgxMTY4LCJvcGMtY29tcGFydG1lbnQiOiJkYmFhcy1jb21wYXJ0bWVudC0xIiwiaWF0IjoxNTUyNjc5OTY4LCJqdGkiOiIzZDQxNDNlOC01ZTMyLTRlMTItYTM4Yy01OTc0NjUwMTA3MDMiLCJ0ZW5hbnQiOiJjdXN0b21lci10ZW5hbnQtMSIsImp3ayI6IntcImtpZFwiOlwiY3VzdG9tZXItZGJub2RlLTFcIixcIm5cIjpcImxzLUFDNGhpS0stMTFVdTFEZ3VLTFE1VGFhZGpNR1hCcDRhMFVFS2w0dnJjcmF3b2V6X3BuUS1pNS1nNV9XTU5xVXdrdUtBcXVTZnlVS25yZEhhV3d4b2RWcmRleTk1T3R4ckIySzNRdzgzaURkcUltSkhfWFp1cERfRHR0SzduS3N6Qy01TFI1Ums3SHF5Y094eEZVNzBNcGduQW9IaVNUM2V0VjJVZlJkNXRtb0dOaTdOSURORWJnSVpmcnczYUVYbHBzaGM2ckpVdUEyOG55ZUNjOVFtOHllMHUwN0UzamlCYmp5RjNFVWhTelNxblFsUlVNVEdaR1ZSZGpfRG9tcEhUVkFPNEJqUnVIZURWWGtWNjh1TzNrSEdTZUVPc2xsZmJZTkpaYUtCQTB3aUxrZkViWVBEWDFwbTM4UFAzcnJFbWhxeElObzdoYVFWakRXRDNKUVwiLFwiZVwiOlwiQVFBQlwiLFwia3R5XCI6XCJSU0FcIixcImFsZ1wiOlwiUlMyNTZcIixcInVzZVwiOlwic2lnXCJ9Iiwib3BjLXRlbmFudCI6ImRiYWFzLXRlbmFudCJ9.LqRt9JXSdcLahdwACjw_p_KHQhKde-NaVZG3zMjzWX6bVad-SRZYWKQSlk6Tq4f1ZNN0uxlP-d2snQAp3Kw-cQRrdCDOmD_0CDgR-yre-YbJDsJbEncczUIbe-ASeq_Sh9zDROVuD_7NdrmUCiVH2g-UYpYkuKKqu_tVjL2uy77W5_DGobPArEFvZ2GnyHT7gVVv12RnINtgr2jJULhegPBfvnp9-fhhZ7_PcsJ7Z5FkPzLtLOwEm3Lbm3veyUVUviu1CSjXnK67KzjS18TVGi723bkxYBf9lYDHfaXh9EEHzPtxeLAl3VrGjwZUv_ih0FRmoM7wgq8HMRjNACMo6g` + + cert = `-----BEGIN CERTIFICATE----- +MIIFUzCCBDugAwIBAgIUTr334xlYa/kjII5Ika7FWmR1Xw8wDQYJKoZIhvcNAQEL +BQAwFjEUMBIGA1UEAwwLdGVzdC1uaWMtY2EwHhcNMjQwNzAyMTI0MjQyWhcNMzQw +NzAxMDAwMDAwWjAWMRQwEgYDVQQDDAt0ZXN0LW5pYy1jYTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBALfLvWLqu/3xTDJL2L/x97UD6BK2Jx+tlfNsWXiI +eYUmhkL4i1QiV+7ufjPV0AhAUNygVi7IgKYmTMsuHk9iyZn50ZqoTudkIrQoJBFX +GhUlwjIyPZ6xbKJYewCtBPRbRWAt1SFLUqkJdElBSMhS3kDBGmYRj6Z5tDVFoHm+ +srI54WAVb8OVuUYsx0YvGSVUProe5hw6/13q56fIXeORu3zm2YQ/fdoViscDy9tV +wt8LrC79sZaUqF7rG40AlnacymGupFyOlrSSMJ3zD3CqGG0tJ8PfOHcRHX8gSyqF +NUOJslywkF0SPjZDJk3tJ8vpJYCCG4aN+vVDwmqFrfopwIsCAwEAAaOCApcwggKT +MA4GA1UdDwEB/wQEAwICBDAPBgNVHRMBAf8EBTADAQH/MIIBMwYDVR0OBIIBKgSC +ASYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3y71i6rv98UwyS9i/ +8fe1A+gSticfrZXzbFl4iHmFJoZC+ItUIlfu7n4z1dAIQFDcoFYuyICmJkzLLh5P +YsmZ+dGaqE7nZCK0KCQRVxoVJcIyMj2esWyiWHsArQT0W0VgLdUhS1KpCXRJQUjI +Ut5AwRpmEY+mebQ1RaB5vrKyOeFgFW/DlblGLMdGLxklVD66HuYcOv9d6uenyF3j +kbt85tmEP33aFYrHA8vbVcLfC6wu/bGWlKhe6xuNAJZ2nMphrqRcjpa0kjCd8w9w +qhhtLSfD3zh3ER1/IEsqhTVDibJcsJBdEj42QyZN7SfL6SWAghuGjfr1Q8Jqha36 +KcCLAgMBAAEwggE3BgNVHSMEggEuMIIBKoCCASYwggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQC3y71i6rv98UwyS9i/8fe1A+gSticfrZXzbFl4iHmFJoZC ++ItUIlfu7n4z1dAIQFDcoFYuyICmJkzLLh5PYsmZ+dGaqE7nZCK0KCQRVxoVJcIy +Mj2esWyiWHsArQT0W0VgLdUhS1KpCXRJQUjIUt5AwRpmEY+mebQ1RaB5vrKyOeFg +FW/DlblGLMdGLxklVD66HuYcOv9d6uenyF3jkbt85tmEP33aFYrHA8vbVcLfC6wu +/bGWlKhe6xuNAJZ2nMphrqRcjpa0kjCd8w9wqhhtLSfD3zh3ER1/IEsqhTVDibJc +sJBdEj42QyZN7SfL6SWAghuGjfr1Q8Jqha36KcCLAgMBAAEwDQYJKoZIhvcNAQEL +BQADggEBAKtWwRbJuPGjT5YN+FockOrgzm33fGAu9gItXrFmwfgLgDO4jFlZXKL3 +OtS0Z3j53IL8DYrnByRboQiBCd4D27zDD4ai+9IEliCmNcUBFeTnO07sNVwoqu+C +S3nCd24xKFDIb3uByLNNn4sbMHsGS+YVwqpCQRUuG2+IcsS9XcjyLmHEN7FcOh0F +o13kIfjs8fC8ojka0akodkyz1VlfJ+C4SlyHJtFvqh3eWlRmdVAhNYp6NKG4LrHe +Zj5mDDkUDDyQVVCvZbt8q1cAPCGtb2QDoAQItiyCa0COvZC0iGZU54QUiLuyVXHV +Jx53Hf7QYUu35G/4dVgdwi2ZohedyO8= +-----END CERTIFICATE----- +` + + rptUrl = "https://sample.test/101010/resource/resourceId/actions/rptUrl" + rpstEndpoint = "https://identity/101010/v1/rpstEndpoint" ) var ppEnvVars = map[string]string{ @@ -94,6 +130,16 @@ var envVars = map[string]string{ ResourcePrincipalPrivatePEMEnvVar: testPrivateKey, } +var rpv3EnvVars = map[string]string{ + ResourcePrincipalVersionEnvVar: ResourcePrincipalVersion3_0, + ResourcePrincipalRegionForLeaf: string(common.RegionPHX), + ResourcePrincipalVersionForLeaf: ResourcePrincipalVersion2_2, + ResourcePrincipalPrivatePemForLeaf: testPrivateKey, + ResourcePrincipalRpstForLeaf: rpst, + ResourcePrincipalRptURLForParent: rptUrl, + ResourcePrincipalRpstEndpointForParent: rpstEndpoint, +} + func writeTempFile(data string) (filename string) { f, _ := ioutil.TempFile("", "auth-gosdkTest") f.WriteString(data) @@ -221,3 +267,34 @@ func TestResourcePrincipalConfigurationProviderForResource(t *testing.T) { assert.NoError(t, e) assert.Equal(t, string(common.RegionLHR), region) } + +func TestOkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProviderK8sService(t *testing.T) { + unsetAllVars() + k8sApiServer := "apiserver" + tokenProvider := &fakeSaTokenProvider{} + var tokenPath = testTokenPathPrefix + uuid() + createSaToken(tokenPath, tokenPath) + t.Setenv(OciKubernetesServiceAccountCertPath, tokenPath) + t.Setenv(ResourcePrincipalRegionEnvVar, string(common.RegionFRA)) + caBytes := []byte(cert) + provider, e := OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProviderK8sService(&k8sApiServer, tokenProvider, caBytes) + print(provider) + assert.NoError(t, e) + deleteSaToken(tokenPath) +} + +func TestResourcePrincipalConfigurationProviderV30(t *testing.T) { + unsetAllVars() + setupResourcePrincipalsEnvsWithValues(rpv3EnvVars) + + provider, err := ResourcePrincipalConfigurationProvider() + assert.NoError(t, err) + assert.NotNil(t, provider) +} + +type fakeSaTokenProvider struct { +} + +func (f *fakeSaTokenProvider) ServiceAccountToken() (string, error) { + return rpst, nil +} diff --git a/common/auth/resource_principal_token_path_provider.go b/common/auth/resource_principal_token_path_provider.go index 7b52f8c7fd..2c958880f9 100644 --- a/common/auth/resource_principal_token_path_provider.go +++ b/common/auth/resource_principal_token_path_provider.go @@ -118,6 +118,33 @@ func (pp DefaultRptPathProvider) ResourceID() (*string, error) { return rpID, nil } +type RptPathProviderForLeafResource struct { + path string + resourceID string +} + +func (pp RptPathProviderForLeafResource) Path() (*string, error) { + path := requireEnv(ResourcePrincipalRptPathForLeaf) + if path == nil { + rpPath := imdsPathTemplate + return &rpPath, nil + } + return path, nil +} + +// ResourceID returns the resource associated with the resource principal +func (pp RptPathProviderForLeafResource) ResourceID() (*string, error) { + rpID := requireEnv(ResourcePrincipalResourceIdForLeaf) + if rpID == nil { + instanceID, err := getInstanceIDFromMetadata() + if err != nil { + return nil, err + } + return &instanceID, nil + } + return rpID, nil +} + func getInstanceIDFromMetadata() (instanceID string, err error) { client := &http.Client{} req, err := http.NewRequest("GET", instanceIDURL, nil) diff --git a/common/auth/resource_principals_v3.go b/common/auth/resource_principals_v3.go new file mode 100644 index 0000000000..61ac2dbf94 --- /dev/null +++ b/common/auth/resource_principals_v3.go @@ -0,0 +1,351 @@ +// 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. + +package auth + +import ( + "context" + "crypto/rsa" + "fmt" + "net/http" + "net/url" + "strings" + "sync" + "time" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type resourcePrincipalV3Client struct { + securityToken securityToken + mux sync.Mutex + sessionKeySupplier sessionKeySupplier + rptUrl string + rpstUrl string + + leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess + + //ResourcePrincipalTargetServiceClient client that calls the target service to acquire a resource principal token + //ResourcePrincipalTargetServiceClient common.BaseClient + + //ResourcePrincipalSessionTokenClient. The client used to communicate with identity to exchange a resource principal for + // resource principal session token + //ResourcePrincipalSessionTokenClient common.BaseClient +} + +// acquireResourcePrincipalToken acquires the resource principal from the target service +func (c *resourcePrincipalV3Client) acquireResourcePrincipalToken(rptClient common.BaseClient, path string, signer common.HTTPRequestSigner) (tokenResponse resourcePrincipalTokenResponse, parentRptURL string, err error) { + rpServiceClient := rptClient + rpServiceClient.Signer = signer + + //Create a request with the instanceId + request := common.MakeDefaultHTTPRequest(http.MethodGet, path) + + //Call the target service + response, err := rpServiceClient.Call(context.Background(), &request) + if err != nil { + return + } + + defer common.CloseBodyIfValid(response) + + // Extract the opc-parent-rpt-url header value + parentRptURL = response.Header.Get(OpcParentRptUrlHeader) + + tokenResponse = resourcePrincipalTokenResponse{} + err = common.UnmarshalResponse(response, &tokenResponse) + return +} + +// exchangeToken exchanges a resource principal token from the target service with a session token from identity +func (c *resourcePrincipalV3Client) exchangeToken(rpstClient common.BaseClient, signer common.HTTPRequestSigner, publicKeyBase64 string, tokenResponse resourcePrincipalTokenResponse) (sessionToken string, err error) { + rpServiceClient := rpstClient + rpServiceClient.Signer = signer + + // Call identity service to get resource principal session token + sessionTokenReq := resourcePrincipalSessionTokenRequest{ + resourcePrincipalSessionTokenRequestBody{ + ServicePrincipalSessionToken: tokenResponse.Body.ServicePrincipalSessionToken, + ResourcePrincipalToken: tokenResponse.Body.ResourcePrincipalToken, + SessionPublicKey: publicKeyBase64, + }, + } + + sessionTokenHTTPReq, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, + "", sessionTokenReq) + if err != nil { + return + } + + sessionTokenHTTPRes, err := rpServiceClient.Call(context.Background(), &sessionTokenHTTPReq) + if err != nil { + return + } + defer common.CloseBodyIfValid(sessionTokenHTTPRes) + + sessionTokenRes := x509FederationResponse{} + err = common.UnmarshalResponse(sessionTokenHTTPRes, &sessionTokenRes) + if err != nil { + return + } + + sessionToken = sessionTokenRes.Token.Token + return +} + +// getSecurityToken makes the appropriate calls to acquire a resource principal security token +func (c *resourcePrincipalV3Client) getSecurityToken() (securityToken, error) { + + //c.leafResourcePrincipalKeyProvider.KeyID() + //common.Debugf("Refreshing resource principal token") + + //Read the public key from the session supplier. + pem := c.sessionKeySupplier.PublicKeyPemRaw() + pemSanitized := sanitizeCertificateString(string(pem)) + + return c.getSecurityTokenWithDepth(c.leafResourcePrincipalKeyProvider, 1, c.rptUrl, pemSanitized) + +} + +func (c *resourcePrincipalV3Client) getSecurityTokenWithDepth(keyProvider ConfigurationProviderWithClaimAccess, depth int, rptUrl, publicKey string) (securityToken, error) { + //Build the target service client + rpTargetServiceClient, err := common.NewClientWithConfig(keyProvider) + if err != nil { + return nil, err + } + + rpTokenURL, err := url.Parse(rptUrl) + if err != nil { + return nil, err + } + + common.Debugf("rptURL: %v", rpTokenURL) + + rpTargetServiceClient.Host = rpTokenURL.Scheme + "://" + rpTokenURL.Host + + //Build the identity client for token service + rpTokenSessionClient, err := common.NewClientWithConfig(keyProvider) + if err != nil { + return nil, err + } + + // Set RPST endpoint if passed in from env var, otherwise create it from region + if c.rpstUrl != "" { + rpSessionTokenURL, err := url.Parse(c.rpstUrl) + if err != nil { + return nil, err + } + + rpTokenSessionClient.Host = rpSessionTokenURL.Scheme + "://" + rpSessionTokenURL.Host + } else { + regionStr, err := c.leafResourcePrincipalKeyProvider.Region() + if err != nil { + return nil, fmt.Errorf("missing RPST env var and cannot determine region: %v", err) + } + region := common.StringToRegion(regionStr) + rpTokenSessionClient.Host = fmt.Sprintf("https://%s", region.Endpoint("auth")) + } + + rpTokenSessionClient.BasePath = identityResourcePrincipalSessionTokenPath + + //Acquire resource principal token from target service + common.Debugf("Acquiring resource principal token from target service") + tokenResponse, parentRptURL, err := c.acquireResourcePrincipalToken(rpTargetServiceClient, rpTokenURL.Path, common.DefaultRequestSigner(keyProvider)) + if err != nil { + return nil, err + } + + //Exchange resource principal token for session token from identity + common.Debugf("Exchanging resource principal token for resource principal session token") + sessionToken, err := c.exchangeToken(rpTokenSessionClient, common.DefaultRequestSigner(keyProvider), publicKey, tokenResponse) + if err != nil { + return nil, err + } + + // Base condition for recursion + // return the security token obtained last in the following cases + // 1. if depth is more than 10 + // 2. if opc-parent-rpt-url header is not passed or is empty + // 3. if opc-parent-rpt-url matches the last rpt url + if depth >= 10 || parentRptURL == "" || strings.EqualFold(parentRptURL, rptUrl) { + return newPrincipalToken(sessionToken) + } + + fd, err := newStaticFederationClient(sessionToken, c.sessionKeySupplier) + + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + + region, _ := keyProvider.Region() + + configProviderForNextCall := resourcePrincipalKeyProvider{ + fd, common.Region(region), + } + + return c.getSecurityTokenWithDepth(&configProviderForNextCall, depth+1, parentRptURL, publicKey) + +} + +func (c *resourcePrincipalV3Client) renewSecurityToken() (err error) { + if err = c.sessionKeySupplier.Refresh(); err != nil { + return fmt.Errorf("failed to refresh session key: %s", err.Error()) + } + + common.Logf("Renewing security token at: %v\n", time.Now().Format("15:04:05.000")) + if c.securityToken, err = c.getSecurityToken(); err != nil { + return fmt.Errorf("failed to get security token: %s", err.Error()) + } + common.Logf("Security token renewed at: %v\n", time.Now().Format("15:04:05.000")) + + return nil +} + +func (c *resourcePrincipalV3Client) renewSecurityTokenIfNotValid() (err error) { + if c.securityToken == nil || !c.securityToken.Valid() { + if err = c.renewSecurityToken(); err != nil { + return fmt.Errorf("failed to renew resource principal security token: %s", err.Error()) + } + } + return nil +} + +func (c *resourcePrincipalV3Client) PrivateKey() (*rsa.PrivateKey, error) { + c.mux.Lock() + defer c.mux.Unlock() + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.sessionKeySupplier.PrivateKey(), nil +} + +func (c *resourcePrincipalV3Client) SecurityToken() (token string, err error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err = c.renewSecurityTokenIfNotValid(); err != nil { + return "", err + } + return c.securityToken.String(), nil +} + +type resourcePrincipalKeyProviderV3 struct { + resourcePrincipalClient resourcePrincipalV3Client +} + +type resourcePrincipalV30ConfigurationProvider struct { + keyProvider resourcePrincipalKeyProviderV3 + region *common.Region +} + +func (r *resourcePrincipalV30ConfigurationProvider) Refreshable() bool { + return true +} + +func (r *resourcePrincipalV30ConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + privateKey, err := r.keyProvider.resourcePrincipalClient.PrivateKey() + if err != nil { + err = fmt.Errorf("failed to get resource principal private key: %s", err.Error()) + return nil, err + } + return privateKey, nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) KeyID() (string, error) { + var securityToken string + var err error + if securityToken, err = r.keyProvider.resourcePrincipalClient.SecurityToken(); err != nil { + return "", fmt.Errorf("failed to get resource principal security token: %s", err.Error()) + } + return fmt.Sprintf("ST$%s", securityToken), nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) TenancyOCID() (string, error) { + return r.keyProvider.resourcePrincipalClient.leafResourcePrincipalKeyProvider.TenancyOCID() +} + +func (r *resourcePrincipalV30ConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) Region() (string, error) { + if r.region == nil { + common.Debugf("Region in resource principal configuration provider v30 is nil.") + return "", nil + } + return string(*r.region), nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) AuthType() (common.AuthConfig, error) { + return common.AuthConfig{common.UnknownAuthenticationType, false, nil}, + fmt.Errorf("unsupported, keep the interface") +} + +func (r *resourcePrincipalV30ConfigurationProvider) GetClaim(key string) (interface{}, error) { + //TODO implement me + panic("implement me") +} + +type resourcePrincipalV30ConfiguratorBuilder struct { + leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess + rptUrlForParent, rpstUrlForParent *string +} + +// ResourcePrincipalV3ConfiguratorBuilder creates a new resourcePrincipalV30ConfiguratorBuilder. +func ResourcePrincipalV3ConfiguratorBuilder(leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess) *resourcePrincipalV30ConfiguratorBuilder { + return &resourcePrincipalV30ConfiguratorBuilder{ + leafResourcePrincipalKeyProvider: leafResourcePrincipalKeyProvider, + } +} + +// WithParentRPTURL sets the rptUrlForParent field. +func (b *resourcePrincipalV30ConfiguratorBuilder) WithParentRPTURL(rptUrlForParent string) *resourcePrincipalV30ConfiguratorBuilder { + b.rptUrlForParent = &rptUrlForParent + return b +} + +// WithParentRPSTURL sets the rpstUrlForParent field. +func (b *resourcePrincipalV30ConfiguratorBuilder) WithParentRPSTURL(rpstUrlForParent string) *resourcePrincipalV30ConfiguratorBuilder { + b.rpstUrlForParent = &rpstUrlForParent + return b +} + +// Build creates a ConfigurationProviderWithClaimAccess based on the configured values. +func (b *resourcePrincipalV30ConfiguratorBuilder) Build() (ConfigurationProviderWithClaimAccess, error) { + + if b.rptUrlForParent == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", + ResourcePrincipalRptURLForParent) + return nil, resourcePrincipalError{err: err} + } + + if b.rpstUrlForParent == nil { + common.Debugf("Environment variable %s not present, setting to empty string", ResourcePrincipalRpstEndpointForParent) + *b.rpstUrlForParent = "" + } + + rpFedClient := resourcePrincipalV3Client{} + rpFedClient.rptUrl = *b.rptUrlForParent + rpFedClient.rpstUrl = *b.rpstUrlForParent + rpFedClient.sessionKeySupplier = newSessionKeySupplier() + rpFedClient.leafResourcePrincipalKeyProvider = b.leafResourcePrincipalKeyProvider + region, _ := b.leafResourcePrincipalKeyProvider.Region() + + return &resourcePrincipalV30ConfigurationProvider{ + keyProvider: resourcePrincipalKeyProviderV3{rpFedClient}, + region: (*common.Region)(®ion), + }, nil +} + +// ResourcePrincipalConfigurationProviderV3 ResourcePrincipalConfigurationProvider is a function that creates and configures a resource principal. +func ResourcePrincipalConfigurationProviderV3(leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess) (ConfigurationProviderWithClaimAccess, error) { + builder := ResourcePrincipalV3ConfiguratorBuilder(leafResourcePrincipalKeyProvider) + builder.rptUrlForParent = requireEnv(ResourcePrincipalRptURLForParent) + builder.rpstUrlForParent = requireEnv(ResourcePrincipalRpstEndpointForParent) + return builder.Build() +} diff --git a/common/auth/resource_principals_v3_test.go b/common/auth/resource_principals_v3_test.go new file mode 100644 index 0000000000..a81bafc6ab --- /dev/null +++ b/common/auth/resource_principals_v3_test.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. + +package auth + +import ( + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "fmt" + "net/http" + "net/http/httptest" + "testing" + + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/stretchr/testify/assert" +) + +var ( + test_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJrdWJlcm5ldGVzLmRlZmF1bHQiLCJleHAiOjQ4NDEwMTAwNTQsImlhdCI6MTY4NzQxMDA1NCwiaXNzIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Om15LW5hbWVzcGFjZTpteS1zYSIsInN1YiI6dHJ1ZSwicmVzX3RlbmFudCI6InJhbmRvbSJ9._YXkRQbCxdnFfXYYHbLpi6lryxpHPXqGTxWhDTeB0_g" + rptUrlForParent = "https://sample.test/101010/resource/resourceId/actions/rptUrl" + rpstLeaf = "eyJraWQiOiJhc3ciLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJvY2lkMS5kYXRhd2FyZWhvdXNlLmN1c3RvbWVyLWJpZy1kYi0xIiwiaXNzIjoiYXV0aFNlcnZpY2Uub3JhY2xlLmNvbSIsInJlc190ZW5hbnQiOiJjdXN0b21lci10ZW5hbnQtMSIsInB0eXBlIjoicmVzb3VyY2UiLCJyZXNfdHlwZSI6ImRhdGF3YXJlaG91c2UiLCJhdWQiOiJvY2kiLCJvcGMtdGFnIjoiVjEsb2NpZDEuZHluYW1pY2dyb3VwLmRldi4uYWFhYWFhYWEsb28ycHA2M3Y3NTMyNXpiNnJuNHYzYWgzYnRlam5ubTJvdDN1NWJyZnd1Y2VvczRpZDZ0YSIsIm9wYy1idW1wIjoiSDRzSUFBQUFBQUFBQUUyUHpRcUNRQlNGTTExTVJSQXRLbHBHYlFRSE1sSm8xVVAwQXVQTWJSeHJISnVmMHA0LUF4SFA5bjczTzV6bFRWSEJqcGcxSlpHQ2NxMWNoUm04TVNaZDVGM3cwMHZGejhaQnduaVpTZjA0eDBWaThuZGVrSlJMY0o4NnF3cWFmRTJkMGx3bE5RbFQ1Qy04N1ZxRFVVNVR3RlRKaW1ncm9iUllzTjJLT21PVkJCME5EdEh4T2dvbktGaE1ROThiLS1FZWpWdkh2SGZZcG9MZG5CRkxQa1JEcnB5Qjl1R0N2SmFhOVZSclAzU1RoaVR1R3pQQkk1Yjl5LUlBZVp2Z0IxX2paUVFDQVFBQSIsInR0eXBlIjoicmVzIiwicmVzX2lkIjoib2NpZDEuZGF0YXdhcmVob3VzZS5jdXN0b21lci1iaWctZGItMSIsIm9wYy1pbnN0YW5jZSI6Im9jaWQxLmluc3RhbmNlLmpveWZ1bC5kYm5vZGUuMSIsInJlc190YWciOiIiLCJyZXNfY29tcGFydG1lbnQiOiJjdXN0b21lci1jb21wYXJ0bWVudC0xIiwiZXhwIjoxNTUyNjgxMTY4LCJvcGMtY29tcGFydG1lbnQiOiJkYmFhcy1jb21wYXJ0bWVudC0xIiwiaWF0IjoxNTUyNjc5OTY4LCJqdGkiOiIzZDQxNDNlOC01ZTMyLTRlMTItYTM4Yy01OTc0NjUwMTA3MDMiLCJ0ZW5hbnQiOiJjdXN0b21lci10ZW5hbnQtMSIsImp3ayI6IntcImtpZFwiOlwiY3VzdG9tZXItZGJub2RlLTFcIixcIm5cIjpcImxzLUFDNGhpS0stMTFVdTFEZ3VLTFE1VGFhZGpNR1hCcDRhMFVFS2w0dnJjcmF3b2V6X3BuUS1pNS1nNV9XTU5xVXdrdUtBcXVTZnlVS25yZEhhV3d4b2RWcmRleTk1T3R4ckIySzNRdzgzaURkcUltSkhfWFp1cERfRHR0SzduS3N6Qy01TFI1Ums3SHF5Y094eEZVNzBNcGduQW9IaVNUM2V0VjJVZlJkNXRtb0dOaTdOSURORWJnSVpmcnczYUVYbHBzaGM2ckpVdUEyOG55ZUNjOVFtOHllMHUwN0UzamlCYmp5RjNFVWhTelNxblFsUlVNVEdaR1ZSZGpfRG9tcEhUVkFPNEJqUnVIZURWWGtWNjh1TzNrSEdTZUVPc2xsZmJZTkpaYUtCQTB3aUxrZkViWVBEWDFwbTM4UFAzcnJFbWhxeElObzdoYVFWakRXRDNKUVwiLFwiZVwiOlwiQVFBQlwiLFwia3R5XCI6XCJSU0FcIixcImFsZ1wiOlwiUlMyNTZcIixcInVzZVwiOlwic2lnXCJ9Iiwib3BjLXRlbmFudCI6ImRiYWFzLXRlbmFudCJ9.LqRt9JXSdcLahdwACjw_p_KHQhKde-NaVZG3zMjzWX6bVad-SRZYWKQSlk6Tq4f1ZNN0uxlP-d2snQAp3Kw-cQRrdCDOmD_0CDgR-yre-YbJDsJbEncczUIbe-ASeq_Sh9zDROVuD_7NdrmUCiVH2g-UYpYkuKKqu_tVjL2uy77W5_DGobPArEFvZ2GnyHT7gVVv12RnINtgr2jJULhegPBfvnp9-fhhZ7_PcsJ7Z5FkPzLtLOwEm3Lbm3veyUVUviu1CSjXnK67KzjS18TVGi723bkxYBf9lYDHfaXh9EEHzPtxeLAl3VrGjwZUv_ih0FRmoM7wgq8HMRjNACMo6g" +) + +var envVarsrpt3 = map[string]string{ + ResourcePrincipalRptURLForParent: rptUrlForParent, + ResourcePrincipalRpstEndpointForParent: "https://identity/101010/v1/rpstEndpoint", + ResourcePrincipalVersionEnvVar: "3.0", + ResourcePrincipalVersionForLeaf: "2.2", + ResourcePrincipalRpstForLeaf: rpstLeaf, +} + +func TestNewResourcePrinicipalV3ConfigurationProviderLeaf(t *testing.T) { + + mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + w.Write([]byte(fmt.Sprintf(`{"fake": "data","resourcePrincipalToken": "%s","servicePrincipalSessionToken": "%s","token":"%s"}`, test_token, test_token, test_token))) + })) + defer mockServer.Close() + + unsetAllVars() + + setupResourcePrincipalsEnvsWithValues(envVarsrpt3) + + t.Setenv(ResourcePrincipalRptURLForParent, mockServer.URL) + t.Setenv(ResourcePrincipalRpstEndpointForParent, mockServer.URL) + + leafResourcePrincipalKeyProvider := &fakeConfigProviderWithClaimAccess{} + + provider, err := ResourcePrincipalConfigurationProviderV3(leafResourcePrincipalKeyProvider) + + assert.NoError(t, err) + + assert.NotNil(t, provider) + + valid, err := common.IsConfigurationProviderValid(provider) + assert.NoError(t, err) + assert.True(t, valid) + +} + +func TestNewResourcePrinicipalV3ConfigurationProviderWithDepth(t *testing.T) { + serverCalls := 0 + + //mock server providing rpt + mockParentServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, serverCalls, 2) + serverCalls += 1 + w.WriteHeader(http.StatusOK) + w.Write([]byte(fmt.Sprintf(`{"fake": "data","resourcePrincipalToken": "%s","servicePrincipalSessionToken": "%s"}`, test_token, test_token))) + })) + defer mockParentServer.Close() + + //mock server to get parent rpt url + mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, serverCalls, 0) + serverCalls += 1 + w.Header().Set("opc-parent-rpt-url", mockParentServer.URL) + w.WriteHeader(http.StatusOK) + w.Write([]byte(fmt.Sprintf(`{"fake": "data","resourcePrincipalToken": "%s","servicePrincipalSessionToken": "%s"}`, test_token, test_token))) + })) + defer mockServer.Close() + + // exchange server to exchange rpt for rpst + mockExchangeServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + serverCalls += 1 + w.WriteHeader(http.StatusOK) + w.Write([]byte(fmt.Sprintf(`{"fake": "data","token":"%s"}`, test_token))) + })) + defer mockExchangeServer.Close() + + unsetAllVars() + + setupResourcePrincipalsEnvsWithValues(envVarsrpt3) + + t.Setenv(ResourcePrincipalRptURLForParent, mockServer.URL) + t.Setenv(ResourcePrincipalRpstEndpointForParent, mockExchangeServer.URL) + + leafResourcePrincipalKeyProvider := &fakeConfigProviderWithClaimAccess{} + + provider, err := ResourcePrincipalConfigurationProviderV3(leafResourcePrincipalKeyProvider) + + assert.NoError(t, err) + + assert.NotNil(t, provider) + + valid, err := common.IsConfigurationProviderValid(provider) + assert.NoError(t, err) + assert.True(t, valid) + + assert.Equal(t, 4, serverCalls) + +} + +type fakeConfigProviderWithClaimAccess struct { +} + +func (f *fakeConfigProviderWithClaimAccess) AuthType() (common.AuthConfig, error) { + return common.AuthConfig{}, nil +} + +func (f *fakeConfigProviderWithClaimAccess) GetClaim(key string) (interface{}, error) { + return test_token, nil +} + +func (f *fakeConfigProviderWithClaimAccess) KeyFingerprint() (string, error) { + return "fingerprint", nil +} + +func (f *fakeConfigProviderWithClaimAccess) KeyID() (string, error) { + return "keyId", nil +} + +func (f *fakeConfigProviderWithClaimAccess) PrivateRSAKey() (*rsa.PrivateKey, error) { + block, _ := pem.Decode([]byte(testPrivateKey)) + key, _ := x509.ParsePKCS1PrivateKey(block.Bytes) + return key, nil +} + +func (f *fakeConfigProviderWithClaimAccess) Region() (string, error) { + return "region", nil +} + +func (f *fakeConfigProviderWithClaimAccess) TenancyOCID() (string, error) { + return "tenancy", nil +} + +func (f *fakeConfigProviderWithClaimAccess) UserOCID() (string, error) { + return "userId", nil +} diff --git a/common/regions.go b/common/regions.go index 769b29fe6e..1220cfac51 100644 --- a/common/regions.go +++ b/common/regions.go @@ -82,6 +82,8 @@ const ( RegionSAValparaiso1 Region = "sa-valparaiso-1" //RegionAPSingapore2 region Singapore RegionAPSingapore2 Region = "ap-singapore-2" + //RegionMERiyadh1 region Riyadh + RegionMERiyadh1 Region = "me-riyadh-1" //RegionUSLangley1 region Langley RegionUSLangley1 Region = "us-langley-1" //RegionUSLuke1 region Luke @@ -174,6 +176,7 @@ var shortNameRegion = map[string]Region{ "bog": RegionSABogota1, "vap": RegionSAValparaiso1, "xsp": RegionAPSingapore2, + "ruh": RegionMERiyadh1, "lfi": RegionUSLangley1, "luf": RegionUSLuke1, "ric": RegionUSGovAshburn1, @@ -259,6 +262,7 @@ var regionRealm = map[Region]string{ RegionSABogota1: "oc1", RegionSAValparaiso1: "oc1", RegionAPSingapore2: "oc1", + RegionMERiyadh1: "oc1", RegionUSLangley1: "oc2", RegionUSLuke1: "oc2", diff --git a/common/regions.json b/common/regions.json index 6f35eff177..849ec05db9 100644 --- a/common/regions.json +++ b/common/regions.json @@ -382,5 +382,11 @@ "realmKey": "oc29", "regionIdentifier": "me-abudhabi-2", "realmDomainComponent": "oraclecloud29.com" + }, + { + "regionKey": "ruh", + "realmKey": "oc1", + "regionIdentifier": "me-riyadh-1", + "realmDomainComponent": "oraclecloud.com" } ] \ No newline at end of file diff --git a/common/version.go b/common/version.go index 4733d32bd4..bea1d76fef 100644 --- a/common/version.go +++ b/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "70" + minor = "71" patch = "0" tag = "" ) diff --git a/devops/approval_activity_summary.go b/devops/approval_activity_summary.go new file mode 100644 index 0000000000..7a26b144f3 --- /dev/null +++ b/devops/approval_activity_summary.go @@ -0,0 +1,130 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalActivitySummary activity describing a reviewer's approval decision +type ApprovalActivitySummary struct { + + // activity identifier + Id *string `mandatory:"true" json:"id"` + + Principal *PrincipalDetails `mandatory:"true" json:"principal"` + + // pullRequest OCID + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // The time the action was performed. An RFC3339 formatted datetime string + TimeOccurred *common.SDKTime `mandatory:"true" json:"timeOccurred"` + + // The approval status of a reviewer + Status ApprovalActivitySummaryStatusEnum `mandatory:"true" json:"status"` +} + +// GetId returns Id +func (m ApprovalActivitySummary) GetId() *string { + return m.Id +} + +// GetPrincipal returns Principal +func (m ApprovalActivitySummary) GetPrincipal() *PrincipalDetails { + return m.Principal +} + +// GetPullRequestId returns PullRequestId +func (m ApprovalActivitySummary) GetPullRequestId() *string { + return m.PullRequestId +} + +// GetTimeOccurred returns TimeOccurred +func (m ApprovalActivitySummary) GetTimeOccurred() *common.SDKTime { + return m.TimeOccurred +} + +func (m ApprovalActivitySummary) 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 ApprovalActivitySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApprovalActivitySummaryStatusEnum(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(GetApprovalActivitySummaryStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ApprovalActivitySummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeApprovalActivitySummary ApprovalActivitySummary + s := struct { + DiscriminatorParam string `json:"activityType"` + MarshalTypeApprovalActivitySummary + }{ + "APPROVAL", + (MarshalTypeApprovalActivitySummary)(m), + } + + return json.Marshal(&s) +} + +// ApprovalActivitySummaryStatusEnum Enum with underlying type: string +type ApprovalActivitySummaryStatusEnum string + +// Set of constants representing the allowable values for ApprovalActivitySummaryStatusEnum +const ( + ApprovalActivitySummaryStatusApproved ApprovalActivitySummaryStatusEnum = "APPROVED" + ApprovalActivitySummaryStatusUnapproved ApprovalActivitySummaryStatusEnum = "UNAPPROVED" +) + +var mappingApprovalActivitySummaryStatusEnum = map[string]ApprovalActivitySummaryStatusEnum{ + "APPROVED": ApprovalActivitySummaryStatusApproved, + "UNAPPROVED": ApprovalActivitySummaryStatusUnapproved, +} + +var mappingApprovalActivitySummaryStatusEnumLowerCase = map[string]ApprovalActivitySummaryStatusEnum{ + "approved": ApprovalActivitySummaryStatusApproved, + "unapproved": ApprovalActivitySummaryStatusUnapproved, +} + +// GetApprovalActivitySummaryStatusEnumValues Enumerates the set of values for ApprovalActivitySummaryStatusEnum +func GetApprovalActivitySummaryStatusEnumValues() []ApprovalActivitySummaryStatusEnum { + values := make([]ApprovalActivitySummaryStatusEnum, 0) + for _, v := range mappingApprovalActivitySummaryStatusEnum { + values = append(values, v) + } + return values +} + +// GetApprovalActivitySummaryStatusEnumStringValues Enumerates the set of values in String for ApprovalActivitySummaryStatusEnum +func GetApprovalActivitySummaryStatusEnumStringValues() []string { + return []string{ + "APPROVED", + "UNAPPROVED", + } +} + +// GetMappingApprovalActivitySummaryStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalActivitySummaryStatusEnum(val string) (ApprovalActivitySummaryStatusEnum, bool) { + enum, ok := mappingApprovalActivitySummaryStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/approval_rule.go b/devops/approval_rule.go new file mode 100644 index 0000000000..05007c6b04 --- /dev/null +++ b/devops/approval_rule.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalRule A rule which must be satisfied for matching pull requests before the pull request can be merged +type ApprovalRule struct { + + // Name which is used to uniquely identify an approval rule. + Name *string `mandatory:"true" json:"name"` + + // Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + MinApprovalsCount *int `mandatory:"true" json:"minApprovalsCount"` + + // Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + DestinationBranch *string `mandatory:"false" json:"destinationBranch"` + + // List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + Reviewers []PrincipalDetails `mandatory:"false" json:"reviewers"` +} + +func (m ApprovalRule) 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 ApprovalRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/approval_rule_collection.go b/devops/approval_rule_collection.go new file mode 100644 index 0000000000..e435ed125b --- /dev/null +++ b/devops/approval_rule_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalRuleCollection List of approval rules which must be statisfied before pull requests which match the rules can be merged +type ApprovalRuleCollection struct { + + // List of approval rules. + Items []ApprovalRule `mandatory:"true" json:"items"` +} + +func (m ApprovalRuleCollection) 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 ApprovalRuleCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/approval_rule_merge_check.go b/devops/approval_rule_merge_check.go new file mode 100644 index 0000000000..0ede3ca983 --- /dev/null +++ b/devops/approval_rule_merge_check.go @@ -0,0 +1,159 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalRuleMergeCheck The status of the approval rules. +type ApprovalRuleMergeCheck struct { + + // The name of the rule. + RuleName *string `mandatory:"false" json:"ruleName"` + + // The number of total approvals needed. + TotalApprovalCount *int `mandatory:"false" json:"totalApprovalCount"` + + // The current number of approvals. + CurrentApprovalCount *int `mandatory:"false" json:"currentApprovalCount"` + + // The list of default reviewers. + Reviewers []PrincipalDetails `mandatory:"false" json:"reviewers"` + + // The status of the approval rule. + Status ApprovalRuleMergeCheckStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The level of rule. + Level ApprovalRuleMergeCheckLevelEnum `mandatory:"false" json:"level,omitempty"` +} + +func (m ApprovalRuleMergeCheck) 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 ApprovalRuleMergeCheck) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApprovalRuleMergeCheckStatusEnum(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(GetApprovalRuleMergeCheckStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingApprovalRuleMergeCheckLevelEnum(string(m.Level)); !ok && m.Level != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Level: %s. Supported values are: %s.", m.Level, strings.Join(GetApprovalRuleMergeCheckLevelEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ApprovalRuleMergeCheck) MarshalJSON() (buff []byte, e error) { + type MarshalTypeApprovalRuleMergeCheck ApprovalRuleMergeCheck + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeApprovalRuleMergeCheck + }{ + "APPROVAL_RULE", + (MarshalTypeApprovalRuleMergeCheck)(m), + } + + return json.Marshal(&s) +} + +// ApprovalRuleMergeCheckStatusEnum Enum with underlying type: string +type ApprovalRuleMergeCheckStatusEnum string + +// Set of constants representing the allowable values for ApprovalRuleMergeCheckStatusEnum +const ( + ApprovalRuleMergeCheckStatusNeedsApproval ApprovalRuleMergeCheckStatusEnum = "NEEDS_APPROVAL" + ApprovalRuleMergeCheckStatusSucceeded ApprovalRuleMergeCheckStatusEnum = "SUCCEEDED" +) + +var mappingApprovalRuleMergeCheckStatusEnum = map[string]ApprovalRuleMergeCheckStatusEnum{ + "NEEDS_APPROVAL": ApprovalRuleMergeCheckStatusNeedsApproval, + "SUCCEEDED": ApprovalRuleMergeCheckStatusSucceeded, +} + +var mappingApprovalRuleMergeCheckStatusEnumLowerCase = map[string]ApprovalRuleMergeCheckStatusEnum{ + "needs_approval": ApprovalRuleMergeCheckStatusNeedsApproval, + "succeeded": ApprovalRuleMergeCheckStatusSucceeded, +} + +// GetApprovalRuleMergeCheckStatusEnumValues Enumerates the set of values for ApprovalRuleMergeCheckStatusEnum +func GetApprovalRuleMergeCheckStatusEnumValues() []ApprovalRuleMergeCheckStatusEnum { + values := make([]ApprovalRuleMergeCheckStatusEnum, 0) + for _, v := range mappingApprovalRuleMergeCheckStatusEnum { + values = append(values, v) + } + return values +} + +// GetApprovalRuleMergeCheckStatusEnumStringValues Enumerates the set of values in String for ApprovalRuleMergeCheckStatusEnum +func GetApprovalRuleMergeCheckStatusEnumStringValues() []string { + return []string{ + "NEEDS_APPROVAL", + "SUCCEEDED", + } +} + +// GetMappingApprovalRuleMergeCheckStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalRuleMergeCheckStatusEnum(val string) (ApprovalRuleMergeCheckStatusEnum, bool) { + enum, ok := mappingApprovalRuleMergeCheckStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ApprovalRuleMergeCheckLevelEnum Enum with underlying type: string +type ApprovalRuleMergeCheckLevelEnum string + +// Set of constants representing the allowable values for ApprovalRuleMergeCheckLevelEnum +const ( + ApprovalRuleMergeCheckLevelProject ApprovalRuleMergeCheckLevelEnum = "PROJECT" + ApprovalRuleMergeCheckLevelRepository ApprovalRuleMergeCheckLevelEnum = "REPOSITORY" +) + +var mappingApprovalRuleMergeCheckLevelEnum = map[string]ApprovalRuleMergeCheckLevelEnum{ + "PROJECT": ApprovalRuleMergeCheckLevelProject, + "REPOSITORY": ApprovalRuleMergeCheckLevelRepository, +} + +var mappingApprovalRuleMergeCheckLevelEnumLowerCase = map[string]ApprovalRuleMergeCheckLevelEnum{ + "project": ApprovalRuleMergeCheckLevelProject, + "repository": ApprovalRuleMergeCheckLevelRepository, +} + +// GetApprovalRuleMergeCheckLevelEnumValues Enumerates the set of values for ApprovalRuleMergeCheckLevelEnum +func GetApprovalRuleMergeCheckLevelEnumValues() []ApprovalRuleMergeCheckLevelEnum { + values := make([]ApprovalRuleMergeCheckLevelEnum, 0) + for _, v := range mappingApprovalRuleMergeCheckLevelEnum { + values = append(values, v) + } + return values +} + +// GetApprovalRuleMergeCheckLevelEnumStringValues Enumerates the set of values in String for ApprovalRuleMergeCheckLevelEnum +func GetApprovalRuleMergeCheckLevelEnumStringValues() []string { + return []string{ + "PROJECT", + "REPOSITORY", + } +} + +// GetMappingApprovalRuleMergeCheckLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalRuleMergeCheckLevelEnum(val string) (ApprovalRuleMergeCheckLevelEnum, bool) { + enum, ok := mappingApprovalRuleMergeCheckLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/build_merge_check.go b/devops/build_merge_check.go new file mode 100644 index 0000000000..30e52acbff --- /dev/null +++ b/devops/build_merge_check.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BuildMergeCheck The status of the build pipelines. +type BuildMergeCheck struct { + + // The pipeline OCID. + PipelineId *string `mandatory:"false" json:"pipelineId"` + + // The build run OCID. + BuildRunId *string `mandatory:"false" json:"buildRunId"` + + // The status of the build. + BuildStatus *string `mandatory:"false" json:"buildStatus"` +} + +func (m BuildMergeCheck) 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 BuildMergeCheck) 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 BuildMergeCheck) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBuildMergeCheck BuildMergeCheck + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeBuildMergeCheck + }{ + "BUILD", + (MarshalTypeBuildMergeCheck)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/build_run_snapshot.go b/devops/build_run_snapshot.go new file mode 100644 index 0000000000..2eeacf52e5 --- /dev/null +++ b/devops/build_run_snapshot.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BuildRunSnapshot Snapshot of a build run. Contains information including pipelineId, commitId. +type BuildRunSnapshot struct { + + // The OCID of the build pipeline where the build was triggered. + BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` + + // The commit id which the build was triggered from. + CommitId *string `mandatory:"true" json:"commitId"` + + // The OCID of the build run. + BuildRunId *string `mandatory:"true" json:"buildRunId"` + + // The current status of the build run. + LifecycleState BuildRunSnapshotLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A message describing the current state in more detail. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The display name of the build run. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The time the build run was created. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time the build run was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` +} + +func (m BuildRunSnapshot) 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 BuildRunSnapshot) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBuildRunSnapshotLifecycleStateEnum(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(GetBuildRunSnapshotLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BuildRunSnapshotLifecycleStateEnum Enum with underlying type: string +type BuildRunSnapshotLifecycleStateEnum string + +// Set of constants representing the allowable values for BuildRunSnapshotLifecycleStateEnum +const ( + BuildRunSnapshotLifecycleStateAccepted BuildRunSnapshotLifecycleStateEnum = "ACCEPTED" + BuildRunSnapshotLifecycleStateInProgress BuildRunSnapshotLifecycleStateEnum = "IN_PROGRESS" + BuildRunSnapshotLifecycleStateFailed BuildRunSnapshotLifecycleStateEnum = "FAILED" + BuildRunSnapshotLifecycleStateSucceeded BuildRunSnapshotLifecycleStateEnum = "SUCCEEDED" + BuildRunSnapshotLifecycleStateCanceling BuildRunSnapshotLifecycleStateEnum = "CANCELING" + BuildRunSnapshotLifecycleStateCanceled BuildRunSnapshotLifecycleStateEnum = "CANCELED" +) + +var mappingBuildRunSnapshotLifecycleStateEnum = map[string]BuildRunSnapshotLifecycleStateEnum{ + "ACCEPTED": BuildRunSnapshotLifecycleStateAccepted, + "IN_PROGRESS": BuildRunSnapshotLifecycleStateInProgress, + "FAILED": BuildRunSnapshotLifecycleStateFailed, + "SUCCEEDED": BuildRunSnapshotLifecycleStateSucceeded, + "CANCELING": BuildRunSnapshotLifecycleStateCanceling, + "CANCELED": BuildRunSnapshotLifecycleStateCanceled, +} + +var mappingBuildRunSnapshotLifecycleStateEnumLowerCase = map[string]BuildRunSnapshotLifecycleStateEnum{ + "accepted": BuildRunSnapshotLifecycleStateAccepted, + "in_progress": BuildRunSnapshotLifecycleStateInProgress, + "failed": BuildRunSnapshotLifecycleStateFailed, + "succeeded": BuildRunSnapshotLifecycleStateSucceeded, + "canceling": BuildRunSnapshotLifecycleStateCanceling, + "canceled": BuildRunSnapshotLifecycleStateCanceled, +} + +// GetBuildRunSnapshotLifecycleStateEnumValues Enumerates the set of values for BuildRunSnapshotLifecycleStateEnum +func GetBuildRunSnapshotLifecycleStateEnumValues() []BuildRunSnapshotLifecycleStateEnum { + values := make([]BuildRunSnapshotLifecycleStateEnum, 0) + for _, v := range mappingBuildRunSnapshotLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetBuildRunSnapshotLifecycleStateEnumStringValues Enumerates the set of values in String for BuildRunSnapshotLifecycleStateEnum +func GetBuildRunSnapshotLifecycleStateEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingBuildRunSnapshotLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBuildRunSnapshotLifecycleStateEnum(val string) (BuildRunSnapshotLifecycleStateEnum, bool) { + enum, ok := mappingBuildRunSnapshotLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/build_run_snapshot_collection.go b/devops/build_run_snapshot_collection.go new file mode 100644 index 0000000000..ad99f7b2c7 --- /dev/null +++ b/devops/build_run_snapshot_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BuildRunSnapshotCollection Results of a build run search. Contains build run summary items. +type BuildRunSnapshotCollection struct { + + // List of build runs. + Items []BuildRunSnapshotSummary `mandatory:"true" json:"items"` +} + +func (m BuildRunSnapshotCollection) 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 BuildRunSnapshotCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/build_run_snapshot_summary.go b/devops/build_run_snapshot_summary.go new file mode 100644 index 0000000000..3ef0db5829 --- /dev/null +++ b/devops/build_run_snapshot_summary.go @@ -0,0 +1,63 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BuildRunSnapshotSummary Summary of a single build run snapshot. Contains information including pipelineId, commitId. +type BuildRunSnapshotSummary struct { + + // The OCID of the build pipeline where the build was triggered. + BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` + + // The commit id which the build was triggered from. + CommitId *string `mandatory:"true" json:"commitId"` + + // The OCID of the build run. + BuildRunId *string `mandatory:"true" json:"buildRunId"` + + // The current status of the build run. + LifecycleState BuildRunSnapshotLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A message describing the current state in more detail. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The display name of the build run. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The time the build run was created. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time the build run was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` +} + +func (m BuildRunSnapshotSummary) 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 BuildRunSnapshotSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBuildRunSnapshotLifecycleStateEnum(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(GetBuildRunSnapshotLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/comment_activity_summary.go b/devops/comment_activity_summary.go new file mode 100644 index 0000000000..0d4d924e1c --- /dev/null +++ b/devops/comment_activity_summary.go @@ -0,0 +1,85 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CommentActivitySummary activity describing comment addition to a pull request +type CommentActivitySummary struct { + + // activity identifier + Id *string `mandatory:"true" json:"id"` + + Principal *PrincipalDetails `mandatory:"true" json:"principal"` + + // pullRequest OCID + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // The time the action was performed. An RFC3339 formatted datetime string + TimeOccurred *common.SDKTime `mandatory:"true" json:"timeOccurred"` + + // Identifier of comment added to a PR + CommentId *string `mandatory:"true" json:"commentId"` +} + +// GetId returns Id +func (m CommentActivitySummary) GetId() *string { + return m.Id +} + +// GetPrincipal returns Principal +func (m CommentActivitySummary) GetPrincipal() *PrincipalDetails { + return m.Principal +} + +// GetPullRequestId returns PullRequestId +func (m CommentActivitySummary) GetPullRequestId() *string { + return m.PullRequestId +} + +// GetTimeOccurred returns TimeOccurred +func (m CommentActivitySummary) GetTimeOccurred() *common.SDKTime { + return m.TimeOccurred +} + +func (m CommentActivitySummary) 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 CommentActivitySummary) 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 CommentActivitySummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCommentActivitySummary CommentActivitySummary + s := struct { + DiscriminatorParam string `json:"activityType"` + MarshalTypeCommentActivitySummary + }{ + "COMMENT", + (MarshalTypeCommentActivitySummary)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/commit_activity_summary.go b/devops/commit_activity_summary.go new file mode 100644 index 0000000000..bf2bbaeda0 --- /dev/null +++ b/devops/commit_activity_summary.go @@ -0,0 +1,88 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CommitActivitySummary activity describing commit updates to a pull request +type CommitActivitySummary struct { + + // activity identifier + Id *string `mandatory:"true" json:"id"` + + Principal *PrincipalDetails `mandatory:"true" json:"principal"` + + // pullRequest OCID + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // The time the action was performed. An RFC3339 formatted datetime string + TimeOccurred *common.SDKTime `mandatory:"true" json:"timeOccurred"` + + // list of commits added to a PR source branch after git push + CommitsAdded []RepositoryCommit `mandatory:"true" json:"commitsAdded"` + + // list of commits removed from a PR source branch after git push + CommitsRemoved []RepositoryCommit `mandatory:"true" json:"commitsRemoved"` +} + +// GetId returns Id +func (m CommitActivitySummary) GetId() *string { + return m.Id +} + +// GetPrincipal returns Principal +func (m CommitActivitySummary) GetPrincipal() *PrincipalDetails { + return m.Principal +} + +// GetPullRequestId returns PullRequestId +func (m CommitActivitySummary) GetPullRequestId() *string { + return m.PullRequestId +} + +// GetTimeOccurred returns TimeOccurred +func (m CommitActivitySummary) GetTimeOccurred() *common.SDKTime { + return m.TimeOccurred +} + +func (m CommitActivitySummary) 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 CommitActivitySummary) 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 CommitActivitySummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCommitActivitySummary CommitActivitySummary + s := struct { + DiscriminatorParam string `json:"activityType"` + MarshalTypeCommitActivitySummary + }{ + "COMMIT", + (MarshalTypeCommitActivitySummary)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/commit_analytics_author_collection.go b/devops/commit_analytics_author_collection.go new file mode 100644 index 0000000000..b994eba38f --- /dev/null +++ b/devops/commit_analytics_author_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CommitAnalyticsAuthorCollection Result of listing Commit Analytics authors. +type CommitAnalyticsAuthorCollection struct { + + // List of authors. + Items []CommitAnalyticsAuthorSummary `mandatory:"true" json:"items"` +} + +func (m CommitAnalyticsAuthorCollection) 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 CommitAnalyticsAuthorCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/commit_analytics_author_summary.go b/devops/commit_analytics_author_summary.go new file mode 100644 index 0000000000..9c004eb474 --- /dev/null +++ b/devops/commit_analytics_author_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CommitAnalyticsAuthorSummary Object containing summary of Commit Analytics author. +type CommitAnalyticsAuthorSummary struct { + + // Author name. + AuthorName *string `mandatory:"true" json:"authorName"` + + // Author email. + AuthorEmail *string `mandatory:"true" json:"authorEmail"` +} + +func (m CommitAnalyticsAuthorSummary) 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 CommitAnalyticsAuthorSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/conflict_merge_check.go b/devops/conflict_merge_check.go new file mode 100644 index 0000000000..d153e18739 --- /dev/null +++ b/devops/conflict_merge_check.go @@ -0,0 +1,99 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConflictMergeCheck The status of the merge conflict. +type ConflictMergeCheck struct { + + // The status of the conflict. + Status ConflictMergeCheckStatusEnum `mandatory:"false" json:"status,omitempty"` +} + +func (m ConflictMergeCheck) 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 ConflictMergeCheck) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingConflictMergeCheckStatusEnum(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(GetConflictMergeCheckStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ConflictMergeCheck) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConflictMergeCheck ConflictMergeCheck + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeConflictMergeCheck + }{ + "CONFLICT", + (MarshalTypeConflictMergeCheck)(m), + } + + return json.Marshal(&s) +} + +// ConflictMergeCheckStatusEnum Enum with underlying type: string +type ConflictMergeCheckStatusEnum string + +// Set of constants representing the allowable values for ConflictMergeCheckStatusEnum +const ( + ConflictMergeCheckStatusSucceeded ConflictMergeCheckStatusEnum = "SUCCEEDED" + ConflictMergeCheckStatusFailed ConflictMergeCheckStatusEnum = "FAILED" +) + +var mappingConflictMergeCheckStatusEnum = map[string]ConflictMergeCheckStatusEnum{ + "SUCCEEDED": ConflictMergeCheckStatusSucceeded, + "FAILED": ConflictMergeCheckStatusFailed, +} + +var mappingConflictMergeCheckStatusEnumLowerCase = map[string]ConflictMergeCheckStatusEnum{ + "succeeded": ConflictMergeCheckStatusSucceeded, + "failed": ConflictMergeCheckStatusFailed, +} + +// GetConflictMergeCheckStatusEnumValues Enumerates the set of values for ConflictMergeCheckStatusEnum +func GetConflictMergeCheckStatusEnumValues() []ConflictMergeCheckStatusEnum { + values := make([]ConflictMergeCheckStatusEnum, 0) + for _, v := range mappingConflictMergeCheckStatusEnum { + values = append(values, v) + } + return values +} + +// GetConflictMergeCheckStatusEnumStringValues Enumerates the set of values in String for ConflictMergeCheckStatusEnum +func GetConflictMergeCheckStatusEnumStringValues() []string { + return []string{ + "SUCCEEDED", + "FAILED", + } +} + +// GetMappingConflictMergeCheckStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConflictMergeCheckStatusEnum(val string) (ConflictMergeCheckStatusEnum, bool) { + enum, ok := mappingConflictMergeCheckStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/create_or_update_git_branch_details.go b/devops/create_or_update_git_branch_details.go new file mode 100644 index 0000000000..a889861e65 --- /dev/null +++ b/devops/create_or_update_git_branch_details.go @@ -0,0 +1,62 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOrUpdateGitBranchDetails The information needed to create a branch. +type CreateOrUpdateGitBranchDetails struct { + + // The name of the reference to create or update. + RefName *string `mandatory:"true" json:"refName"` + + // Commit ID pointed to by the new branch. + CommitId *string `mandatory:"true" json:"commitId"` +} + +// GetRefName returns RefName +func (m CreateOrUpdateGitBranchDetails) GetRefName() *string { + return m.RefName +} + +func (m CreateOrUpdateGitBranchDetails) 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 CreateOrUpdateGitBranchDetails) 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 CreateOrUpdateGitBranchDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateOrUpdateGitBranchDetails CreateOrUpdateGitBranchDetails + s := struct { + DiscriminatorParam string `json:"refType"` + MarshalTypeCreateOrUpdateGitBranchDetails + }{ + "BRANCH", + (MarshalTypeCreateOrUpdateGitBranchDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/create_or_update_git_ref_details.go b/devops/create_or_update_git_ref_details.go new file mode 100644 index 0000000000..28b7386cee --- /dev/null +++ b/devops/create_or_update_git_ref_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOrUpdateGitRefDetails The information needed to create a reference. If the reference already exists, then it can be used to update the reference. +type CreateOrUpdateGitRefDetails interface { + + // The name of the reference to create or update. + GetRefName() *string +} + +type createorupdategitrefdetails struct { + JsonData []byte + RefName *string `mandatory:"true" json:"refName"` + RefType string `json:"refType"` +} + +// UnmarshalJSON unmarshals json +func (m *createorupdategitrefdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreateorupdategitrefdetails createorupdategitrefdetails + s := struct { + Model Unmarshalercreateorupdategitrefdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.RefName = s.Model.RefName + m.RefType = s.Model.RefType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createorupdategitrefdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RefType { + case "BRANCH": + mm := CreateOrUpdateGitBranchDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "TAG": + mm := CreateOrUpdateGitTagDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CreateOrUpdateGitRefDetails: %s.", m.RefType) + return *m, nil + } +} + +// GetRefName returns RefName +func (m createorupdategitrefdetails) GetRefName() *string { + return m.RefName +} + +func (m createorupdategitrefdetails) 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 createorupdategitrefdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateOrUpdateGitRefDetailsRefTypeEnum Enum with underlying type: string +type CreateOrUpdateGitRefDetailsRefTypeEnum string + +// Set of constants representing the allowable values for CreateOrUpdateGitRefDetailsRefTypeEnum +const ( + CreateOrUpdateGitRefDetailsRefTypeBranch CreateOrUpdateGitRefDetailsRefTypeEnum = "BRANCH" + CreateOrUpdateGitRefDetailsRefTypeTag CreateOrUpdateGitRefDetailsRefTypeEnum = "TAG" +) + +var mappingCreateOrUpdateGitRefDetailsRefTypeEnum = map[string]CreateOrUpdateGitRefDetailsRefTypeEnum{ + "BRANCH": CreateOrUpdateGitRefDetailsRefTypeBranch, + "TAG": CreateOrUpdateGitRefDetailsRefTypeTag, +} + +var mappingCreateOrUpdateGitRefDetailsRefTypeEnumLowerCase = map[string]CreateOrUpdateGitRefDetailsRefTypeEnum{ + "branch": CreateOrUpdateGitRefDetailsRefTypeBranch, + "tag": CreateOrUpdateGitRefDetailsRefTypeTag, +} + +// GetCreateOrUpdateGitRefDetailsRefTypeEnumValues Enumerates the set of values for CreateOrUpdateGitRefDetailsRefTypeEnum +func GetCreateOrUpdateGitRefDetailsRefTypeEnumValues() []CreateOrUpdateGitRefDetailsRefTypeEnum { + values := make([]CreateOrUpdateGitRefDetailsRefTypeEnum, 0) + for _, v := range mappingCreateOrUpdateGitRefDetailsRefTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateOrUpdateGitRefDetailsRefTypeEnumStringValues Enumerates the set of values in String for CreateOrUpdateGitRefDetailsRefTypeEnum +func GetCreateOrUpdateGitRefDetailsRefTypeEnumStringValues() []string { + return []string{ + "BRANCH", + "TAG", + } +} + +// GetMappingCreateOrUpdateGitRefDetailsRefTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateOrUpdateGitRefDetailsRefTypeEnum(val string) (CreateOrUpdateGitRefDetailsRefTypeEnum, bool) { + enum, ok := mappingCreateOrUpdateGitRefDetailsRefTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/create_or_update_git_ref_request_response.go b/devops/create_or_update_git_ref_request_response.go new file mode 100644 index 0000000000..d93b03c0b5 --- /dev/null +++ b/devops/create_or_update_git_ref_request_response.go @@ -0,0 +1,107 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateOrUpdateGitRefRequest wrapper for the CreateOrUpdateGitRef operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateOrUpdateGitRef.go.html to see an example of how to use CreateOrUpdateGitRefRequest. +type CreateOrUpdateGitRefRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // The information to create a reference with the type specified in the query. + CreateOrUpdateGitRefDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateOrUpdateGitRefRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateOrUpdateGitRefRequest) 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 CreateOrUpdateGitRefRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateOrUpdateGitRefRequest) 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 CreateOrUpdateGitRefRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateOrUpdateGitRefResponse wrapper for the CreateOrUpdateGitRef operation +type CreateOrUpdateGitRefResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RepositoryRef instance + RepositoryRef `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateOrUpdateGitRefResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateOrUpdateGitRefResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/create_or_update_git_tag_details.go b/devops/create_or_update_git_tag_details.go new file mode 100644 index 0000000000..e87eb1ddb3 --- /dev/null +++ b/devops/create_or_update_git_tag_details.go @@ -0,0 +1,62 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOrUpdateGitTagDetails The information needed to create a lightweight tag. +type CreateOrUpdateGitTagDetails struct { + + // The name of the reference to create or update. + RefName *string `mandatory:"true" json:"refName"` + + // SHA-1 hash value of the object pointed to by the tag. + ObjectId *string `mandatory:"true" json:"objectId"` +} + +// GetRefName returns RefName +func (m CreateOrUpdateGitTagDetails) GetRefName() *string { + return m.RefName +} + +func (m CreateOrUpdateGitTagDetails) 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 CreateOrUpdateGitTagDetails) 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 CreateOrUpdateGitTagDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateOrUpdateGitTagDetails CreateOrUpdateGitTagDetails + s := struct { + DiscriminatorParam string `json:"refType"` + MarshalTypeCreateOrUpdateGitTagDetails + }{ + "TAG", + (MarshalTypeCreateOrUpdateGitTagDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/create_or_update_protected_branch_details.go b/devops/create_or_update_protected_branch_details.go new file mode 100644 index 0000000000..5799320ec8 --- /dev/null +++ b/devops/create_or_update_protected_branch_details.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOrUpdateProtectedBranchDetails Information to create a protected branch +type CreateOrUpdateProtectedBranchDetails struct { + + // Name of a branch to protect. + BranchName *string `mandatory:"true" json:"branchName"` + + // Level of protection to add on a branch. + ProtectionLevels []ProtectionLevelEnum `mandatory:"false" json:"protectionLevels,omitempty"` +} + +func (m CreateOrUpdateProtectedBranchDetails) 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 CreateOrUpdateProtectedBranchDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.ProtectionLevels { + if _, ok := GetMappingProtectionLevelEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtectionLevels: %s. Supported values are: %s.", val, strings.Join(GetProtectionLevelEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/create_or_update_protected_branch_request_response.go b/devops/create_or_update_protected_branch_request_response.go new file mode 100644 index 0000000000..1d3fca1d2b --- /dev/null +++ b/devops/create_or_update_protected_branch_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateOrUpdateProtectedBranchRequest wrapper for the CreateOrUpdateProtectedBranch operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateOrUpdateProtectedBranch.go.html to see an example of how to use CreateOrUpdateProtectedBranchRequest. +type CreateOrUpdateProtectedBranchRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Details for a protected branch + CreateOrUpdateProtectedBranchDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateOrUpdateProtectedBranchRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateOrUpdateProtectedBranchRequest) 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 CreateOrUpdateProtectedBranchRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateOrUpdateProtectedBranchRequest) 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 CreateOrUpdateProtectedBranchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateOrUpdateProtectedBranchResponse wrapper for the CreateOrUpdateProtectedBranch operation +type CreateOrUpdateProtectedBranchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ProtectedBranch instance + ProtectedBranch `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateOrUpdateProtectedBranchResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateOrUpdateProtectedBranchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/create_pull_request_attachment_request_response.go b/devops/create_pull_request_attachment_request_response.go new file mode 100644 index 0000000000..55ba1fdc5b --- /dev/null +++ b/devops/create_pull_request_attachment_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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// CreatePullRequestAttachmentRequest wrapper for the CreatePullRequestAttachment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreatePullRequestAttachment.go.html to see an example of how to use CreatePullRequestAttachmentRequest. +type CreatePullRequestAttachmentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename if the user requests that the content is saved to a file. + ContentDisposition *string `mandatory:"true" contributesTo:"header" name:"content-disposition"` + + // Uploads the content of the attachment. + CreatePullRequestAttachmentBody io.ReadCloser `mandatory:"true" contributesTo:"body" encoding:"binary"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePullRequestAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePullRequestAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) + if err == nil && binaryRequestBody.Seekable() { + common.UpdateRequestBinaryBody(&httpRequest, binaryRequestBody) + } + return httpRequest, err +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePullRequestAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + rsc := common.NewOCIReadSeekCloser(request.CreatePullRequestAttachmentBody) + if rsc.Seekable() { + return rsc, true + } + return nil, true + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePullRequestAttachmentRequest) 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 CreatePullRequestAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePullRequestAttachmentResponse wrapper for the CreatePullRequestAttachment operation +type CreatePullRequestAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestAttachment instance + PullRequestAttachment `presentIn:"body"` + + // Relative URL of the newly created resource. + ContentLocation *string `presentIn:"header" name:"content-location"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreatePullRequestAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePullRequestAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/create_pull_request_comment_details.go b/devops/create_pull_request_comment_details.go new file mode 100644 index 0000000000..d7002ac08e --- /dev/null +++ b/devops/create_pull_request_comment_details.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePullRequestCommentDetails The information about new Comment. +type CreatePullRequestCommentDetails struct { + + // Content of the Comment. + Data *string `mandatory:"true" json:"data"` + + // ID of parent Comment + ParentId *string `mandatory:"false" json:"parentId"` + + // File path in the commit + FilePath *string `mandatory:"false" json:"filePath"` + + // Commit SHA + CommitId *string `mandatory:"false" json:"commitId"` + + // File path in the target commit + FileType PullRequestCommentFileTypeEnum `mandatory:"false" json:"fileType,omitempty"` + + // Line number in the file + LineNumber *int `mandatory:"false" json:"lineNumber"` +} + +func (m CreatePullRequestCommentDetails) 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 CreatePullRequestCommentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPullRequestCommentFileTypeEnum(string(m.FileType)); !ok && m.FileType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FileType: %s. Supported values are: %s.", m.FileType, strings.Join(GetPullRequestCommentFileTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/create_pull_request_comment_request_response.go b/devops/create_pull_request_comment_request_response.go new file mode 100644 index 0000000000..e10c9b6447 --- /dev/null +++ b/devops/create_pull_request_comment_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePullRequestCommentRequest wrapper for the CreatePullRequestComment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreatePullRequestComment.go.html to see an example of how to use CreatePullRequestCommentRequest. +type CreatePullRequestCommentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Details for the new PullRequest comment. + CreatePullRequestCommentDetails `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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePullRequestCommentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePullRequestCommentRequest) 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 CreatePullRequestCommentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePullRequestCommentRequest) 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 CreatePullRequestCommentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePullRequestCommentResponse wrapper for the CreatePullRequestComment operation +type CreatePullRequestCommentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestComment instance + PullRequestComment `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreatePullRequestCommentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePullRequestCommentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/create_pull_request_details.go b/devops/create_pull_request_details.go new file mode 100644 index 0000000000..ebe01047c9 --- /dev/null +++ b/devops/create_pull_request_details.go @@ -0,0 +1,63 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePullRequestDetails The information about new Pull Request. +type CreatePullRequestDetails struct { + + // Pull Request title + DisplayName *string `mandatory:"true" json:"displayName"` + + // The source branch of the pull request. + SourceBranch *string `mandatory:"true" json:"sourceBranch"` + + // The OCID of the repository. + RepositoryId *string `mandatory:"true" json:"repositoryId"` + + // The destination branch of the pull request. If not provided, default branch will be used as the destination branch. + DestinationBranch *string `mandatory:"false" json:"destinationBranch"` + + // The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + SourceRepositoryId *string `mandatory:"false" json:"sourceRepositoryId"` + + // Details of the pull request. Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Reviewers for this pull request. + Reviewers []CreateReviewerDetails `mandatory:"false" json:"reviewers"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 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. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreatePullRequestDetails) 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 CreatePullRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/create_pull_request_request_response.go b/devops/create_pull_request_request_response.go new file mode 100644 index 0000000000..dd4e6ac593 --- /dev/null +++ b/devops/create_pull_request_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePullRequestRequest wrapper for the CreatePullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreatePullRequest.go.html to see an example of how to use CreatePullRequestRequest. +type CreatePullRequestRequest struct { + + // Details for the new PullRequest. + CreatePullRequestDetails `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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePullRequestRequest) 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 CreatePullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePullRequestRequest) 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 CreatePullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePullRequestResponse wrapper for the CreatePullRequest operation +type CreatePullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // Relative URL of the newly created resource. + ContentLocation *string `presentIn:"header" name:"content-location"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreatePullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/create_repository_details.go b/devops/create_repository_details.go index afe10c9e96..127a8211da 100644 --- a/devops/create_repository_details.go +++ b/devops/create_repository_details.go @@ -27,8 +27,12 @@ type CreateRepositoryDetails struct { // Type of repository. Allowed values: // `MIRRORED` // `HOSTED` + // `FORKED` RepositoryType RepositoryRepositoryTypeEnum `mandatory:"true" json:"repositoryType"` + // The OCID of the parent repository. + ParentRepositoryId *string `mandatory:"false" json:"parentRepositoryId"` + // The default branch of the repository. DefaultBranch *string `mandatory:"false" json:"defaultBranch"` diff --git a/devops/create_reviewer_details.go b/devops/create_reviewer_details.go new file mode 100644 index 0000000000..2858b413da --- /dev/null +++ b/devops/create_reviewer_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateReviewerDetails The reviewer to be created. +type CreateReviewerDetails struct { + + // Pull Request reviewer id + PrincipalId *string `mandatory:"true" json:"principalId"` +} + +func (m CreateReviewerDetails) 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 CreateReviewerDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/decline_pull_request_request_response.go b/devops/decline_pull_request_request_response.go new file mode 100644 index 0000000000..d2a3901483 --- /dev/null +++ b/devops/decline_pull_request_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeclinePullRequestRequest wrapper for the DeclinePullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeclinePullRequest.go.html to see an example of how to use DeclinePullRequestRequest. +type DeclinePullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeclinePullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeclinePullRequestRequest) 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 DeclinePullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeclinePullRequestRequest) 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 DeclinePullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeclinePullRequestResponse wrapper for the DeclinePullRequest operation +type DeclinePullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response DeclinePullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeclinePullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/delete_git_ref_details.go b/devops/delete_git_ref_details.go new file mode 100644 index 0000000000..6153ce8565 --- /dev/null +++ b/devops/delete_git_ref_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeleteGitRefDetails The information needed to delete a reference. +type DeleteGitRefDetails struct { + + // A filter to return only resources that match the given reference name. + RefName *string `mandatory:"true" json:"refName"` +} + +func (m DeleteGitRefDetails) 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 DeleteGitRefDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/delete_git_ref_request_response.go b/devops/delete_git_ref_request_response.go new file mode 100644 index 0000000000..4513be0fe7 --- /dev/null +++ b/devops/delete_git_ref_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteGitRefRequest wrapper for the DeleteGitRef operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteGitRef.go.html to see an example of how to use DeleteGitRefRequest. +type DeleteGitRefRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // The information to delete a reference. + DeleteGitRefDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteGitRefRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteGitRefRequest) 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 DeleteGitRefRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteGitRefRequest) 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 DeleteGitRefRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteGitRefResponse wrapper for the DeleteGitRef operation +type DeleteGitRefResponse struct { + + // The underlying http response + RawResponse *http.Response + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteGitRefResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteGitRefResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/delete_project_repository_settings_request_response.go b/devops/delete_project_repository_settings_request_response.go new file mode 100644 index 0000000000..d0c345c696 --- /dev/null +++ b/devops/delete_project_repository_settings_request_response.go @@ -0,0 +1,92 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteProjectRepositorySettingsRequest wrapper for the DeleteProjectRepositorySettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteProjectRepositorySettings.go.html to see an example of how to use DeleteProjectRepositorySettingsRequest. +type DeleteProjectRepositorySettingsRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteProjectRepositorySettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteProjectRepositorySettingsRequest) 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 DeleteProjectRepositorySettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteProjectRepositorySettingsRequest) 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 DeleteProjectRepositorySettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteProjectRepositorySettingsResponse wrapper for the DeleteProjectRepositorySettings operation +type DeleteProjectRepositorySettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteProjectRepositorySettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteProjectRepositorySettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/delete_protected_branch_details.go b/devops/delete_protected_branch_details.go new file mode 100644 index 0000000000..3f3b46aa75 --- /dev/null +++ b/devops/delete_protected_branch_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeleteProtectedBranchDetails Information to delete a protected branch +type DeleteProtectedBranchDetails struct { + + // Name of a protected branch. + BranchName *string `mandatory:"true" json:"branchName"` +} + +func (m DeleteProtectedBranchDetails) 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 DeleteProtectedBranchDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/delete_protected_branch_request_response.go b/devops/delete_protected_branch_request_response.go new file mode 100644 index 0000000000..601429de67 --- /dev/null +++ b/devops/delete_protected_branch_request_response.go @@ -0,0 +1,95 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteProtectedBranchRequest wrapper for the DeleteProtectedBranch operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteProtectedBranch.go.html to see an example of how to use DeleteProtectedBranchRequest. +type DeleteProtectedBranchRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Details for a protected branch + DeleteProtectedBranchDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteProtectedBranchRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteProtectedBranchRequest) 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 DeleteProtectedBranchRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteProtectedBranchRequest) 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 DeleteProtectedBranchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteProtectedBranchResponse wrapper for the DeleteProtectedBranch operation +type DeleteProtectedBranchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteProtectedBranchResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteProtectedBranchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/delete_pull_request_attachment_request_response.go b/devops/delete_pull_request_attachment_request_response.go new file mode 100644 index 0000000000..2aa01a2551 --- /dev/null +++ b/devops/delete_pull_request_attachment_request_response.go @@ -0,0 +1,92 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePullRequestAttachmentRequest wrapper for the DeletePullRequestAttachment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeletePullRequestAttachment.go.html to see an example of how to use DeletePullRequestAttachmentRequest. +type DeletePullRequestAttachmentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest attachment identifier + AttachmentId *string `mandatory:"true" contributesTo:"path" name:"attachmentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePullRequestAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePullRequestAttachmentRequest) 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 DeletePullRequestAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePullRequestAttachmentRequest) 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 DeletePullRequestAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePullRequestAttachmentResponse wrapper for the DeletePullRequestAttachment operation +type DeletePullRequestAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePullRequestAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePullRequestAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/delete_pull_request_comment_request_response.go b/devops/delete_pull_request_comment_request_response.go new file mode 100644 index 0000000000..2224ed01c3 --- /dev/null +++ b/devops/delete_pull_request_comment_request_response.go @@ -0,0 +1,92 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePullRequestCommentRequest wrapper for the DeletePullRequestComment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeletePullRequestComment.go.html to see an example of how to use DeletePullRequestCommentRequest. +type DeletePullRequestCommentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest Comment identifier + CommentId *string `mandatory:"true" contributesTo:"path" name:"commentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePullRequestCommentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePullRequestCommentRequest) 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 DeletePullRequestCommentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePullRequestCommentRequest) 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 DeletePullRequestCommentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePullRequestCommentResponse wrapper for the DeletePullRequestComment operation +type DeletePullRequestCommentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePullRequestCommentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePullRequestCommentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/delete_pull_request_request_response.go b/devops/delete_pull_request_request_response.go new file mode 100644 index 0000000000..8aa13a114e --- /dev/null +++ b/devops/delete_pull_request_request_response.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. + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePullRequestRequest wrapper for the DeletePullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeletePullRequest.go.html to see an example of how to use DeletePullRequestRequest. +type DeletePullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePullRequestRequest) 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 DeletePullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePullRequestRequest) 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 DeletePullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePullRequestResponse wrapper for the DeletePullRequest operation +type DeletePullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/delete_repository_settings_request_response.go b/devops/delete_repository_settings_request_response.go new file mode 100644 index 0000000000..864cc9c5b3 --- /dev/null +++ b/devops/delete_repository_settings_request_response.go @@ -0,0 +1,92 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteRepositorySettingsRequest wrapper for the DeleteRepositorySettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteRepositorySettings.go.html to see an example of how to use DeleteRepositorySettingsRequest. +type DeleteRepositorySettingsRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRepositorySettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRepositorySettingsRequest) 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 DeleteRepositorySettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRepositorySettingsRequest) 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 DeleteRepositorySettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteRepositorySettingsResponse wrapper for the DeleteRepositorySettings operation +type DeleteRepositorySettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRepositorySettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRepositorySettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/deploy_artifact_source.go b/devops/deploy_artifact_source.go index 351d1a75bc..19981a6a06 100644 --- a/devops/deploy_artifact_source.go +++ b/devops/deploy_artifact_source.go @@ -101,20 +101,23 @@ const ( DeployArtifactSourceDeployArtifactSourceTypeOcir DeployArtifactSourceDeployArtifactSourceTypeEnum = "OCIR" DeployArtifactSourceDeployArtifactSourceTypeGenericArtifact DeployArtifactSourceDeployArtifactSourceTypeEnum = "GENERIC_ARTIFACT" DeployArtifactSourceDeployArtifactSourceTypeHelmChart DeployArtifactSourceDeployArtifactSourceTypeEnum = "HELM_CHART" + DeployArtifactSourceDeployArtifactSourceTypeHelmCommandSpec DeployArtifactSourceDeployArtifactSourceTypeEnum = "HELM_COMMAND_SPEC" ) var mappingDeployArtifactSourceDeployArtifactSourceTypeEnum = map[string]DeployArtifactSourceDeployArtifactSourceTypeEnum{ - "INLINE": DeployArtifactSourceDeployArtifactSourceTypeInline, - "OCIR": DeployArtifactSourceDeployArtifactSourceTypeOcir, - "GENERIC_ARTIFACT": DeployArtifactSourceDeployArtifactSourceTypeGenericArtifact, - "HELM_CHART": DeployArtifactSourceDeployArtifactSourceTypeHelmChart, + "INLINE": DeployArtifactSourceDeployArtifactSourceTypeInline, + "OCIR": DeployArtifactSourceDeployArtifactSourceTypeOcir, + "GENERIC_ARTIFACT": DeployArtifactSourceDeployArtifactSourceTypeGenericArtifact, + "HELM_CHART": DeployArtifactSourceDeployArtifactSourceTypeHelmChart, + "HELM_COMMAND_SPEC": DeployArtifactSourceDeployArtifactSourceTypeHelmCommandSpec, } var mappingDeployArtifactSourceDeployArtifactSourceTypeEnumLowerCase = map[string]DeployArtifactSourceDeployArtifactSourceTypeEnum{ - "inline": DeployArtifactSourceDeployArtifactSourceTypeInline, - "ocir": DeployArtifactSourceDeployArtifactSourceTypeOcir, - "generic_artifact": DeployArtifactSourceDeployArtifactSourceTypeGenericArtifact, - "helm_chart": DeployArtifactSourceDeployArtifactSourceTypeHelmChart, + "inline": DeployArtifactSourceDeployArtifactSourceTypeInline, + "ocir": DeployArtifactSourceDeployArtifactSourceTypeOcir, + "generic_artifact": DeployArtifactSourceDeployArtifactSourceTypeGenericArtifact, + "helm_chart": DeployArtifactSourceDeployArtifactSourceTypeHelmChart, + "helm_command_spec": DeployArtifactSourceDeployArtifactSourceTypeHelmCommandSpec, } // GetDeployArtifactSourceDeployArtifactSourceTypeEnumValues Enumerates the set of values for DeployArtifactSourceDeployArtifactSourceTypeEnum @@ -133,6 +136,7 @@ func GetDeployArtifactSourceDeployArtifactSourceTypeEnumStringValues() []string "OCIR", "GENERIC_ARTIFACT", "HELM_CHART", + "HELM_COMMAND_SPEC", } } diff --git a/devops/devops_client.go b/devops/devops_client.go index 7435ccb82f..b3092b2769 100644 --- a/devops/devops_client.go +++ b/devops/devops_client.go @@ -973,13 +973,13 @@ func (client DevopsClient) createDeployment(ctx context.Context, request common. return response, err } -// CreateProject Creates a new project. +// CreateOrUpdateGitRef Creates a new reference or updates an existing one. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateProject.go.html to see an example of how to use CreateProject API. -// A default retry strategy applies to this operation CreateProject() -func (client DevopsClient) CreateProject(ctx context.Context, request CreateProjectRequest) (response CreateProjectResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateOrUpdateGitRef.go.html to see an example of how to use CreateOrUpdateGitRef API. +// A default retry strategy applies to this operation CreateOrUpdateGitRef() +func (client DevopsClient) CreateOrUpdateGitRef(ctx context.Context, request CreateOrUpdateGitRefRequest) (response CreateOrUpdateGitRefResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -993,56 +993,56 @@ func (client DevopsClient) CreateProject(ctx context.Context, request CreateProj request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createProject, policy) + ociResponse, err = common.Retry(ctx, request, client.createOrUpdateGitRef, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateOrUpdateGitRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateProjectResponse{} + response = CreateOrUpdateGitRefResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateProjectResponse); ok { + if convertedResponse, ok := ociResponse.(CreateOrUpdateGitRefResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateProjectResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateOrUpdateGitRefResponse") } return } -// createProject implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) createProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createOrUpdateGitRef implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createOrUpdateGitRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/projects", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories/{repositoryId}/actions/createOrUpdateGitRef", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateProjectResponse + var response CreateOrUpdateGitRefResponse 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/devops/20210630/Project/CreateProject" - err = common.PostProcessServiceError(err, "Devops", "CreateProject", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/CreateOrUpdateGitRef" + err = common.PostProcessServiceError(err, "Devops", "CreateOrUpdateGitRef", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &repositoryref{}) return response, err } -// CreateRepository Creates a new repository. +// CreateOrUpdateProtectedBranch Creates a restriction on a branch that prevents certain actions on it. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateRepository.go.html to see an example of how to use CreateRepository API. -// A default retry strategy applies to this operation CreateRepository() -func (client DevopsClient) CreateRepository(ctx context.Context, request CreateRepositoryRequest) (response CreateRepositoryResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateOrUpdateProtectedBranch.go.html to see an example of how to use CreateOrUpdateProtectedBranch API. +// A default retry strategy applies to this operation CreateOrUpdateProtectedBranch() +func (client DevopsClient) CreateOrUpdateProtectedBranch(ctx context.Context, request CreateOrUpdateProtectedBranchRequest) (response CreateOrUpdateProtectedBranchResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1056,42 +1056,42 @@ func (client DevopsClient) CreateRepository(ctx context.Context, request CreateR request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createRepository, policy) + ociResponse, err = common.Retry(ctx, request, client.createOrUpdateProtectedBranch, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateOrUpdateProtectedBranchResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateRepositoryResponse{} + response = CreateOrUpdateProtectedBranchResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateRepositoryResponse); ok { + if convertedResponse, ok := ociResponse.(CreateOrUpdateProtectedBranchResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateRepositoryResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateOrUpdateProtectedBranchResponse") } return } -// createRepository implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) createRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createOrUpdateProtectedBranch implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createOrUpdateProtectedBranch(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories/{repositoryId}/actions/createOrUpdateProtectedBranch", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateRepositoryResponse + var response CreateOrUpdateProtectedBranchResponse 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/devops/20210630/Repository/CreateRepository" - err = common.PostProcessServiceError(err, "Devops", "CreateRepository", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranch/CreateOrUpdateProtectedBranch" + err = common.PostProcessServiceError(err, "Devops", "CreateOrUpdateProtectedBranch", apiReferenceLink) return response, err } @@ -1099,13 +1099,13 @@ func (client DevopsClient) createRepository(ctx context.Context, request common. return response, err } -// CreateTrigger Creates a new trigger. +// CreateProject Creates a new project. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateTrigger.go.html to see an example of how to use CreateTrigger API. -// A default retry strategy applies to this operation CreateTrigger() -func (client DevopsClient) CreateTrigger(ctx context.Context, request CreateTriggerRequest) (response CreateTriggerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateProject.go.html to see an example of how to use CreateProject API. +// A default retry strategy applies to this operation CreateProject() +func (client DevopsClient) CreateProject(ctx context.Context, request CreateProjectRequest) (response CreateProjectResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1119,56 +1119,56 @@ func (client DevopsClient) CreateTrigger(ctx context.Context, request CreateTrig request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createTrigger, policy) + ociResponse, err = common.Retry(ctx, request, client.createProject, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateTriggerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateTriggerResponse{} + response = CreateProjectResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateTriggerResponse); ok { + if convertedResponse, ok := ociResponse.(CreateProjectResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateTriggerResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateProjectResponse") } return } -// createTrigger implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) createTrigger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createProject implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/triggers", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/projects", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateTriggerResponse + var response CreateProjectResponse 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/devops/20210630/Trigger/CreateTrigger" - err = common.PostProcessServiceError(err, "Devops", "CreateTrigger", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/CreateProject" + err = common.PostProcessServiceError(err, "Devops", "CreateProject", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &triggercreateresult{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// DeleteBuildPipeline Deletes a build pipeline resource by identifier. +// CreatePullRequest Creates a new PullRequest. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteBuildPipeline.go.html to see an example of how to use DeleteBuildPipeline API. -// A default retry strategy applies to this operation DeleteBuildPipeline() -func (client DevopsClient) DeleteBuildPipeline(ctx context.Context, request DeleteBuildPipelineRequest) (response DeleteBuildPipelineResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreatePullRequest.go.html to see an example of how to use CreatePullRequest API. +// A default retry strategy applies to this operation CreatePullRequest() +func (client DevopsClient) CreatePullRequest(ctx context.Context, request CreatePullRequestRequest) (response CreatePullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1177,42 +1177,47 @@ func (client DevopsClient) DeleteBuildPipeline(ctx context.Context, request Dele if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteBuildPipeline, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteBuildPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreatePullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteBuildPipelineResponse{} + response = CreatePullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteBuildPipelineResponse); ok { + if convertedResponse, ok := ociResponse.(CreatePullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteBuildPipelineResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreatePullRequestResponse") } return } -// deleteBuildPipeline implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteBuildPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createPullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createPullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/buildPipelines/{buildPipelineId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteBuildPipelineResponse + var response CreatePullRequestResponse 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/devops/20210630/BuildPipeline/DeleteBuildPipeline" - err = common.PostProcessServiceError(err, "Devops", "DeleteBuildPipeline", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequest" + err = common.PostProcessServiceError(err, "Devops", "CreatePullRequest", apiReferenceLink) return response, err } @@ -1220,13 +1225,13 @@ func (client DevopsClient) deleteBuildPipeline(ctx context.Context, request comm return response, err } -// DeleteBuildPipelineStage Deletes a stage based on the stage ID provided in the request. +// CreatePullRequestAttachment Creates PullRequest attachment // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteBuildPipelineStage.go.html to see an example of how to use DeleteBuildPipelineStage API. -// A default retry strategy applies to this operation DeleteBuildPipelineStage() -func (client DevopsClient) DeleteBuildPipelineStage(ctx context.Context, request DeleteBuildPipelineStageRequest) (response DeleteBuildPipelineStageResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreatePullRequestAttachment.go.html to see an example of how to use CreatePullRequestAttachment API. +// A default retry strategy applies to this operation CreatePullRequestAttachment() +func (client DevopsClient) CreatePullRequestAttachment(ctx context.Context, request CreatePullRequestAttachmentRequest) (response CreatePullRequestAttachmentResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1235,42 +1240,47 @@ func (client DevopsClient) DeleteBuildPipelineStage(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteBuildPipelineStage, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPullRequestAttachment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteBuildPipelineStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreatePullRequestAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteBuildPipelineStageResponse{} + response = CreatePullRequestAttachmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteBuildPipelineStageResponse); ok { + if convertedResponse, ok := ociResponse.(CreatePullRequestAttachmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteBuildPipelineStageResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreatePullRequestAttachmentResponse") } return } -// deleteBuildPipelineStage implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteBuildPipelineStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createPullRequestAttachment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createPullRequestAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/buildPipelineStages/{buildPipelineStageId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/attachments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteBuildPipelineStageResponse + var response CreatePullRequestAttachmentResponse 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/devops/20210630/BuildPipelineStage/DeleteBuildPipelineStage" - err = common.PostProcessServiceError(err, "Devops", "DeleteBuildPipelineStage", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequestAttachment" + err = common.PostProcessServiceError(err, "Devops", "CreatePullRequestAttachment", apiReferenceLink) return response, err } @@ -1278,13 +1288,13 @@ func (client DevopsClient) deleteBuildPipelineStage(ctx context.Context, request return response, err } -// DeleteConnection Deletes a connection resource by identifier. +// CreatePullRequestComment Creates a new PullRequest comment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteConnection.go.html to see an example of how to use DeleteConnection API. -// A default retry strategy applies to this operation DeleteConnection() -func (client DevopsClient) DeleteConnection(ctx context.Context, request DeleteConnectionRequest) (response DeleteConnectionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreatePullRequestComment.go.html to see an example of how to use CreatePullRequestComment API. +// A default retry strategy applies to this operation CreatePullRequestComment() +func (client DevopsClient) CreatePullRequestComment(ctx context.Context, request CreatePullRequestCommentRequest) (response CreatePullRequestCommentResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1293,42 +1303,47 @@ func (client DevopsClient) DeleteConnection(ctx context.Context, request DeleteC if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteConnection, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPullRequestComment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreatePullRequestCommentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteConnectionResponse{} + response = CreatePullRequestCommentResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteConnectionResponse); ok { + if convertedResponse, ok := ociResponse.(CreatePullRequestCommentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteConnectionResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreatePullRequestCommentResponse") } return } -// deleteConnection implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createPullRequestComment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createPullRequestComment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/connections/{connectionId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/comments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteConnectionResponse + var response CreatePullRequestCommentResponse 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/devops/20210630/Connection/DeleteConnection" - err = common.PostProcessServiceError(err, "Devops", "DeleteConnection", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequestComment" + err = common.PostProcessServiceError(err, "Devops", "CreatePullRequestComment", apiReferenceLink) return response, err } @@ -1336,13 +1351,13 @@ func (client DevopsClient) deleteConnection(ctx context.Context, request common. return response, err } -// DeleteDeployArtifact Deletes a deployment artifact resource by identifier. +// CreateRepository Creates a new repository. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployArtifact.go.html to see an example of how to use DeleteDeployArtifact API. -// A default retry strategy applies to this operation DeleteDeployArtifact() -func (client DevopsClient) DeleteDeployArtifact(ctx context.Context, request DeleteDeployArtifactRequest) (response DeleteDeployArtifactResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateRepository.go.html to see an example of how to use CreateRepository API. +// A default retry strategy applies to this operation CreateRepository() +func (client DevopsClient) CreateRepository(ctx context.Context, request CreateRepositoryRequest) (response CreateRepositoryResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1351,42 +1366,47 @@ func (client DevopsClient) DeleteDeployArtifact(ctx context.Context, request Del if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteDeployArtifact, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createRepository, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteDeployArtifactResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteDeployArtifactResponse{} + response = CreateRepositoryResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteDeployArtifactResponse); ok { + if convertedResponse, ok := ociResponse.(CreateRepositoryResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployArtifactResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateRepositoryResponse") } return } -// deleteDeployArtifact implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteDeployArtifact(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createRepository implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployArtifacts/{deployArtifactId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteDeployArtifactResponse + var response CreateRepositoryResponse 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/devops/20210630/DeployArtifact/DeleteDeployArtifact" - err = common.PostProcessServiceError(err, "Devops", "DeleteDeployArtifact", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/CreateRepository" + err = common.PostProcessServiceError(err, "Devops", "CreateRepository", apiReferenceLink) return response, err } @@ -1394,13 +1414,13 @@ func (client DevopsClient) deleteDeployArtifact(ctx context.Context, request com return response, err } -// DeleteDeployEnvironment Deletes a deployment environment resource by identifier. +// CreateTrigger Creates a new trigger. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployEnvironment.go.html to see an example of how to use DeleteDeployEnvironment API. -// A default retry strategy applies to this operation DeleteDeployEnvironment() -func (client DevopsClient) DeleteDeployEnvironment(ctx context.Context, request DeleteDeployEnvironmentRequest) (response DeleteDeployEnvironmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CreateTrigger.go.html to see an example of how to use CreateTrigger API. +// A default retry strategy applies to this operation CreateTrigger() +func (client DevopsClient) CreateTrigger(ctx context.Context, request CreateTriggerRequest) (response CreateTriggerResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1409,56 +1429,61 @@ func (client DevopsClient) DeleteDeployEnvironment(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteDeployEnvironment, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createTrigger, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteDeployEnvironmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateTriggerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteDeployEnvironmentResponse{} + response = CreateTriggerResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteDeployEnvironmentResponse); ok { + if convertedResponse, ok := ociResponse.(CreateTriggerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployEnvironmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateTriggerResponse") } return } -// deleteDeployEnvironment implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteDeployEnvironment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createTrigger implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) createTrigger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployEnvironments/{deployEnvironmentId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/triggers", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteDeployEnvironmentResponse + var response CreateTriggerResponse 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/devops/20210630/DeployEnvironment/DeleteDeployEnvironment" - err = common.PostProcessServiceError(err, "Devops", "DeleteDeployEnvironment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Trigger/CreateTrigger" + err = common.PostProcessServiceError(err, "Devops", "CreateTrigger", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &triggercreateresult{}) return response, err } -// DeleteDeployPipeline Deletes a deployment pipeline resource by identifier. +// DeclinePullRequest Decline a PullRequest // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployPipeline.go.html to see an example of how to use DeleteDeployPipeline API. -// A default retry strategy applies to this operation DeleteDeployPipeline() -func (client DevopsClient) DeleteDeployPipeline(ctx context.Context, request DeleteDeployPipelineRequest) (response DeleteDeployPipelineResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeclinePullRequest.go.html to see an example of how to use DeclinePullRequest API. +// A default retry strategy applies to this operation DeclinePullRequest() +func (client DevopsClient) DeclinePullRequest(ctx context.Context, request DeclinePullRequestRequest) (response DeclinePullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1467,42 +1492,42 @@ func (client DevopsClient) DeleteDeployPipeline(ctx context.Context, request Del if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteDeployPipeline, policy) + ociResponse, err = common.Retry(ctx, request, client.declinePullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteDeployPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeclinePullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteDeployPipelineResponse{} + response = DeclinePullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteDeployPipelineResponse); ok { + if convertedResponse, ok := ociResponse.(DeclinePullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployPipelineResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeclinePullRequestResponse") } return } -// deleteDeployPipeline implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteDeployPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// declinePullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) declinePullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployPipelines/{deployPipelineId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/actions/decline", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteDeployPipelineResponse + var response DeclinePullRequestResponse 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/devops/20210630/DeployPipeline/DeleteDeployPipeline" - err = common.PostProcessServiceError(err, "Devops", "DeleteDeployPipeline", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeclinePullRequest" + err = common.PostProcessServiceError(err, "Devops", "DeclinePullRequest", apiReferenceLink) return response, err } @@ -1510,13 +1535,13 @@ func (client DevopsClient) deleteDeployPipeline(ctx context.Context, request com return response, err } -// DeleteDeployStage Deletes a deployment stage resource by identifier. +// DeleteBuildPipeline Deletes a build pipeline resource by identifier. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployStage.go.html to see an example of how to use DeleteDeployStage API. -// A default retry strategy applies to this operation DeleteDeployStage() -func (client DevopsClient) DeleteDeployStage(ctx context.Context, request DeleteDeployStageRequest) (response DeleteDeployStageResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteBuildPipeline.go.html to see an example of how to use DeleteBuildPipeline API. +// A default retry strategy applies to this operation DeleteBuildPipeline() +func (client DevopsClient) DeleteBuildPipeline(ctx context.Context, request DeleteBuildPipelineRequest) (response DeleteBuildPipelineResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1525,42 +1550,42 @@ func (client DevopsClient) DeleteDeployStage(ctx context.Context, request Delete if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteDeployStage, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteBuildPipeline, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteDeployStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteBuildPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteDeployStageResponse{} + response = DeleteBuildPipelineResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteDeployStageResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteBuildPipelineResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployStageResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteBuildPipelineResponse") } return } -// deleteDeployStage implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteDeployStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteBuildPipeline implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteBuildPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployStages/{deployStageId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/buildPipelines/{buildPipelineId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteDeployStageResponse + var response DeleteBuildPipelineResponse 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/devops/20210630/DeployStage/DeleteDeployStage" - err = common.PostProcessServiceError(err, "Devops", "DeleteDeployStage", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipeline/DeleteBuildPipeline" + err = common.PostProcessServiceError(err, "Devops", "DeleteBuildPipeline", apiReferenceLink) return response, err } @@ -1568,13 +1593,13 @@ func (client DevopsClient) deleteDeployStage(ctx context.Context, request common return response, err } -// DeleteProject Deletes a project resource by identifier +// DeleteBuildPipelineStage Deletes a stage based on the stage ID provided in the request. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteProject.go.html to see an example of how to use DeleteProject API. -// A default retry strategy applies to this operation DeleteProject() -func (client DevopsClient) DeleteProject(ctx context.Context, request DeleteProjectRequest) (response DeleteProjectResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteBuildPipelineStage.go.html to see an example of how to use DeleteBuildPipelineStage API. +// A default retry strategy applies to this operation DeleteBuildPipelineStage() +func (client DevopsClient) DeleteBuildPipelineStage(ctx context.Context, request DeleteBuildPipelineStageRequest) (response DeleteBuildPipelineStageResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1583,42 +1608,42 @@ func (client DevopsClient) DeleteProject(ctx context.Context, request DeleteProj if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteProject, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteBuildPipelineStage, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteBuildPipelineStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteProjectResponse{} + response = DeleteBuildPipelineStageResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteProjectResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteBuildPipelineStageResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteProjectResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteBuildPipelineStageResponse") } return } -// deleteProject implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteBuildPipelineStage implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteBuildPipelineStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/projects/{projectId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/buildPipelineStages/{buildPipelineStageId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteProjectResponse + var response DeleteBuildPipelineStageResponse 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/devops/20210630/Project/DeleteProject" - err = common.PostProcessServiceError(err, "Devops", "DeleteProject", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStage/DeleteBuildPipelineStage" + err = common.PostProcessServiceError(err, "Devops", "DeleteBuildPipelineStage", apiReferenceLink) return response, err } @@ -1626,13 +1651,13 @@ func (client DevopsClient) deleteProject(ctx context.Context, request common.OCI return response, err } -// DeleteRef Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like "heads/" or "tags/". This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by "/repositories/{repositoryId}/actions/deleteGitRef". +// DeleteConnection Deletes a connection resource by identifier. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteRef.go.html to see an example of how to use DeleteRef API. -// A default retry strategy applies to this operation DeleteRef() -func (client DevopsClient) DeleteRef(ctx context.Context, request DeleteRefRequest) (response DeleteRefResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteConnection.go.html to see an example of how to use DeleteConnection API. +// A default retry strategy applies to this operation DeleteConnection() +func (client DevopsClient) DeleteConnection(ctx context.Context, request DeleteConnectionRequest) (response DeleteConnectionResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1641,47 +1666,42 @@ func (client DevopsClient) DeleteRef(ctx context.Context, request DeleteRefReque 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.deleteRef, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteConnection, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteRefResponse{} + response = DeleteConnectionResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteRefResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteConnectionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteRefResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteConnectionResponse") } return } -// deleteRef implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteConnection implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/repositories/{repositoryId}/refs/{refName}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/connections/{connectionId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteRefResponse + var response DeleteConnectionResponse 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/devops/20210630/Repository/DeleteRef" - err = common.PostProcessServiceError(err, "Devops", "DeleteRef", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Connection/DeleteConnection" + err = common.PostProcessServiceError(err, "Devops", "DeleteConnection", apiReferenceLink) return response, err } @@ -1689,13 +1709,13 @@ func (client DevopsClient) deleteRef(ctx context.Context, request common.OCIRequ return response, err } -// DeleteRepository Deletes a repository resource by identifier. +// DeleteDeployArtifact Deletes a deployment artifact resource by identifier. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteRepository.go.html to see an example of how to use DeleteRepository API. -// A default retry strategy applies to this operation DeleteRepository() -func (client DevopsClient) DeleteRepository(ctx context.Context, request DeleteRepositoryRequest) (response DeleteRepositoryResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployArtifact.go.html to see an example of how to use DeleteDeployArtifact API. +// A default retry strategy applies to this operation DeleteDeployArtifact() +func (client DevopsClient) DeleteDeployArtifact(ctx context.Context, request DeleteDeployArtifactRequest) (response DeleteDeployArtifactResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1704,42 +1724,42 @@ func (client DevopsClient) DeleteRepository(ctx context.Context, request DeleteR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteRepository, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteDeployArtifact, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteDeployArtifactResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteRepositoryResponse{} + response = DeleteDeployArtifactResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteRepositoryResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteDeployArtifactResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteRepositoryResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployArtifactResponse") } return } -// deleteRepository implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteDeployArtifact implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteDeployArtifact(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/repositories/{repositoryId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployArtifacts/{deployArtifactId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteRepositoryResponse + var response DeleteDeployArtifactResponse 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/devops/20210630/Repository/DeleteRepository" - err = common.PostProcessServiceError(err, "Devops", "DeleteRepository", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifact/DeleteDeployArtifact" + err = common.PostProcessServiceError(err, "Devops", "DeleteDeployArtifact", apiReferenceLink) return response, err } @@ -1747,13 +1767,13 @@ func (client DevopsClient) deleteRepository(ctx context.Context, request common. return response, err } -// DeleteTrigger Deletes a trigger resource by identifier. +// DeleteDeployEnvironment Deletes a deployment environment resource by identifier. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteTrigger.go.html to see an example of how to use DeleteTrigger API. -// A default retry strategy applies to this operation DeleteTrigger() -func (client DevopsClient) DeleteTrigger(ctx context.Context, request DeleteTriggerRequest) (response DeleteTriggerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployEnvironment.go.html to see an example of how to use DeleteDeployEnvironment API. +// A default retry strategy applies to this operation DeleteDeployEnvironment() +func (client DevopsClient) DeleteDeployEnvironment(ctx context.Context, request DeleteDeployEnvironmentRequest) (response DeleteDeployEnvironmentResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1762,42 +1782,42 @@ func (client DevopsClient) DeleteTrigger(ctx context.Context, request DeleteTrig if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteTrigger, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteDeployEnvironment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteTriggerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteDeployEnvironmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteTriggerResponse{} + response = DeleteDeployEnvironmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteTriggerResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteDeployEnvironmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteTriggerResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployEnvironmentResponse") } return } -// deleteTrigger implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) deleteTrigger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteDeployEnvironment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteDeployEnvironment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/triggers/{triggerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployEnvironments/{deployEnvironmentId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteTriggerResponse + var response DeleteDeployEnvironmentResponse 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/devops/20210630/Trigger/DeleteTrigger" - err = common.PostProcessServiceError(err, "Devops", "DeleteTrigger", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironment/DeleteDeployEnvironment" + err = common.PostProcessServiceError(err, "Devops", "DeleteDeployEnvironment", apiReferenceLink) return response, err } @@ -1805,13 +1825,13 @@ func (client DevopsClient) deleteTrigger(ctx context.Context, request common.OCI return response, err } -// GetBuildPipeline Retrieves a build pipeline by identifier. +// DeleteDeployPipeline Deletes a deployment pipeline resource by identifier. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetBuildPipeline.go.html to see an example of how to use GetBuildPipeline API. -// A default retry strategy applies to this operation GetBuildPipeline() -func (client DevopsClient) GetBuildPipeline(ctx context.Context, request GetBuildPipelineRequest) (response GetBuildPipelineResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployPipeline.go.html to see an example of how to use DeleteDeployPipeline API. +// A default retry strategy applies to this operation DeleteDeployPipeline() +func (client DevopsClient) DeleteDeployPipeline(ctx context.Context, request DeleteDeployPipelineRequest) (response DeleteDeployPipelineResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1820,42 +1840,42 @@ func (client DevopsClient) GetBuildPipeline(ctx context.Context, request GetBuil if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getBuildPipeline, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteDeployPipeline, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetBuildPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteDeployPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetBuildPipelineResponse{} + response = DeleteDeployPipelineResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetBuildPipelineResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteDeployPipelineResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBuildPipelineResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployPipelineResponse") } return } -// getBuildPipeline implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getBuildPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteDeployPipeline implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteDeployPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelines/{buildPipelineId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployPipelines/{deployPipelineId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetBuildPipelineResponse + var response DeleteDeployPipelineResponse 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/devops/20210630/BuildPipeline/GetBuildPipeline" - err = common.PostProcessServiceError(err, "Devops", "GetBuildPipeline", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipeline/DeleteDeployPipeline" + err = common.PostProcessServiceError(err, "Devops", "DeleteDeployPipeline", apiReferenceLink) return response, err } @@ -1863,13 +1883,13 @@ func (client DevopsClient) getBuildPipeline(ctx context.Context, request common. return response, err } -// GetBuildPipelineStage Retrieves a stage based on the stage ID provided in the request. +// DeleteDeployStage Deletes a deployment stage resource by identifier. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetBuildPipelineStage.go.html to see an example of how to use GetBuildPipelineStage API. -// A default retry strategy applies to this operation GetBuildPipelineStage() -func (client DevopsClient) GetBuildPipelineStage(ctx context.Context, request GetBuildPipelineStageRequest) (response GetBuildPipelineStageResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteDeployStage.go.html to see an example of how to use DeleteDeployStage API. +// A default retry strategy applies to this operation DeleteDeployStage() +func (client DevopsClient) DeleteDeployStage(ctx context.Context, request DeleteDeployStageRequest) (response DeleteDeployStageResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1878,56 +1898,56 @@ func (client DevopsClient) GetBuildPipelineStage(ctx context.Context, request Ge if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getBuildPipelineStage, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteDeployStage, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetBuildPipelineStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteDeployStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetBuildPipelineStageResponse{} + response = DeleteDeployStageResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetBuildPipelineStageResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteDeployStageResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBuildPipelineStageResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteDeployStageResponse") } return } -// getBuildPipelineStage implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getBuildPipelineStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteDeployStage implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteDeployStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelineStages/{buildPipelineStageId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/deployStages/{deployStageId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetBuildPipelineStageResponse + var response DeleteDeployStageResponse 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/devops/20210630/BuildPipelineStage/GetBuildPipelineStage" - err = common.PostProcessServiceError(err, "Devops", "GetBuildPipelineStage", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStage/DeleteDeployStage" + err = common.PostProcessServiceError(err, "Devops", "DeleteDeployStage", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &buildpipelinestage{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetBuildRun Returns the details of a build run for a given build run ID. +// DeleteGitRef Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like "heads/" or "tags/". // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetBuildRun.go.html to see an example of how to use GetBuildRun API. -// A default retry strategy applies to this operation GetBuildRun() -func (client DevopsClient) GetBuildRun(ctx context.Context, request GetBuildRunRequest) (response GetBuildRunResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteGitRef.go.html to see an example of how to use DeleteGitRef API. +// A default retry strategy applies to this operation DeleteGitRef() +func (client DevopsClient) DeleteGitRef(ctx context.Context, request DeleteGitRefRequest) (response DeleteGitRefResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1936,42 +1956,47 @@ func (client DevopsClient) GetBuildRun(ctx context.Context, request GetBuildRunR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getBuildRun, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteGitRef, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetBuildRunResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteGitRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetBuildRunResponse{} + response = DeleteGitRefResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetBuildRunResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteGitRefResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBuildRunResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteGitRefResponse") } return } -// getBuildRun implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getBuildRun(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteGitRef implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteGitRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildRuns/{buildRunId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories/{repositoryId}/actions/deleteGitRef", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetBuildRunResponse + var response DeleteGitRefResponse 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/devops/20210630/BuildRun/GetBuildRun" - err = common.PostProcessServiceError(err, "Devops", "GetBuildRun", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/DeleteGitRef" + err = common.PostProcessServiceError(err, "Devops", "DeleteGitRef", apiReferenceLink) return response, err } @@ -1979,13 +2004,13 @@ func (client DevopsClient) getBuildRun(ctx context.Context, request common.OCIRe return response, err } -// GetCommit Retrieves a repository's commit by commit ID. +// DeleteProject Deletes a project resource by identifier // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetCommit.go.html to see an example of how to use GetCommit API. -// A default retry strategy applies to this operation GetCommit() -func (client DevopsClient) GetCommit(ctx context.Context, request GetCommitRequest) (response GetCommitResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteProject.go.html to see an example of how to use DeleteProject API. +// A default retry strategy applies to this operation DeleteProject() +func (client DevopsClient) DeleteProject(ctx context.Context, request DeleteProjectRequest) (response DeleteProjectResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -1994,42 +2019,42 @@ func (client DevopsClient) GetCommit(ctx context.Context, request GetCommitReque if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getCommit, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteProject, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetCommitResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetCommitResponse{} + response = DeleteProjectResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetCommitResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteProjectResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetCommitResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteProjectResponse") } return } -// getCommit implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getCommit(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteProject implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/commits/{commitId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/projects/{projectId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetCommitResponse + var response DeleteProjectResponse 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/devops/20210630/Repository/GetCommit" - err = common.PostProcessServiceError(err, "Devops", "GetCommit", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/DeleteProject" + err = common.PostProcessServiceError(err, "Devops", "DeleteProject", apiReferenceLink) return response, err } @@ -2037,13 +2062,13 @@ func (client DevopsClient) getCommit(ctx context.Context, request common.OCIRequ return response, err } -// GetCommitDiff Compares two revisions for their differences. Supports comparison between two references or commits. +// DeleteProjectRepositorySettings Removes the custom repository settings configured for a project. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetCommitDiff.go.html to see an example of how to use GetCommitDiff API. -// A default retry strategy applies to this operation GetCommitDiff() -func (client DevopsClient) GetCommitDiff(ctx context.Context, request GetCommitDiffRequest) (response GetCommitDiffResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteProjectRepositorySettings.go.html to see an example of how to use DeleteProjectRepositorySettings API. +// A default retry strategy applies to this operation DeleteProjectRepositorySettings() +func (client DevopsClient) DeleteProjectRepositorySettings(ctx context.Context, request DeleteProjectRepositorySettingsRequest) (response DeleteProjectRepositorySettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2052,42 +2077,47 @@ func (client DevopsClient) GetCommitDiff(ctx context.Context, request GetCommitD if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getCommitDiff, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteProjectRepositorySettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetCommitDiffResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteProjectRepositorySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetCommitDiffResponse{} + response = DeleteProjectRepositorySettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetCommitDiffResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteProjectRepositorySettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetCommitDiffResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteProjectRepositorySettingsResponse") } return } -// getCommitDiff implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getCommitDiff(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteProjectRepositorySettings implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteProjectRepositorySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/diff", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/projects/{projectId}/repositorySettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetCommitDiffResponse + var response DeleteProjectRepositorySettingsResponse 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/devops/20210630/Repository/GetCommitDiff" - err = common.PostProcessServiceError(err, "Devops", "GetCommitDiff", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/DeleteProjectRepositorySettings" + err = common.PostProcessServiceError(err, "Devops", "DeleteProjectRepositorySettings", apiReferenceLink) return response, err } @@ -2095,13 +2125,13 @@ func (client DevopsClient) getCommitDiff(ctx context.Context, request common.OCI return response, err } -// GetConnection Retrieves a connection by identifier. +// DeleteProtectedBranch Removes the protection from a branch // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetConnection.go.html to see an example of how to use GetConnection API. -// A default retry strategy applies to this operation GetConnection() -func (client DevopsClient) GetConnection(ctx context.Context, request GetConnectionRequest) (response GetConnectionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteProtectedBranch.go.html to see an example of how to use DeleteProtectedBranch API. +// A default retry strategy applies to this operation DeleteProtectedBranch() +func (client DevopsClient) DeleteProtectedBranch(ctx context.Context, request DeleteProtectedBranchRequest) (response DeleteProtectedBranchResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2110,56 +2140,3084 @@ func (client DevopsClient) GetConnection(ctx context.Context, request GetConnect if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getConnection, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteProtectedBranch, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteProtectedBranchResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetConnectionResponse{} + response = DeleteProtectedBranchResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetConnectionResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteProtectedBranchResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteProtectedBranchResponse") + } + return +} + +// deleteProtectedBranch implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteProtectedBranch(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories/{repositoryId}/actions/deleteProtectedBranch", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteProtectedBranchResponse + 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/devops/20210630/ProtectedBranch/DeleteProtectedBranch" + err = common.PostProcessServiceError(err, "Devops", "DeleteProtectedBranch", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePullRequest Deletes a PullRequest resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeletePullRequest.go.html to see an example of how to use DeletePullRequest API. +// A default retry strategy applies to this operation DeletePullRequest() +func (client DevopsClient) DeletePullRequest(ctx context.Context, request DeletePullRequestRequest) (response DeletePullRequestResponse, 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.deletePullRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePullRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePullRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePullRequestResponse") + } + return +} + +// deletePullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deletePullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/pullRequests/{pullRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePullRequestResponse + 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/devops/20210630/PullRequest/DeletePullRequest" + err = common.PostProcessServiceError(err, "Devops", "DeletePullRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePullRequestAttachment Deletes a PullRequest attachment metadata by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeletePullRequestAttachment.go.html to see an example of how to use DeletePullRequestAttachment API. +// A default retry strategy applies to this operation DeletePullRequestAttachment() +func (client DevopsClient) DeletePullRequestAttachment(ctx context.Context, request DeletePullRequestAttachmentRequest) (response DeletePullRequestAttachmentResponse, 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.deletePullRequestAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePullRequestAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePullRequestAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePullRequestAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePullRequestAttachmentResponse") + } + return +} + +// deletePullRequestAttachment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deletePullRequestAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/pullRequests/{pullRequestId}/attachments/{attachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePullRequestAttachmentResponse + 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/devops/20210630/PullRequest/DeletePullRequestAttachment" + err = common.PostProcessServiceError(err, "Devops", "DeletePullRequestAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePullRequestComment Deletes a PullRequest comment by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeletePullRequestComment.go.html to see an example of how to use DeletePullRequestComment API. +// A default retry strategy applies to this operation DeletePullRequestComment() +func (client DevopsClient) DeletePullRequestComment(ctx context.Context, request DeletePullRequestCommentRequest) (response DeletePullRequestCommentResponse, 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.deletePullRequestComment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePullRequestCommentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePullRequestCommentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePullRequestCommentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePullRequestCommentResponse") + } + return +} + +// deletePullRequestComment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deletePullRequestComment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/pullRequests/{pullRequestId}/comments/{commentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePullRequestCommentResponse + 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/devops/20210630/PullRequest/DeletePullRequestComment" + err = common.PostProcessServiceError(err, "Devops", "DeletePullRequestComment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRef Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like "heads/" or "tags/". This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by "/repositories/{repositoryId}/actions/deleteGitRef". +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteRef.go.html to see an example of how to use DeleteRef API. +// A default retry strategy applies to this operation DeleteRef() +func (client DevopsClient) DeleteRef(ctx context.Context, request DeleteRefRequest) (response DeleteRefResponse, 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.deleteRef, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRefResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRefResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRefResponse") + } + return +} + +// deleteRef implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/repositories/{repositoryId}/refs/{refName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteRefResponse + 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/devops/20210630/Repository/DeleteRef" + err = common.PostProcessServiceError(err, "Devops", "DeleteRef", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRepository Deletes a repository resource by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteRepository.go.html to see an example of how to use DeleteRepository API. +// A default retry strategy applies to this operation DeleteRepository() +func (client DevopsClient) DeleteRepository(ctx context.Context, request DeleteRepositoryRequest) (response DeleteRepositoryResponse, 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.deleteRepository, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRepositoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRepositoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRepositoryResponse") + } + return +} + +// deleteRepository implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/repositories/{repositoryId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteRepositoryResponse + 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/devops/20210630/Repository/DeleteRepository" + err = common.PostProcessServiceError(err, "Devops", "DeleteRepository", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRepositorySettings Removes the custom settings configured for a repository +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteRepositorySettings.go.html to see an example of how to use DeleteRepositorySettings API. +// A default retry strategy applies to this operation DeleteRepositorySettings() +func (client DevopsClient) DeleteRepositorySettings(ctx context.Context, request DeleteRepositorySettingsRequest) (response DeleteRepositorySettingsResponse, 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.deleteRepositorySettings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRepositorySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRepositorySettingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRepositorySettingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRepositorySettingsResponse") + } + return +} + +// deleteRepositorySettings implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteRepositorySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/repositories/{repositoryId}/repositorySettings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteRepositorySettingsResponse + 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/devops/20210630/RepositorySettings/DeleteRepositorySettings" + err = common.PostProcessServiceError(err, "Devops", "DeleteRepositorySettings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteTrigger Deletes a trigger resource by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/DeleteTrigger.go.html to see an example of how to use DeleteTrigger API. +// A default retry strategy applies to this operation DeleteTrigger() +func (client DevopsClient) DeleteTrigger(ctx context.Context, request DeleteTriggerRequest) (response DeleteTriggerResponse, 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.deleteTrigger, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteTriggerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteTriggerResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteTriggerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteTriggerResponse") + } + return +} + +// deleteTrigger implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) deleteTrigger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/triggers/{triggerId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteTriggerResponse + 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/devops/20210630/Trigger/DeleteTrigger" + err = common.PostProcessServiceError(err, "Devops", "DeleteTrigger", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBuildPipeline Retrieves a build pipeline by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetBuildPipeline.go.html to see an example of how to use GetBuildPipeline API. +// A default retry strategy applies to this operation GetBuildPipeline() +func (client DevopsClient) GetBuildPipeline(ctx context.Context, request GetBuildPipelineRequest) (response GetBuildPipelineResponse, 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.getBuildPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBuildPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBuildPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBuildPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBuildPipelineResponse") + } + return +} + +// getBuildPipeline implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getBuildPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelines/{buildPipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetBuildPipelineResponse + 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/devops/20210630/BuildPipeline/GetBuildPipeline" + err = common.PostProcessServiceError(err, "Devops", "GetBuildPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBuildPipelineStage Retrieves a stage based on the stage ID provided in the request. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetBuildPipelineStage.go.html to see an example of how to use GetBuildPipelineStage API. +// A default retry strategy applies to this operation GetBuildPipelineStage() +func (client DevopsClient) GetBuildPipelineStage(ctx context.Context, request GetBuildPipelineStageRequest) (response GetBuildPipelineStageResponse, 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.getBuildPipelineStage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBuildPipelineStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBuildPipelineStageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBuildPipelineStageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBuildPipelineStageResponse") + } + return +} + +// getBuildPipelineStage implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getBuildPipelineStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelineStages/{buildPipelineStageId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetBuildPipelineStageResponse + 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/devops/20210630/BuildPipelineStage/GetBuildPipelineStage" + err = common.PostProcessServiceError(err, "Devops", "GetBuildPipelineStage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &buildpipelinestage{}) + return response, err +} + +// GetBuildRun Returns the details of a build run for a given build run ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetBuildRun.go.html to see an example of how to use GetBuildRun API. +// A default retry strategy applies to this operation GetBuildRun() +func (client DevopsClient) GetBuildRun(ctx context.Context, request GetBuildRunRequest) (response GetBuildRunResponse, 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.getBuildRun, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBuildRunResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBuildRunResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBuildRunResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBuildRunResponse") + } + return +} + +// getBuildRun implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getBuildRun(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildRuns/{buildRunId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetBuildRunResponse + 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/devops/20210630/BuildRun/GetBuildRun" + err = common.PostProcessServiceError(err, "Devops", "GetBuildRun", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCommit Retrieves a repository's commit by commit ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetCommit.go.html to see an example of how to use GetCommit API. +// A default retry strategy applies to this operation GetCommit() +func (client DevopsClient) GetCommit(ctx context.Context, request GetCommitRequest) (response GetCommitResponse, 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.getCommit, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCommitResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCommitResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCommitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCommitResponse") + } + return +} + +// getCommit implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getCommit(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/commits/{commitId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCommitResponse + 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/devops/20210630/Repository/GetCommit" + err = common.PostProcessServiceError(err, "Devops", "GetCommit", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCommitDiff Compares two revisions for their differences. Supports comparison between two references or commits. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetCommitDiff.go.html to see an example of how to use GetCommitDiff API. +// A default retry strategy applies to this operation GetCommitDiff() +func (client DevopsClient) GetCommitDiff(ctx context.Context, request GetCommitDiffRequest) (response GetCommitDiffResponse, 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.getCommitDiff, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCommitDiffResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCommitDiffResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCommitDiffResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCommitDiffResponse") + } + return +} + +// getCommitDiff implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getCommitDiff(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/diff", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCommitDiffResponse + 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/devops/20210630/Repository/GetCommitDiff" + err = common.PostProcessServiceError(err, "Devops", "GetCommitDiff", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetConnection Retrieves a connection by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetConnection.go.html to see an example of how to use GetConnection API. +// A default retry strategy applies to this operation GetConnection() +func (client DevopsClient) GetConnection(ctx context.Context, request GetConnectionRequest) (response GetConnectionResponse, 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.getConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConnectionResponse") + } + return +} + +// getConnection implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/connections/{connectionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetConnectionResponse + 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/devops/20210630/Connection/GetConnection" + err = common.PostProcessServiceError(err, "Devops", "GetConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &connection{}) + return response, err +} + +// GetDeployArtifact Retrieves a deployment artifact by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployArtifact.go.html to see an example of how to use GetDeployArtifact API. +// A default retry strategy applies to this operation GetDeployArtifact() +func (client DevopsClient) GetDeployArtifact(ctx context.Context, request GetDeployArtifactRequest) (response GetDeployArtifactResponse, 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.getDeployArtifact, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDeployArtifactResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDeployArtifactResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDeployArtifactResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDeployArtifactResponse") + } + return +} + +// getDeployArtifact implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getDeployArtifact(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployArtifacts/{deployArtifactId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDeployArtifactResponse + 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/devops/20210630/DeployArtifact/GetDeployArtifact" + err = common.PostProcessServiceError(err, "Devops", "GetDeployArtifact", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDeployEnvironment Retrieves a deployment environment by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployEnvironment.go.html to see an example of how to use GetDeployEnvironment API. +// A default retry strategy applies to this operation GetDeployEnvironment() +func (client DevopsClient) GetDeployEnvironment(ctx context.Context, request GetDeployEnvironmentRequest) (response GetDeployEnvironmentResponse, 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.getDeployEnvironment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDeployEnvironmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDeployEnvironmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDeployEnvironmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDeployEnvironmentResponse") + } + return +} + +// getDeployEnvironment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getDeployEnvironment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployEnvironments/{deployEnvironmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDeployEnvironmentResponse + 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/devops/20210630/DeployEnvironment/GetDeployEnvironment" + err = common.PostProcessServiceError(err, "Devops", "GetDeployEnvironment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployenvironment{}) + return response, err +} + +// GetDeployPipeline Retrieves a deployment pipeline by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployPipeline.go.html to see an example of how to use GetDeployPipeline API. +// A default retry strategy applies to this operation GetDeployPipeline() +func (client DevopsClient) GetDeployPipeline(ctx context.Context, request GetDeployPipelineRequest) (response GetDeployPipelineResponse, 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.getDeployPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDeployPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDeployPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDeployPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDeployPipelineResponse") + } + return +} + +// getDeployPipeline implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getDeployPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployPipelines/{deployPipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDeployPipelineResponse + 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/devops/20210630/DeployPipeline/GetDeployPipeline" + err = common.PostProcessServiceError(err, "Devops", "GetDeployPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDeployStage Retrieves a deployment stage by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployStage.go.html to see an example of how to use GetDeployStage API. +// A default retry strategy applies to this operation GetDeployStage() +func (client DevopsClient) GetDeployStage(ctx context.Context, request GetDeployStageRequest) (response GetDeployStageResponse, 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.getDeployStage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDeployStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDeployStageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDeployStageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDeployStageResponse") + } + return +} + +// getDeployStage implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getDeployStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployStages/{deployStageId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDeployStageResponse + 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/devops/20210630/DeployStage/GetDeployStage" + err = common.PostProcessServiceError(err, "Devops", "GetDeployStage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deploystage{}) + return response, err +} + +// GetDeployment Retrieves a deployment by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployment.go.html to see an example of how to use GetDeployment API. +// A default retry strategy applies to this operation GetDeployment() +func (client DevopsClient) GetDeployment(ctx context.Context, request GetDeploymentRequest) (response GetDeploymentResponse, 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.getDeployment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDeploymentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDeploymentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDeploymentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDeploymentResponse") + } + return +} + +// getDeployment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getDeployment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployments/{deploymentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDeploymentResponse + 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/devops/20210630/Deployment/GetDeployment" + err = common.PostProcessServiceError(err, "Devops", "GetDeployment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployment{}) + return response, err +} + +// GetFileDiff Gets the line-by-line difference between file on different commits. This API will be deprecated on Wed, 29 Mar 2023 01:00:00 GMT as it does not get recognized when filePath has '/'. This will be replaced by "/repositories/{repositoryId}/file/diffs" +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetFileDiff.go.html to see an example of how to use GetFileDiff API. +// A default retry strategy applies to this operation GetFileDiff() +func (client DevopsClient) GetFileDiff(ctx context.Context, request GetFileDiffRequest) (response GetFileDiffResponse, 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.getFileDiff, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFileDiffResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFileDiffResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFileDiffResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFileDiffResponse") + } + return +} + +// getFileDiff implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getFileDiff(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/diffs/{filePath}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetFileDiffResponse + 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/devops/20210630/Repository/GetFileDiff" + err = common.PostProcessServiceError(err, "Devops", "GetFileDiff", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMirrorRecord Returns either current mirror record or last successful mirror record for a specific mirror repository. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetMirrorRecord.go.html to see an example of how to use GetMirrorRecord API. +// A default retry strategy applies to this operation GetMirrorRecord() +func (client DevopsClient) GetMirrorRecord(ctx context.Context, request GetMirrorRecordRequest) (response GetMirrorRecordResponse, 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.getMirrorRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMirrorRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMirrorRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMirrorRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMirrorRecordResponse") + } + return +} + +// getMirrorRecord implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getMirrorRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/mirrorRecords/{mirrorRecordType}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMirrorRecordResponse + 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/devops/20210630/Repository/GetMirrorRecord" + err = common.PostProcessServiceError(err, "Devops", "GetMirrorRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetObject Retrieves blob of specific branch name/commit ID and file path. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetObject.go.html to see an example of how to use GetObject API. +// A default retry strategy applies to this operation GetObject() +func (client DevopsClient) GetObject(ctx context.Context, request GetObjectRequest) (response GetObjectResponse, 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.getObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetObjectResponse") + } + return +} + +// getObject implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/object", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetObjectResponse + 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/devops/20210630/RepositoryObject/GetObject" + err = common.PostProcessServiceError(err, "Devops", "GetObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetObjectContent Retrieve contents of a specified object. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetObjectContent.go.html to see an example of how to use GetObjectContent API. +// A default retry strategy applies to this operation GetObjectContent() +func (client DevopsClient) GetObjectContent(ctx context.Context, request GetObjectContentRequest) (response GetObjectContentResponse, 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.getObjectContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetObjectContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetObjectContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetObjectContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetObjectContentResponse") + } + return +} + +// getObjectContent implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getObjectContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/objects/{sha}/content", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetObjectContentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetObjectContent" + err = common.PostProcessServiceError(err, "Devops", "GetObjectContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetProject Retrieves a project by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetProject.go.html to see an example of how to use GetProject API. +// A default retry strategy applies to this operation GetProject() +func (client DevopsClient) GetProject(ctx context.Context, request GetProjectRequest) (response GetProjectResponse, 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.getProject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetProjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetProjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetProjectResponse") + } + return +} + +// getProject implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/projects/{projectId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetProjectResponse + 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/devops/20210630/Project/GetProject" + err = common.PostProcessServiceError(err, "Devops", "GetProject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetProjectNotificationPreference Get the project notification preference for the user passed as path param +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetProjectNotificationPreference.go.html to see an example of how to use GetProjectNotificationPreference API. +// A default retry strategy applies to this operation GetProjectNotificationPreference() +func (client DevopsClient) GetProjectNotificationPreference(ctx context.Context, request GetProjectNotificationPreferenceRequest) (response GetProjectNotificationPreferenceResponse, 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.getProjectNotificationPreference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetProjectNotificationPreferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetProjectNotificationPreferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetProjectNotificationPreferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetProjectNotificationPreferenceResponse") + } + return +} + +// getProjectNotificationPreference implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getProjectNotificationPreference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/projects/{projectId}/principals/{principalId}/pullRequestNotificationPreference", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetProjectNotificationPreferenceResponse + 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/devops/20210630/ProjectNotificationPreference/GetProjectNotificationPreference" + err = common.PostProcessServiceError(err, "Devops", "GetProjectNotificationPreference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetProjectRepositorySettings Retrieves a project's repository settings details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetProjectRepositorySettings.go.html to see an example of how to use GetProjectRepositorySettings API. +// A default retry strategy applies to this operation GetProjectRepositorySettings() +func (client DevopsClient) GetProjectRepositorySettings(ctx context.Context, request GetProjectRepositorySettingsRequest) (response GetProjectRepositorySettingsResponse, 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.getProjectRepositorySettings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetProjectRepositorySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetProjectRepositorySettingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetProjectRepositorySettingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetProjectRepositorySettingsResponse") + } + return +} + +// getProjectRepositorySettings implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getProjectRepositorySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/projects/{projectId}/repositorySettings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetProjectRepositorySettingsResponse + 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/devops/20210630/ProjectRepositorySettings/GetProjectRepositorySettings" + err = common.PostProcessServiceError(err, "Devops", "GetProjectRepositorySettings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPullRequest Gets a PullRequest by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequest.go.html to see an example of how to use GetPullRequest API. +// A default retry strategy applies to this operation GetPullRequest() +func (client DevopsClient) GetPullRequest(ctx context.Context, request GetPullRequestRequest) (response GetPullRequestResponse, 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.getPullRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPullRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPullRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPullRequestResponse") + } + return +} + +// getPullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getPullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPullRequestResponse + 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/devops/20210630/PullRequest/GetPullRequest" + err = common.PostProcessServiceError(err, "Devops", "GetPullRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPullRequestAttachment Get PullRequest attachment metadata by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestAttachment.go.html to see an example of how to use GetPullRequestAttachment API. +// A default retry strategy applies to this operation GetPullRequestAttachment() +func (client DevopsClient) GetPullRequestAttachment(ctx context.Context, request GetPullRequestAttachmentRequest) (response GetPullRequestAttachmentResponse, 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.getPullRequestAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPullRequestAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPullRequestAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPullRequestAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPullRequestAttachmentResponse") + } + return +} + +// getPullRequestAttachment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getPullRequestAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/attachments/{attachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPullRequestAttachmentResponse + 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/devops/20210630/PullRequest/GetPullRequestAttachment" + err = common.PostProcessServiceError(err, "Devops", "GetPullRequestAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPullRequestAttachmentContent Gets the content of the attachment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestAttachmentContent.go.html to see an example of how to use GetPullRequestAttachmentContent API. +// A default retry strategy applies to this operation GetPullRequestAttachmentContent() +func (client DevopsClient) GetPullRequestAttachmentContent(ctx context.Context, request GetPullRequestAttachmentContentRequest) (response GetPullRequestAttachmentContentResponse, 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.getPullRequestAttachmentContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPullRequestAttachmentContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPullRequestAttachmentContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPullRequestAttachmentContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPullRequestAttachmentContentResponse") + } + return +} + +// getPullRequestAttachmentContent implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getPullRequestAttachmentContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/attachments/{attachmentId}/content", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPullRequestAttachmentContentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestAttachmentContent" + err = common.PostProcessServiceError(err, "Devops", "GetPullRequestAttachmentContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPullRequestChangeSummaryMetrics Get pull request diff summary metric +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestChangeSummaryMetrics.go.html to see an example of how to use GetPullRequestChangeSummaryMetrics API. +// A default retry strategy applies to this operation GetPullRequestChangeSummaryMetrics() +func (client DevopsClient) GetPullRequestChangeSummaryMetrics(ctx context.Context, request GetPullRequestChangeSummaryMetricsRequest) (response GetPullRequestChangeSummaryMetricsResponse, 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.getPullRequestChangeSummaryMetrics, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPullRequestChangeSummaryMetricsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPullRequestChangeSummaryMetricsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPullRequestChangeSummaryMetricsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPullRequestChangeSummaryMetricsResponse") + } + return +} + +// getPullRequestChangeSummaryMetrics implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getPullRequestChangeSummaryMetrics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/changeSummaryMetrics", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPullRequestChangeSummaryMetricsResponse + 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/devops/20210630/PullRequest/GetPullRequestChangeSummaryMetrics" + err = common.PostProcessServiceError(err, "Devops", "GetPullRequestChangeSummaryMetrics", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPullRequestComment Get PullRequest comment by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestComment.go.html to see an example of how to use GetPullRequestComment API. +// A default retry strategy applies to this operation GetPullRequestComment() +func (client DevopsClient) GetPullRequestComment(ctx context.Context, request GetPullRequestCommentRequest) (response GetPullRequestCommentResponse, 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.getPullRequestComment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPullRequestCommentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPullRequestCommentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPullRequestCommentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPullRequestCommentResponse") + } + return +} + +// getPullRequestComment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getPullRequestComment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/comments/{commentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPullRequestCommentResponse + 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/devops/20210630/PullRequest/GetPullRequestComment" + err = common.PostProcessServiceError(err, "Devops", "GetPullRequestComment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPullRequestNotificationPreference Get the pull request notification preference for the user passed as path param +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestNotificationPreference.go.html to see an example of how to use GetPullRequestNotificationPreference API. +// A default retry strategy applies to this operation GetPullRequestNotificationPreference() +func (client DevopsClient) GetPullRequestNotificationPreference(ctx context.Context, request GetPullRequestNotificationPreferenceRequest) (response GetPullRequestNotificationPreferenceResponse, 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.getPullRequestNotificationPreference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPullRequestNotificationPreferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPullRequestNotificationPreferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPullRequestNotificationPreferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPullRequestNotificationPreferenceResponse") + } + return +} + +// getPullRequestNotificationPreference implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getPullRequestNotificationPreference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/principals/{principalId}/pullRequestNotificationPreference", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPullRequestNotificationPreferenceResponse + 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/devops/20210630/PullRequestNotificationPreference/GetPullRequestNotificationPreference" + err = common.PostProcessServiceError(err, "Devops", "GetPullRequestNotificationPreference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRef This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by "/repositories/{repositoryId}/refs". Retrieves a repository's reference by its name with preference for branches over tags if the name is ambiguous. This can be disambiguated by using full names like "heads/" or "tags/". +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRef.go.html to see an example of how to use GetRef API. +// A default retry strategy applies to this operation GetRef() +func (client DevopsClient) GetRef(ctx context.Context, request GetRefRequest) (response GetRefResponse, 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.getRef, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRefResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRefResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRefResponse") + } + return +} + +// getRef implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/refs/{refName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRefResponse + 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/devops/20210630/Repository/GetRef" + err = common.PostProcessServiceError(err, "Devops", "GetRef", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &repositoryref{}) + return response, err +} + +// GetRepoFileDiff Gets the line-by-line difference between file on different commits. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepoFileDiff.go.html to see an example of how to use GetRepoFileDiff API. +// A default retry strategy applies to this operation GetRepoFileDiff() +func (client DevopsClient) GetRepoFileDiff(ctx context.Context, request GetRepoFileDiffRequest) (response GetRepoFileDiffResponse, 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.getRepoFileDiff, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRepoFileDiffResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRepoFileDiffResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRepoFileDiffResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRepoFileDiffResponse") + } + return +} + +// getRepoFileDiff implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRepoFileDiff(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/file/diffs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRepoFileDiffResponse + 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/devops/20210630/Repository/GetRepoFileDiff" + err = common.PostProcessServiceError(err, "Devops", "GetRepoFileDiff", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRepoFileLines Retrieve lines of a specified file. Supports starting line number and limit. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepoFileLines.go.html to see an example of how to use GetRepoFileLines API. +// A default retry strategy applies to this operation GetRepoFileLines() +func (client DevopsClient) GetRepoFileLines(ctx context.Context, request GetRepoFileLinesRequest) (response GetRepoFileLinesResponse, 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.getRepoFileLines, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRepoFileLinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRepoFileLinesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRepoFileLinesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRepoFileLinesResponse") + } + return +} + +// getRepoFileLines implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRepoFileLines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/file/lines", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRepoFileLinesResponse + 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/devops/20210630/Repository/GetRepoFileLines" + err = common.PostProcessServiceError(err, "Devops", "GetRepoFileLines", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRepository Retrieves a repository by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepository.go.html to see an example of how to use GetRepository API. +// A default retry strategy applies to this operation GetRepository() +func (client DevopsClient) GetRepository(ctx context.Context, request GetRepositoryRequest) (response GetRepositoryResponse, 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.getRepository, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRepositoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRepositoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRepositoryResponse") + } + return +} + +// getRepository implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRepositoryResponse + 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/devops/20210630/Repository/GetRepository" + err = common.PostProcessServiceError(err, "Devops", "GetRepository", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRepositoryArchiveContent Returns the archived repository information. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositoryArchiveContent.go.html to see an example of how to use GetRepositoryArchiveContent API. +// A default retry strategy applies to this operation GetRepositoryArchiveContent() +func (client DevopsClient) GetRepositoryArchiveContent(ctx context.Context, request GetRepositoryArchiveContentRequest) (response GetRepositoryArchiveContentResponse, 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.getRepositoryArchiveContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRepositoryArchiveContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRepositoryArchiveContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRepositoryArchiveContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRepositoryArchiveContentResponse") + } + return +} + +// getRepositoryArchiveContent implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRepositoryArchiveContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/archive/content", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRepositoryArchiveContentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryArchiveContent" + err = common.PostProcessServiceError(err, "Devops", "GetRepositoryArchiveContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRepositoryFileLines Retrieve lines of a specified file. Supports starting line number and limit. This API will be deprecated on Wed, 29 Mar 2023 01:00:00 GMT as it does not get recognized when filePath has '/'. This will be replaced by "/repositories/{repositoryId}/file/lines" +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositoryFileLines.go.html to see an example of how to use GetRepositoryFileLines API. +// A default retry strategy applies to this operation GetRepositoryFileLines() +func (client DevopsClient) GetRepositoryFileLines(ctx context.Context, request GetRepositoryFileLinesRequest) (response GetRepositoryFileLinesResponse, 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.getRepositoryFileLines, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRepositoryFileLinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRepositoryFileLinesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRepositoryFileLinesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRepositoryFileLinesResponse") + } + return +} + +// getRepositoryFileLines implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRepositoryFileLines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/files/{filePath}/lines", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRepositoryFileLinesResponse + 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/devops/20210630/Repository/GetRepositoryFileLines" + err = common.PostProcessServiceError(err, "Devops", "GetRepositoryFileLines", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRepositoryNotificationPreference Get the repository notification preference for the user passed as path param +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositoryNotificationPreference.go.html to see an example of how to use GetRepositoryNotificationPreference API. +// A default retry strategy applies to this operation GetRepositoryNotificationPreference() +func (client DevopsClient) GetRepositoryNotificationPreference(ctx context.Context, request GetRepositoryNotificationPreferenceRequest) (response GetRepositoryNotificationPreferenceResponse, 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.getRepositoryNotificationPreference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRepositoryNotificationPreferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRepositoryNotificationPreferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRepositoryNotificationPreferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRepositoryNotificationPreferenceResponse") + } + return +} + +// getRepositoryNotificationPreference implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRepositoryNotificationPreference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/principals/{principalId}/pullRequestNotificationPreference", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRepositoryNotificationPreferenceResponse + 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/devops/20210630/RepositoryNotificationPreference/GetRepositoryNotificationPreference" + err = common.PostProcessServiceError(err, "Devops", "GetRepositoryNotificationPreference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRepositorySettings Retrieves a repository's settings details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositorySettings.go.html to see an example of how to use GetRepositorySettings API. +// A default retry strategy applies to this operation GetRepositorySettings() +func (client DevopsClient) GetRepositorySettings(ctx context.Context, request GetRepositorySettingsRequest) (response GetRepositorySettingsResponse, 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.getRepositorySettings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRepositorySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRepositorySettingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRepositorySettingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRepositorySettingsResponse") + } + return +} + +// getRepositorySettings implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getRepositorySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/repositorySettings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRepositorySettingsResponse + 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/devops/20210630/RepositorySettings/GetRepositorySettings" + err = common.PostProcessServiceError(err, "Devops", "GetRepositorySettings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetTrigger Retrieves a trigger by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetTrigger.go.html to see an example of how to use GetTrigger API. +// A default retry strategy applies to this operation GetTrigger() +func (client DevopsClient) GetTrigger(ctx context.Context, request GetTriggerRequest) (response GetTriggerResponse, 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.getTrigger, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetTriggerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetTriggerResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetTriggerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetTriggerResponse") + } + return +} + +// getTrigger implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getTrigger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/triggers/{triggerId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetTriggerResponse + 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/devops/20210630/Trigger/GetTrigger" + err = common.PostProcessServiceError(err, "Devops", "GetTrigger", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &trigger{}) + return response, err +} + +// GetWorkRequest Retrieves the status of the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client DevopsClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, 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.getWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} + +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/GetWorkRequest" + err = common.PostProcessServiceError(err, "Devops", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// LikePullRequestComment Like a PullRequest comment +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/LikePullRequestComment.go.html to see an example of how to use LikePullRequestComment API. +// A default retry strategy applies to this operation LikePullRequestComment() +func (client DevopsClient) LikePullRequestComment(ctx context.Context, request LikePullRequestCommentRequest) (response LikePullRequestCommentResponse, 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.likePullRequestComment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = LikePullRequestCommentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = LikePullRequestCommentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(LikePullRequestCommentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into LikePullRequestCommentResponse") + } + return +} + +// likePullRequestComment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) likePullRequestComment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/comments/{commentId}/actions/like", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response LikePullRequestCommentResponse + 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/devops/20210630/PullRequest/LikePullRequestComment" + err = common.PostProcessServiceError(err, "Devops", "LikePullRequestComment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAuthors Retrieve a list of all the authors. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListAuthors.go.html to see an example of how to use ListAuthors API. +// A default retry strategy applies to this operation ListAuthors() +func (client DevopsClient) ListAuthors(ctx context.Context, request ListAuthorsRequest) (response ListAuthorsResponse, 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.listAuthors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAuthorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAuthorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAuthorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAuthorsResponse") + } + return +} + +// listAuthors implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listAuthors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/authors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListAuthorsResponse + 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/devops/20210630/Repository/ListAuthors" + err = common.PostProcessServiceError(err, "Devops", "ListAuthors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBuildPipelineStages Returns a list of all stages in a compartment or build pipeline. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildPipelineStages.go.html to see an example of how to use ListBuildPipelineStages API. +// A default retry strategy applies to this operation ListBuildPipelineStages() +func (client DevopsClient) ListBuildPipelineStages(ctx context.Context, request ListBuildPipelineStagesRequest) (response ListBuildPipelineStagesResponse, 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.listBuildPipelineStages, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBuildPipelineStagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBuildPipelineStagesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBuildPipelineStagesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBuildPipelineStagesResponse") + } + return +} + +// listBuildPipelineStages implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listBuildPipelineStages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelineStages", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListBuildPipelineStagesResponse + 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/devops/20210630/BuildPipelineStageSummary/ListBuildPipelineStages" + err = common.PostProcessServiceError(err, "Devops", "ListBuildPipelineStages", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBuildPipelines Returns a list of build pipelines. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildPipelines.go.html to see an example of how to use ListBuildPipelines API. +// A default retry strategy applies to this operation ListBuildPipelines() +func (client DevopsClient) ListBuildPipelines(ctx context.Context, request ListBuildPipelinesRequest) (response ListBuildPipelinesResponse, 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.listBuildPipelines, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBuildPipelinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBuildPipelinesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBuildPipelinesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBuildPipelinesResponse") + } + return +} + +// listBuildPipelines implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listBuildPipelines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelines", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListBuildPipelinesResponse + 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/devops/20210630/BuildPipelineCollection/ListBuildPipelines" + err = common.PostProcessServiceError(err, "Devops", "ListBuildPipelines", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBuildRunSnapshots Returns a list of build run snapshots for a given commit or the latest commit on a pull request if no commit is provided. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildRunSnapshots.go.html to see an example of how to use ListBuildRunSnapshots API. +// A default retry strategy applies to this operation ListBuildRunSnapshots() +func (client DevopsClient) ListBuildRunSnapshots(ctx context.Context, request ListBuildRunSnapshotsRequest) (response ListBuildRunSnapshotsResponse, 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.listBuildRunSnapshots, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBuildRunSnapshotsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBuildRunSnapshotsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBuildRunSnapshotsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBuildRunSnapshotsResponse") + } + return +} + +// listBuildRunSnapshots implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listBuildRunSnapshots(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/buildRunSnapshots", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListBuildRunSnapshotsResponse + 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/devops/20210630/Repository/ListBuildRunSnapshots" + err = common.PostProcessServiceError(err, "Devops", "ListBuildRunSnapshots", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBuildRuns Returns a list of build run summary. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildRuns.go.html to see an example of how to use ListBuildRuns API. +// A default retry strategy applies to this operation ListBuildRuns() +func (client DevopsClient) ListBuildRuns(ctx context.Context, request ListBuildRunsRequest) (response ListBuildRunsResponse, 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.listBuildRuns, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBuildRunsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBuildRunsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBuildRunsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBuildRunsResponse") + } + return +} + +// listBuildRuns implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listBuildRuns(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildRuns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListBuildRunsResponse + 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/devops/20210630/BuildRunSummary/ListBuildRuns" + err = common.PostProcessServiceError(err, "Devops", "ListBuildRuns", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCommitDiffs Compares two revisions and lists the differences. Supports comparison between two references or commits. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListCommitDiffs.go.html to see an example of how to use ListCommitDiffs API. +// A default retry strategy applies to this operation ListCommitDiffs() +func (client DevopsClient) ListCommitDiffs(ctx context.Context, request ListCommitDiffsRequest) (response ListCommitDiffsResponse, 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.listCommitDiffs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCommitDiffsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCommitDiffsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCommitDiffsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCommitDiffsResponse") + } + return +} + +// listCommitDiffs implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listCommitDiffs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/diffs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListCommitDiffsResponse + 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/devops/20210630/Repository/ListCommitDiffs" + err = common.PostProcessServiceError(err, "Devops", "ListCommitDiffs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCommits Returns a list of commits. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListCommits.go.html to see an example of how to use ListCommits API. +// A default retry strategy applies to this operation ListCommits() +func (client DevopsClient) ListCommits(ctx context.Context, request ListCommitsRequest) (response ListCommitsResponse, 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.listCommits, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCommitsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCommitsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCommitsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCommitsResponse") + } + return +} + +// listCommits implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listCommits(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/commits", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListCommitsResponse + 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/devops/20210630/RepositoryCommit/ListCommits" + err = common.PostProcessServiceError(err, "Devops", "ListCommits", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListConnections Returns a list of connections. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListConnections.go.html to see an example of how to use ListConnections API. +// A default retry strategy applies to this operation ListConnections() +func (client DevopsClient) ListConnections(ctx context.Context, request ListConnectionsRequest) (response ListConnectionsResponse, 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.listConnections, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListConnectionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListConnectionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListConnectionsResponse") + } + return +} + +// listConnections implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listConnections(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/connections", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListConnectionsResponse + 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/devops/20210630/ConnectionCollection/ListConnections" + err = common.PostProcessServiceError(err, "Devops", "ListConnections", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDeployArtifacts Returns a list of deployment artifacts. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployArtifacts.go.html to see an example of how to use ListDeployArtifacts API. +// A default retry strategy applies to this operation ListDeployArtifacts() +func (client DevopsClient) ListDeployArtifacts(ctx context.Context, request ListDeployArtifactsRequest) (response ListDeployArtifactsResponse, 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.listDeployArtifacts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDeployArtifactsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDeployArtifactsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDeployArtifactsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDeployArtifactsResponse") + } + return +} + +// listDeployArtifacts implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listDeployArtifacts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployArtifacts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListDeployArtifactsResponse + 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/devops/20210630/DeployArtifactSummary/ListDeployArtifacts" + err = common.PostProcessServiceError(err, "Devops", "ListDeployArtifacts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDeployEnvironments Returns a list of deployment environments. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployEnvironments.go.html to see an example of how to use ListDeployEnvironments API. +// A default retry strategy applies to this operation ListDeployEnvironments() +func (client DevopsClient) ListDeployEnvironments(ctx context.Context, request ListDeployEnvironmentsRequest) (response ListDeployEnvironmentsResponse, 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.listDeployEnvironments, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDeployEnvironmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDeployEnvironmentsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDeployEnvironmentsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetConnectionResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListDeployEnvironmentsResponse") } return } -// getConnection implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listDeployEnvironments implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listDeployEnvironments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/connections/{connectionId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployEnvironments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetConnectionResponse + var response ListDeployEnvironmentsResponse 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/devops/20210630/Connection/GetConnection" - err = common.PostProcessServiceError(err, "Devops", "GetConnection", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironmentSummary/ListDeployEnvironments" + err = common.PostProcessServiceError(err, "Devops", "ListDeployEnvironments", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &connection{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetDeployArtifact Retrieves a deployment artifact by identifier. +// ListDeployPipelines Returns a list of deployment pipelines. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployArtifact.go.html to see an example of how to use GetDeployArtifact API. -// A default retry strategy applies to this operation GetDeployArtifact() -func (client DevopsClient) GetDeployArtifact(ctx context.Context, request GetDeployArtifactRequest) (response GetDeployArtifactResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployPipelines.go.html to see an example of how to use ListDeployPipelines API. +// A default retry strategy applies to this operation ListDeployPipelines() +func (client DevopsClient) ListDeployPipelines(ctx context.Context, request ListDeployPipelinesRequest) (response ListDeployPipelinesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2168,42 +5226,42 @@ func (client DevopsClient) GetDeployArtifact(ctx context.Context, request GetDep if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getDeployArtifact, policy) + ociResponse, err = common.Retry(ctx, request, client.listDeployPipelines, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetDeployArtifactResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListDeployPipelinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetDeployArtifactResponse{} + response = ListDeployPipelinesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetDeployArtifactResponse); ok { + if convertedResponse, ok := ociResponse.(ListDeployPipelinesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDeployArtifactResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListDeployPipelinesResponse") } return } -// getDeployArtifact implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getDeployArtifact(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listDeployPipelines implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listDeployPipelines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployArtifacts/{deployArtifactId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployPipelines", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetDeployArtifactResponse + var response ListDeployPipelinesResponse 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/devops/20210630/DeployArtifact/GetDeployArtifact" - err = common.PostProcessServiceError(err, "Devops", "GetDeployArtifact", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipelineSummary/ListDeployPipelines" + err = common.PostProcessServiceError(err, "Devops", "ListDeployPipelines", apiReferenceLink) return response, err } @@ -2211,13 +5269,13 @@ func (client DevopsClient) getDeployArtifact(ctx context.Context, request common return response, err } -// GetDeployEnvironment Retrieves a deployment environment by identifier. +// ListDeployStages Retrieves a list of deployment stages. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployEnvironment.go.html to see an example of how to use GetDeployEnvironment API. -// A default retry strategy applies to this operation GetDeployEnvironment() -func (client DevopsClient) GetDeployEnvironment(ctx context.Context, request GetDeployEnvironmentRequest) (response GetDeployEnvironmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployStages.go.html to see an example of how to use ListDeployStages API. +// A default retry strategy applies to this operation ListDeployStages() +func (client DevopsClient) ListDeployStages(ctx context.Context, request ListDeployStagesRequest) (response ListDeployStagesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2226,56 +5284,56 @@ func (client DevopsClient) GetDeployEnvironment(ctx context.Context, request Get if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getDeployEnvironment, policy) + ociResponse, err = common.Retry(ctx, request, client.listDeployStages, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetDeployEnvironmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListDeployStagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetDeployEnvironmentResponse{} + response = ListDeployStagesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetDeployEnvironmentResponse); ok { + if convertedResponse, ok := ociResponse.(ListDeployStagesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDeployEnvironmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListDeployStagesResponse") } return } -// getDeployEnvironment implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getDeployEnvironment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listDeployStages implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listDeployStages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployEnvironments/{deployEnvironmentId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployStages", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetDeployEnvironmentResponse + var response ListDeployStagesResponse 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/devops/20210630/DeployEnvironment/GetDeployEnvironment" - err = common.PostProcessServiceError(err, "Devops", "GetDeployEnvironment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStageSummary/ListDeployStages" + err = common.PostProcessServiceError(err, "Devops", "ListDeployStages", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployenvironment{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetDeployPipeline Retrieves a deployment pipeline by identifier. +// ListDeployments Returns a list of deployments. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployPipeline.go.html to see an example of how to use GetDeployPipeline API. -// A default retry strategy applies to this operation GetDeployPipeline() -func (client DevopsClient) GetDeployPipeline(ctx context.Context, request GetDeployPipelineRequest) (response GetDeployPipelineResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployments.go.html to see an example of how to use ListDeployments API. +// A default retry strategy applies to this operation ListDeployments() +func (client DevopsClient) ListDeployments(ctx context.Context, request ListDeploymentsRequest) (response ListDeploymentsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2284,42 +5342,42 @@ func (client DevopsClient) GetDeployPipeline(ctx context.Context, request GetDep if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getDeployPipeline, policy) + ociResponse, err = common.Retry(ctx, request, client.listDeployments, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetDeployPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListDeploymentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetDeployPipelineResponse{} + response = ListDeploymentsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetDeployPipelineResponse); ok { + if convertedResponse, ok := ociResponse.(ListDeploymentsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDeployPipelineResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListDeploymentsResponse") } return } -// getDeployPipeline implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getDeployPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listDeployments implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listDeployments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployPipelines/{deployPipelineId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetDeployPipelineResponse + var response ListDeploymentsResponse 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/devops/20210630/DeployPipeline/GetDeployPipeline" - err = common.PostProcessServiceError(err, "Devops", "GetDeployPipeline", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeploymentSummary/ListDeployments" + err = common.PostProcessServiceError(err, "Devops", "ListDeployments", apiReferenceLink) return response, err } @@ -2327,13 +5385,13 @@ func (client DevopsClient) getDeployPipeline(ctx context.Context, request common return response, err } -// GetDeployStage Retrieves a deployment stage by identifier. +// ListForkSyncStatuses LIST operation that returns a collection of fork sync status objects. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployStage.go.html to see an example of how to use GetDeployStage API. -// A default retry strategy applies to this operation GetDeployStage() -func (client DevopsClient) GetDeployStage(ctx context.Context, request GetDeployStageRequest) (response GetDeployStageResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListForkSyncStatuses.go.html to see an example of how to use ListForkSyncStatuses API. +// A default retry strategy applies to this operation ListForkSyncStatuses() +func (client DevopsClient) ListForkSyncStatuses(ctx context.Context, request ListForkSyncStatusesRequest) (response ListForkSyncStatusesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2342,56 +5400,56 @@ func (client DevopsClient) GetDeployStage(ctx context.Context, request GetDeploy if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getDeployStage, policy) + ociResponse, err = common.Retry(ctx, request, client.listForkSyncStatuses, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetDeployStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListForkSyncStatusesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetDeployStageResponse{} + response = ListForkSyncStatusesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetDeployStageResponse); ok { + if convertedResponse, ok := ociResponse.(ListForkSyncStatusesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDeployStageResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListForkSyncStatusesResponse") } return } -// getDeployStage implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getDeployStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listForkSyncStatuses implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listForkSyncStatuses(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployStages/{deployStageId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/forkSyncStatuses", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetDeployStageResponse + var response ListForkSyncStatusesResponse 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/devops/20210630/DeployStage/GetDeployStage" - err = common.PostProcessServiceError(err, "Devops", "GetDeployStage", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListForkSyncStatuses" + err = common.PostProcessServiceError(err, "Devops", "ListForkSyncStatuses", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deploystage{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetDeployment Retrieves a deployment by identifier. +// ListMirrorRecords Returns a list of mirror entry in history within 30 days. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetDeployment.go.html to see an example of how to use GetDeployment API. -// A default retry strategy applies to this operation GetDeployment() -func (client DevopsClient) GetDeployment(ctx context.Context, request GetDeploymentRequest) (response GetDeploymentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListMirrorRecords.go.html to see an example of how to use ListMirrorRecords API. +// A default retry strategy applies to this operation ListMirrorRecords() +func (client DevopsClient) ListMirrorRecords(ctx context.Context, request ListMirrorRecordsRequest) (response ListMirrorRecordsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2400,56 +5458,56 @@ func (client DevopsClient) GetDeployment(ctx context.Context, request GetDeploym if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getDeployment, policy) + ociResponse, err = common.Retry(ctx, request, client.listMirrorRecords, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetDeploymentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMirrorRecordsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetDeploymentResponse{} + response = ListMirrorRecordsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetDeploymentResponse); ok { + if convertedResponse, ok := ociResponse.(ListMirrorRecordsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDeploymentResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMirrorRecordsResponse") } return } -// getDeployment implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getDeployment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMirrorRecords implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listMirrorRecords(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployments/{deploymentId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/mirrorRecords", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetDeploymentResponse + var response ListMirrorRecordsResponse 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/devops/20210630/Deployment/GetDeployment" - err = common.PostProcessServiceError(err, "Devops", "GetDeployment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListMirrorRecords" + err = common.PostProcessServiceError(err, "Devops", "ListMirrorRecords", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployment{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetFileDiff Gets the line-by-line difference between file on different commits. This API will be deprecated on Wed, 29 Mar 2023 01:00:00 GMT as it does not get recognized when filePath has '/'. This will be replaced by "/repositories/{repositoryId}/file/diffs" +// ListPaths Retrieves a list of files and directories in a repository. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetFileDiff.go.html to see an example of how to use GetFileDiff API. -// A default retry strategy applies to this operation GetFileDiff() -func (client DevopsClient) GetFileDiff(ctx context.Context, request GetFileDiffRequest) (response GetFileDiffResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPaths.go.html to see an example of how to use ListPaths API. +// A default retry strategy applies to this operation ListPaths() +func (client DevopsClient) ListPaths(ctx context.Context, request ListPathsRequest) (response ListPathsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2458,42 +5516,42 @@ func (client DevopsClient) GetFileDiff(ctx context.Context, request GetFileDiffR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getFileDiff, policy) + ociResponse, err = common.Retry(ctx, request, client.listPaths, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetFileDiffResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPathsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetFileDiffResponse{} + response = ListPathsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetFileDiffResponse); ok { + if convertedResponse, ok := ociResponse.(ListPathsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetFileDiffResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPathsResponse") } return } -// getFileDiff implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getFileDiff(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPaths implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPaths(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/diffs/{filePath}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/paths", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetFileDiffResponse + var response ListPathsResponse 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/devops/20210630/Repository/GetFileDiff" - err = common.PostProcessServiceError(err, "Devops", "GetFileDiff", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryPathSummary/ListPaths" + err = common.PostProcessServiceError(err, "Devops", "ListPaths", apiReferenceLink) return response, err } @@ -2501,13 +5559,13 @@ func (client DevopsClient) getFileDiff(ctx context.Context, request common.OCIRe return response, err } -// GetMirrorRecord Returns either current mirror record or last successful mirror record for a specific mirror repository. +// ListProjectCommitAnalyticsAuthors Retrieve a list of all the Commit Analytics authors. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetMirrorRecord.go.html to see an example of how to use GetMirrorRecord API. -// A default retry strategy applies to this operation GetMirrorRecord() -func (client DevopsClient) GetMirrorRecord(ctx context.Context, request GetMirrorRecordRequest) (response GetMirrorRecordResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListProjectCommitAnalyticsAuthors.go.html to see an example of how to use ListProjectCommitAnalyticsAuthors API. +// A default retry strategy applies to this operation ListProjectCommitAnalyticsAuthors() +func (client DevopsClient) ListProjectCommitAnalyticsAuthors(ctx context.Context, request ListProjectCommitAnalyticsAuthorsRequest) (response ListProjectCommitAnalyticsAuthorsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2516,42 +5574,42 @@ func (client DevopsClient) GetMirrorRecord(ctx context.Context, request GetMirro if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getMirrorRecord, policy) + ociResponse, err = common.Retry(ctx, request, client.listProjectCommitAnalyticsAuthors, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMirrorRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListProjectCommitAnalyticsAuthorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMirrorRecordResponse{} + response = ListProjectCommitAnalyticsAuthorsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMirrorRecordResponse); ok { + if convertedResponse, ok := ociResponse.(ListProjectCommitAnalyticsAuthorsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMirrorRecordResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListProjectCommitAnalyticsAuthorsResponse") } return } -// getMirrorRecord implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getMirrorRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listProjectCommitAnalyticsAuthors implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listProjectCommitAnalyticsAuthors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/mirrorRecords/{mirrorRecordType}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/projects/{projectId}/commitAnalyticsAuthors", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMirrorRecordResponse + var response ListProjectCommitAnalyticsAuthorsResponse 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/devops/20210630/Repository/GetMirrorRecord" - err = common.PostProcessServiceError(err, "Devops", "GetMirrorRecord", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListProjectCommitAnalyticsAuthors" + err = common.PostProcessServiceError(err, "Devops", "ListProjectCommitAnalyticsAuthors", apiReferenceLink) return response, err } @@ -2559,13 +5617,13 @@ func (client DevopsClient) getMirrorRecord(ctx context.Context, request common.O return response, err } -// GetObject Retrieves blob of specific branch name/commit ID and file path. +// ListProjects Returns a list of projects. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetObject.go.html to see an example of how to use GetObject API. -// A default retry strategy applies to this operation GetObject() -func (client DevopsClient) GetObject(ctx context.Context, request GetObjectRequest) (response GetObjectResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListProjects.go.html to see an example of how to use ListProjects API. +// A default retry strategy applies to this operation ListProjects() +func (client DevopsClient) ListProjects(ctx context.Context, request ListProjectsRequest) (response ListProjectsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2574,42 +5632,42 @@ func (client DevopsClient) GetObject(ctx context.Context, request GetObjectReque if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getObject, policy) + ociResponse, err = common.Retry(ctx, request, client.listProjects, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListProjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetObjectResponse{} + response = ListProjectsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetObjectResponse); ok { + if convertedResponse, ok := ociResponse.(ListProjectsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetObjectResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListProjectsResponse") } return } -// getObject implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listProjects implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listProjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/object", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/projects", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetObjectResponse + var response ListProjectsResponse 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/devops/20210630/RepositoryObject/GetObject" - err = common.PostProcessServiceError(err, "Devops", "GetObject", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectSummary/ListProjects" + err = common.PostProcessServiceError(err, "Devops", "ListProjects", apiReferenceLink) return response, err } @@ -2617,13 +5675,13 @@ func (client DevopsClient) getObject(ctx context.Context, request common.OCIRequ return response, err } -// GetObjectContent Retrieve contents of a specified object. +// ListProtectedBranches Returns a list of Protected Branches. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetObjectContent.go.html to see an example of how to use GetObjectContent API. -// A default retry strategy applies to this operation GetObjectContent() -func (client DevopsClient) GetObjectContent(ctx context.Context, request GetObjectContentRequest) (response GetObjectContentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListProtectedBranches.go.html to see an example of how to use ListProtectedBranches API. +// A default retry strategy applies to this operation ListProtectedBranches() +func (client DevopsClient) ListProtectedBranches(ctx context.Context, request ListProtectedBranchesRequest) (response ListProtectedBranchesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2632,41 +5690,42 @@ func (client DevopsClient) GetObjectContent(ctx context.Context, request GetObje if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getObjectContent, policy) + ociResponse, err = common.Retry(ctx, request, client.listProtectedBranches, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetObjectContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListProtectedBranchesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetObjectContentResponse{} + response = ListProtectedBranchesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetObjectContentResponse); ok { + if convertedResponse, ok := ociResponse.(ListProtectedBranchesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetObjectContentResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListProtectedBranchesResponse") } return } -// getObjectContent implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getObjectContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listProtectedBranches implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listProtectedBranches(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/objects/{sha}/content", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/protectedBranches", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetObjectContentResponse + var response ListProtectedBranchesResponse 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/devops/20210630/Repository/GetObjectContent" - err = common.PostProcessServiceError(err, "Devops", "GetObjectContent", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranchCollection/ListProtectedBranches" + err = common.PostProcessServiceError(err, "Devops", "ListProtectedBranches", apiReferenceLink) return response, err } @@ -2674,13 +5733,13 @@ func (client DevopsClient) getObjectContent(ctx context.Context, request common. return response, err } -// GetProject Retrieves a project by identifier. +// ListPullRequestActivities List actions that have been taken on a pull request // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetProject.go.html to see an example of how to use GetProject API. -// A default retry strategy applies to this operation GetProject() -func (client DevopsClient) GetProject(ctx context.Context, request GetProjectRequest) (response GetProjectResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestActivities.go.html to see an example of how to use ListPullRequestActivities API. +// A default retry strategy applies to this operation ListPullRequestActivities() +func (client DevopsClient) ListPullRequestActivities(ctx context.Context, request ListPullRequestActivitiesRequest) (response ListPullRequestActivitiesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2689,42 +5748,42 @@ func (client DevopsClient) GetProject(ctx context.Context, request GetProjectReq if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getProject, policy) + ociResponse, err = common.Retry(ctx, request, client.listPullRequestActivities, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPullRequestActivitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetProjectResponse{} + response = ListPullRequestActivitiesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetProjectResponse); ok { + if convertedResponse, ok := ociResponse.(ListPullRequestActivitiesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetProjectResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPullRequestActivitiesResponse") } return } -// getProject implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPullRequestActivities implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPullRequestActivities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/projects/{projectId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/activities", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetProjectResponse + var response ListPullRequestActivitiesResponse 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/devops/20210630/Project/GetProject" - err = common.PostProcessServiceError(err, "Devops", "GetProject", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestActivities" + err = common.PostProcessServiceError(err, "Devops", "ListPullRequestActivities", apiReferenceLink) return response, err } @@ -2732,13 +5791,13 @@ func (client DevopsClient) getProject(ctx context.Context, request common.OCIReq return response, err } -// GetRef This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by "/repositories/{repositoryId}/refs". Retrieves a repository's reference by its name with preference for branches over tags if the name is ambiguous. This can be disambiguated by using full names like "heads/" or "tags/". +// ListPullRequestAttachments List PullRequest level attachments by identifier // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRef.go.html to see an example of how to use GetRef API. -// A default retry strategy applies to this operation GetRef() -func (client DevopsClient) GetRef(ctx context.Context, request GetRefRequest) (response GetRefResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestAttachments.go.html to see an example of how to use ListPullRequestAttachments API. +// A default retry strategy applies to this operation ListPullRequestAttachments() +func (client DevopsClient) ListPullRequestAttachments(ctx context.Context, request ListPullRequestAttachmentsRequest) (response ListPullRequestAttachmentsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2747,56 +5806,56 @@ func (client DevopsClient) GetRef(ctx context.Context, request GetRefRequest) (r if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getRef, policy) + ociResponse, err = common.Retry(ctx, request, client.listPullRequestAttachments, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPullRequestAttachmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetRefResponse{} + response = ListPullRequestAttachmentsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetRefResponse); ok { + if convertedResponse, ok := ociResponse.(ListPullRequestAttachmentsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetRefResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPullRequestAttachmentsResponse") } return } -// getRef implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPullRequestAttachments implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPullRequestAttachments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/refs/{refName}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/attachments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetRefResponse + var response ListPullRequestAttachmentsResponse 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/devops/20210630/Repository/GetRef" - err = common.PostProcessServiceError(err, "Devops", "GetRef", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestAttachments" + err = common.PostProcessServiceError(err, "Devops", "ListPullRequestAttachments", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &repositoryref{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetRepoFileDiff Gets the line-by-line difference between file on different commits. +// ListPullRequestAuthors Retrieve a list of all the PR authors. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepoFileDiff.go.html to see an example of how to use GetRepoFileDiff API. -// A default retry strategy applies to this operation GetRepoFileDiff() -func (client DevopsClient) GetRepoFileDiff(ctx context.Context, request GetRepoFileDiffRequest) (response GetRepoFileDiffResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestAuthors.go.html to see an example of how to use ListPullRequestAuthors API. +// A default retry strategy applies to this operation ListPullRequestAuthors() +func (client DevopsClient) ListPullRequestAuthors(ctx context.Context, request ListPullRequestAuthorsRequest) (response ListPullRequestAuthorsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2805,42 +5864,42 @@ func (client DevopsClient) GetRepoFileDiff(ctx context.Context, request GetRepoF if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getRepoFileDiff, policy) + ociResponse, err = common.Retry(ctx, request, client.listPullRequestAuthors, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetRepoFileDiffResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPullRequestAuthorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetRepoFileDiffResponse{} + response = ListPullRequestAuthorsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetRepoFileDiffResponse); ok { + if convertedResponse, ok := ociResponse.(ListPullRequestAuthorsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetRepoFileDiffResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPullRequestAuthorsResponse") } return } -// getRepoFileDiff implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getRepoFileDiff(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPullRequestAuthors implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPullRequestAuthors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/file/diffs", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/pullRequestAuthors", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetRepoFileDiffResponse + var response ListPullRequestAuthorsResponse 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/devops/20210630/Repository/GetRepoFileDiff" - err = common.PostProcessServiceError(err, "Devops", "GetRepoFileDiff", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListPullRequestAuthors" + err = common.PostProcessServiceError(err, "Devops", "ListPullRequestAuthors", apiReferenceLink) return response, err } @@ -2848,13 +5907,13 @@ func (client DevopsClient) getRepoFileDiff(ctx context.Context, request common.O return response, err } -// GetRepoFileLines Retrieve lines of a specified file. Supports starting line number and limit. +// ListPullRequestComments List PullRequest level comments by identifier // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepoFileLines.go.html to see an example of how to use GetRepoFileLines API. -// A default retry strategy applies to this operation GetRepoFileLines() -func (client DevopsClient) GetRepoFileLines(ctx context.Context, request GetRepoFileLinesRequest) (response GetRepoFileLinesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestComments.go.html to see an example of how to use ListPullRequestComments API. +// A default retry strategy applies to this operation ListPullRequestComments() +func (client DevopsClient) ListPullRequestComments(ctx context.Context, request ListPullRequestCommentsRequest) (response ListPullRequestCommentsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2863,42 +5922,42 @@ func (client DevopsClient) GetRepoFileLines(ctx context.Context, request GetRepo if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getRepoFileLines, policy) + ociResponse, err = common.Retry(ctx, request, client.listPullRequestComments, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetRepoFileLinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPullRequestCommentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetRepoFileLinesResponse{} + response = ListPullRequestCommentsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetRepoFileLinesResponse); ok { + if convertedResponse, ok := ociResponse.(ListPullRequestCommentsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetRepoFileLinesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPullRequestCommentsResponse") } return } -// getRepoFileLines implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getRepoFileLines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPullRequestComments implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPullRequestComments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/file/lines", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/comments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetRepoFileLinesResponse + var response ListPullRequestCommentsResponse 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/devops/20210630/Repository/GetRepoFileLines" - err = common.PostProcessServiceError(err, "Devops", "GetRepoFileLines", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestComments" + err = common.PostProcessServiceError(err, "Devops", "ListPullRequestComments", apiReferenceLink) return response, err } @@ -2906,13 +5965,13 @@ func (client DevopsClient) getRepoFileLines(ctx context.Context, request common. return response, err } -// GetRepository Retrieves a repository by identifier. +// ListPullRequestCommits List pull request commits // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepository.go.html to see an example of how to use GetRepository API. -// A default retry strategy applies to this operation GetRepository() -func (client DevopsClient) GetRepository(ctx context.Context, request GetRepositoryRequest) (response GetRepositoryResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestCommits.go.html to see an example of how to use ListPullRequestCommits API. +// A default retry strategy applies to this operation ListPullRequestCommits() +func (client DevopsClient) ListPullRequestCommits(ctx context.Context, request ListPullRequestCommitsRequest) (response ListPullRequestCommitsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2921,42 +5980,42 @@ func (client DevopsClient) GetRepository(ctx context.Context, request GetReposit if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getRepository, policy) + ociResponse, err = common.Retry(ctx, request, client.listPullRequestCommits, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPullRequestCommitsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetRepositoryResponse{} + response = ListPullRequestCommitsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetRepositoryResponse); ok { + if convertedResponse, ok := ociResponse.(ListPullRequestCommitsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetRepositoryResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPullRequestCommitsResponse") } return } -// getRepository implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPullRequestCommits implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPullRequestCommits(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/commits", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetRepositoryResponse + var response ListPullRequestCommitsResponse 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/devops/20210630/Repository/GetRepository" - err = common.PostProcessServiceError(err, "Devops", "GetRepository", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestCommits" + err = common.PostProcessServiceError(err, "Devops", "ListPullRequestCommits", apiReferenceLink) return response, err } @@ -2964,13 +6023,13 @@ func (client DevopsClient) getRepository(ctx context.Context, request common.OCI return response, err } -// GetRepositoryArchiveContent Returns the archived repository information. +// ListPullRequestFileChanges List pull request file changes // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositoryArchiveContent.go.html to see an example of how to use GetRepositoryArchiveContent API. -// A default retry strategy applies to this operation GetRepositoryArchiveContent() -func (client DevopsClient) GetRepositoryArchiveContent(ctx context.Context, request GetRepositoryArchiveContentRequest) (response GetRepositoryArchiveContentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestFileChanges.go.html to see an example of how to use ListPullRequestFileChanges API. +// A default retry strategy applies to this operation ListPullRequestFileChanges() +func (client DevopsClient) ListPullRequestFileChanges(ctx context.Context, request ListPullRequestFileChangesRequest) (response ListPullRequestFileChangesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2979,41 +6038,42 @@ func (client DevopsClient) GetRepositoryArchiveContent(ctx context.Context, requ if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getRepositoryArchiveContent, policy) + ociResponse, err = common.Retry(ctx, request, client.listPullRequestFileChanges, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetRepositoryArchiveContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPullRequestFileChangesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetRepositoryArchiveContentResponse{} + response = ListPullRequestFileChangesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetRepositoryArchiveContentResponse); ok { + if convertedResponse, ok := ociResponse.(ListPullRequestFileChangesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetRepositoryArchiveContentResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPullRequestFileChangesResponse") } return } -// getRepositoryArchiveContent implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getRepositoryArchiveContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPullRequestFileChanges implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPullRequestFileChanges(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/archive/content", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/fileChanges", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetRepositoryArchiveContentResponse + var response ListPullRequestFileChangesResponse 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/devops/20210630/Repository/GetRepositoryArchiveContent" - err = common.PostProcessServiceError(err, "Devops", "GetRepositoryArchiveContent", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestFileChanges" + err = common.PostProcessServiceError(err, "Devops", "ListPullRequestFileChanges", apiReferenceLink) return response, err } @@ -3021,13 +6081,13 @@ func (client DevopsClient) getRepositoryArchiveContent(ctx context.Context, requ return response, err } -// GetRepositoryFileLines Retrieve lines of a specified file. Supports starting line number and limit. This API will be deprecated on Wed, 29 Mar 2023 01:00:00 GMT as it does not get recognized when filePath has '/'. This will be replaced by "/repositories/{repositoryId}/file/lines" +// ListPullRequests Returns a list of PullRequests. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositoryFileLines.go.html to see an example of how to use GetRepositoryFileLines API. -// A default retry strategy applies to this operation GetRepositoryFileLines() -func (client DevopsClient) GetRepositoryFileLines(ctx context.Context, request GetRepositoryFileLinesRequest) (response GetRepositoryFileLinesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequests.go.html to see an example of how to use ListPullRequests API. +// A default retry strategy applies to this operation ListPullRequests() +func (client DevopsClient) ListPullRequests(ctx context.Context, request ListPullRequestsRequest) (response ListPullRequestsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3036,42 +6096,42 @@ func (client DevopsClient) GetRepositoryFileLines(ctx context.Context, request G if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getRepositoryFileLines, policy) + ociResponse, err = common.Retry(ctx, request, client.listPullRequests, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetRepositoryFileLinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPullRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetRepositoryFileLinesResponse{} + response = ListPullRequestsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetRepositoryFileLinesResponse); ok { + if convertedResponse, ok := ociResponse.(ListPullRequestsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetRepositoryFileLinesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPullRequestsResponse") } return } -// getRepositoryFileLines implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getRepositoryFileLines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPullRequests implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listPullRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/files/{filePath}/lines", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetRepositoryFileLinesResponse + var response ListPullRequestsResponse 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/devops/20210630/Repository/GetRepositoryFileLines" - err = common.PostProcessServiceError(err, "Devops", "GetRepositoryFileLines", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestCollection/ListPullRequests" + err = common.PostProcessServiceError(err, "Devops", "ListPullRequests", apiReferenceLink) return response, err } @@ -3079,13 +6139,13 @@ func (client DevopsClient) getRepositoryFileLines(ctx context.Context, request c return response, err } -// GetTrigger Retrieves a trigger by identifier. +// ListRefs Returns a list of references. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetTrigger.go.html to see an example of how to use GetTrigger API. -// A default retry strategy applies to this operation GetTrigger() -func (client DevopsClient) GetTrigger(ctx context.Context, request GetTriggerRequest) (response GetTriggerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListRefs.go.html to see an example of how to use ListRefs API. +// A default retry strategy applies to this operation ListRefs() +func (client DevopsClient) ListRefs(ctx context.Context, request ListRefsRequest) (response ListRefsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3094,56 +6154,56 @@ func (client DevopsClient) GetTrigger(ctx context.Context, request GetTriggerReq if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getTrigger, policy) + ociResponse, err = common.Retry(ctx, request, client.listRefs, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetTriggerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListRefsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetTriggerResponse{} + response = ListRefsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetTriggerResponse); ok { + if convertedResponse, ok := ociResponse.(ListRefsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetTriggerResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListRefsResponse") } return } -// getTrigger implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getTrigger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listRefs implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listRefs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/triggers/{triggerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/refs", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetTriggerResponse + var response ListRefsResponse 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/devops/20210630/Trigger/GetTrigger" - err = common.PostProcessServiceError(err, "Devops", "GetTrigger", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryRef/ListRefs" + err = common.PostProcessServiceError(err, "Devops", "ListRefs", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &trigger{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetWorkRequest Retrieves the status of the work request with the given ID. +// ListRepositories Returns a list of repositories given a compartment ID or a project ID. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. -// A default retry strategy applies to this operation GetWorkRequest() -func (client DevopsClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListRepositories.go.html to see an example of how to use ListRepositories API. +// A default retry strategy applies to this operation ListRepositories() +func (client DevopsClient) ListRepositories(ctx context.Context, request ListRepositoriesRequest) (response ListRepositoriesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3152,42 +6212,42 @@ func (client DevopsClient) GetWorkRequest(ctx context.Context, request GetWorkRe if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) + ociResponse, err = common.Retry(ctx, request, client.listRepositories, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListRepositoriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetWorkRequestResponse{} + response = ListRepositoriesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + if convertedResponse, ok := ociResponse.(ListRepositoriesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListRepositoriesResponse") } return } -// getWorkRequest implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listRepositories implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listRepositories(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetWorkRequestResponse + var response ListRepositoriesResponse 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/devops/20210630/WorkRequest/GetWorkRequest" - err = common.PostProcessServiceError(err, "Devops", "GetWorkRequest", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositories" + err = common.PostProcessServiceError(err, "Devops", "ListRepositories", apiReferenceLink) return response, err } @@ -3195,13 +6255,13 @@ func (client DevopsClient) getWorkRequest(ctx context.Context, request common.OC return response, err } -// ListAuthors Retrieve a list of all the authors. +// ListRepositoryCommitAnalyticsAuthors Retrieve a list of all the Commit Analytics authors. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListAuthors.go.html to see an example of how to use ListAuthors API. -// A default retry strategy applies to this operation ListAuthors() -func (client DevopsClient) ListAuthors(ctx context.Context, request ListAuthorsRequest) (response ListAuthorsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListRepositoryCommitAnalyticsAuthors.go.html to see an example of how to use ListRepositoryCommitAnalyticsAuthors API. +// A default retry strategy applies to this operation ListRepositoryCommitAnalyticsAuthors() +func (client DevopsClient) ListRepositoryCommitAnalyticsAuthors(ctx context.Context, request ListRepositoryCommitAnalyticsAuthorsRequest) (response ListRepositoryCommitAnalyticsAuthorsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3210,42 +6270,42 @@ func (client DevopsClient) ListAuthors(ctx context.Context, request ListAuthorsR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listAuthors, policy) + ociResponse, err = common.Retry(ctx, request, client.listRepositoryCommitAnalyticsAuthors, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAuthorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListRepositoryCommitAnalyticsAuthorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAuthorsResponse{} + response = ListRepositoryCommitAnalyticsAuthorsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAuthorsResponse); ok { + if convertedResponse, ok := ociResponse.(ListRepositoryCommitAnalyticsAuthorsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAuthorsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListRepositoryCommitAnalyticsAuthorsResponse") } return } -// listAuthors implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listAuthors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listRepositoryCommitAnalyticsAuthors implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listRepositoryCommitAnalyticsAuthors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/authors", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/commitAnalyticsAuthors", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAuthorsResponse + var response ListRepositoryCommitAnalyticsAuthorsResponse 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/devops/20210630/Repository/ListAuthors" - err = common.PostProcessServiceError(err, "Devops", "ListAuthors", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositoryCommitAnalyticsAuthors" + err = common.PostProcessServiceError(err, "Devops", "ListRepositoryCommitAnalyticsAuthors", apiReferenceLink) return response, err } @@ -3253,13 +6313,13 @@ func (client DevopsClient) listAuthors(ctx context.Context, request common.OCIRe return response, err } -// ListBuildPipelineStages Returns a list of all stages in a compartment or build pipeline. +// ListTriggers Returns a list of triggers. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildPipelineStages.go.html to see an example of how to use ListBuildPipelineStages API. -// A default retry strategy applies to this operation ListBuildPipelineStages() -func (client DevopsClient) ListBuildPipelineStages(ctx context.Context, request ListBuildPipelineStagesRequest) (response ListBuildPipelineStagesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListTriggers.go.html to see an example of how to use ListTriggers API. +// A default retry strategy applies to this operation ListTriggers() +func (client DevopsClient) ListTriggers(ctx context.Context, request ListTriggersRequest) (response ListTriggersResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3268,42 +6328,42 @@ func (client DevopsClient) ListBuildPipelineStages(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listBuildPipelineStages, policy) + ociResponse, err = common.Retry(ctx, request, client.listTriggers, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListBuildPipelineStagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListTriggersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListBuildPipelineStagesResponse{} + response = ListTriggersResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListBuildPipelineStagesResponse); ok { + if convertedResponse, ok := ociResponse.(ListTriggersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListBuildPipelineStagesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListTriggersResponse") } return } -// listBuildPipelineStages implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listBuildPipelineStages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listTriggers implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listTriggers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelineStages", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/triggers", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListBuildPipelineStagesResponse + var response ListTriggersResponse 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/devops/20210630/BuildPipelineStageSummary/ListBuildPipelineStages" - err = common.PostProcessServiceError(err, "Devops", "ListBuildPipelineStages", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/TriggerCollection/ListTriggers" + err = common.PostProcessServiceError(err, "Devops", "ListTriggers", apiReferenceLink) return response, err } @@ -3311,13 +6371,13 @@ func (client DevopsClient) listBuildPipelineStages(ctx context.Context, request return response, err } -// ListBuildPipelines Returns a list of build pipelines. +// ListWorkRequestErrors Returns a list of errors for a given work request. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildPipelines.go.html to see an example of how to use ListBuildPipelines API. -// A default retry strategy applies to this operation ListBuildPipelines() -func (client DevopsClient) ListBuildPipelines(ctx context.Context, request ListBuildPipelinesRequest) (response ListBuildPipelinesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client DevopsClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3326,42 +6386,42 @@ func (client DevopsClient) ListBuildPipelines(ctx context.Context, request ListB if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listBuildPipelines, policy) + 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 = ListBuildPipelinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListBuildPipelinesResponse{} + response = ListWorkRequestErrorsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListBuildPipelinesResponse); ok { + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListBuildPipelinesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") } return } -// listBuildPipelines implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listBuildPipelines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildPipelines", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListBuildPipelinesResponse + 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/devops/20210630/BuildPipelineCollection/ListBuildPipelines" - err = common.PostProcessServiceError(err, "Devops", "ListBuildPipelines", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestError/ListWorkRequestErrors" + err = common.PostProcessServiceError(err, "Devops", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -3369,13 +6429,13 @@ func (client DevopsClient) listBuildPipelines(ctx context.Context, request commo return response, err } -// ListBuildRuns Returns a list of build run summary. +// ListWorkRequestLogs Returns a list of logs for a given work request. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildRuns.go.html to see an example of how to use ListBuildRuns API. -// A default retry strategy applies to this operation ListBuildRuns() -func (client DevopsClient) ListBuildRuns(ctx context.Context, request ListBuildRunsRequest) (response ListBuildRunsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client DevopsClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3384,42 +6444,42 @@ func (client DevopsClient) ListBuildRuns(ctx context.Context, request ListBuildR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listBuildRuns, policy) + 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 = ListBuildRunsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListBuildRunsResponse{} + response = ListWorkRequestLogsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListBuildRunsResponse); ok { + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListBuildRunsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") } return } -// listBuildRuns implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listBuildRuns(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/buildRuns", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListBuildRunsResponse + 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/devops/20210630/BuildRunSummary/ListBuildRuns" - err = common.PostProcessServiceError(err, "Devops", "ListBuildRuns", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestLogEntry/ListWorkRequestLogs" + err = common.PostProcessServiceError(err, "Devops", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -3427,13 +6487,13 @@ func (client DevopsClient) listBuildRuns(ctx context.Context, request common.OCI return response, err } -// ListCommitDiffs Compares two revisions and lists the differences. Supports comparison between two references or commits. +// ListWorkRequests Lists the work requests in a compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListCommitDiffs.go.html to see an example of how to use ListCommitDiffs API. -// A default retry strategy applies to this operation ListCommitDiffs() -func (client DevopsClient) ListCommitDiffs(ctx context.Context, request ListCommitDiffsRequest) (response ListCommitDiffsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client DevopsClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3442,42 +6502,42 @@ func (client DevopsClient) ListCommitDiffs(ctx context.Context, request ListComm if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listCommitDiffs, policy) + 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 = ListCommitDiffsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListCommitDiffsResponse{} + response = ListWorkRequestsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListCommitDiffsResponse); ok { + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListCommitDiffsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") } return } -// listCommitDiffs implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listCommitDiffs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/diffs", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListCommitDiffsResponse + 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/devops/20210630/Repository/ListCommitDiffs" - err = common.PostProcessServiceError(err, "Devops", "ListCommitDiffs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/ListWorkRequests" + err = common.PostProcessServiceError(err, "Devops", "ListWorkRequests", apiReferenceLink) return response, err } @@ -3485,13 +6545,13 @@ func (client DevopsClient) listCommitDiffs(ctx context.Context, request common.O return response, err } -// ListCommits Returns a list of commits. +// MergePullRequest Merge the PullRequest // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListCommits.go.html to see an example of how to use ListCommits API. -// A default retry strategy applies to this operation ListCommits() -func (client DevopsClient) ListCommits(ctx context.Context, request ListCommitsRequest) (response ListCommitsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/MergePullRequest.go.html to see an example of how to use MergePullRequest API. +// A default retry strategy applies to this operation MergePullRequest() +func (client DevopsClient) MergePullRequest(ctx context.Context, request MergePullRequestRequest) (response MergePullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3500,42 +6560,47 @@ func (client DevopsClient) ListCommits(ctx context.Context, request ListCommitsR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listCommits, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.mergePullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListCommitsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = MergePullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListCommitsResponse{} + response = MergePullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListCommitsResponse); ok { + if convertedResponse, ok := ociResponse.(MergePullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListCommitsResponse") + err = fmt.Errorf("failed to convert OCIResponse into MergePullRequestResponse") } return } -// listCommits implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listCommits(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// mergePullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) mergePullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/commits", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/actions/merge", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListCommitsResponse + var response MergePullRequestResponse 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/devops/20210630/RepositoryCommit/ListCommits" - err = common.PostProcessServiceError(err, "Devops", "ListCommits", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/MergePullRequest" + err = common.PostProcessServiceError(err, "Devops", "MergePullRequest", apiReferenceLink) return response, err } @@ -3543,13 +6608,13 @@ func (client DevopsClient) listCommits(ctx context.Context, request common.OCIRe return response, err } -// ListConnections Returns a list of connections. +// MirrorRepository Synchronize a mirrored repository to the latest version from external providers. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListConnections.go.html to see an example of how to use ListConnections API. -// A default retry strategy applies to this operation ListConnections() -func (client DevopsClient) ListConnections(ctx context.Context, request ListConnectionsRequest) (response ListConnectionsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/MirrorRepository.go.html to see an example of how to use MirrorRepository API. +// A default retry strategy applies to this operation MirrorRepository() +func (client DevopsClient) MirrorRepository(ctx context.Context, request MirrorRepositoryRequest) (response MirrorRepositoryResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3558,42 +6623,42 @@ func (client DevopsClient) ListConnections(ctx context.Context, request ListConn if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listConnections, policy) + ociResponse, err = common.Retry(ctx, request, client.mirrorRepository, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListConnectionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = MirrorRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListConnectionsResponse{} + response = MirrorRepositoryResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListConnectionsResponse); ok { + if convertedResponse, ok := ociResponse.(MirrorRepositoryResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListConnectionsResponse") + err = fmt.Errorf("failed to convert OCIResponse into MirrorRepositoryResponse") } return } -// listConnections implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listConnections(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// mirrorRepository implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) mirrorRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/connections", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories/{repositoryId}/actions/mirror", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListConnectionsResponse + var response MirrorRepositoryResponse 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/devops/20210630/ConnectionCollection/ListConnections" - err = common.PostProcessServiceError(err, "Devops", "ListConnections", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/MirrorRepository" + err = common.PostProcessServiceError(err, "Devops", "MirrorRepository", apiReferenceLink) return response, err } @@ -3601,13 +6666,13 @@ func (client DevopsClient) listConnections(ctx context.Context, request common.O return response, err } -// ListDeployArtifacts Returns a list of deployment artifacts. +// PatchPullRequest Updates the reviewer list of a pull request // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployArtifacts.go.html to see an example of how to use ListDeployArtifacts API. -// A default retry strategy applies to this operation ListDeployArtifacts() -func (client DevopsClient) ListDeployArtifacts(ctx context.Context, request ListDeployArtifactsRequest) (response ListDeployArtifactsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/PatchPullRequest.go.html to see an example of how to use PatchPullRequest API. +// A default retry strategy applies to this operation PatchPullRequest() +func (client DevopsClient) PatchPullRequest(ctx context.Context, request PatchPullRequestRequest) (response PatchPullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3616,42 +6681,42 @@ func (client DevopsClient) ListDeployArtifacts(ctx context.Context, request List if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listDeployArtifacts, policy) + ociResponse, err = common.Retry(ctx, request, client.patchPullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDeployArtifactsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchPullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDeployArtifactsResponse{} + response = PatchPullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDeployArtifactsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchPullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDeployArtifactsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchPullRequestResponse") } return } -// listDeployArtifacts implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listDeployArtifacts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchPullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) patchPullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployArtifacts", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/pullRequests/{pullRequestId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDeployArtifactsResponse + var response PatchPullRequestResponse 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/devops/20210630/DeployArtifactSummary/ListDeployArtifacts" - err = common.PostProcessServiceError(err, "Devops", "ListDeployArtifacts", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/PatchPullRequest" + err = common.PostProcessServiceError(err, "Devops", "PatchPullRequest", apiReferenceLink) return response, err } @@ -3659,13 +6724,13 @@ func (client DevopsClient) listDeployArtifacts(ctx context.Context, request comm return response, err } -// ListDeployEnvironments Returns a list of deployment environments. +// PutRepositoryRef Creates a new reference or updates an existing one. This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by "/repositories/{repositoryId}/actions/createOrUpdateGitRef". // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployEnvironments.go.html to see an example of how to use ListDeployEnvironments API. -// A default retry strategy applies to this operation ListDeployEnvironments() -func (client DevopsClient) ListDeployEnvironments(ctx context.Context, request ListDeployEnvironmentsRequest) (response ListDeployEnvironmentsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/PutRepositoryRef.go.html to see an example of how to use PutRepositoryRef API. +// A default retry strategy applies to this operation PutRepositoryRef() +func (client DevopsClient) PutRepositoryRef(ctx context.Context, request PutRepositoryRefRequest) (response PutRepositoryRefResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3674,56 +6739,61 @@ func (client DevopsClient) ListDeployEnvironments(ctx context.Context, request L if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listDeployEnvironments, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.putRepositoryRef, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDeployEnvironmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutRepositoryRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDeployEnvironmentsResponse{} + response = PutRepositoryRefResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDeployEnvironmentsResponse); ok { + if convertedResponse, ok := ociResponse.(PutRepositoryRefResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDeployEnvironmentsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutRepositoryRefResponse") } return } -// listDeployEnvironments implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listDeployEnvironments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putRepositoryRef implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) putRepositoryRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployEnvironments", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/repositories/{repositoryId}/refs/{refName}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDeployEnvironmentsResponse + var response PutRepositoryRefResponse 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/devops/20210630/DeployEnvironmentSummary/ListDeployEnvironments" - err = common.PostProcessServiceError(err, "Devops", "ListDeployEnvironments", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/PutRepositoryRef" + err = common.PostProcessServiceError(err, "Devops", "PutRepositoryRef", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &repositoryref{}) return response, err } -// ListDeployPipelines Returns a list of deployment pipelines. +// ReopenPullRequest Reopen a PullRequest // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployPipelines.go.html to see an example of how to use ListDeployPipelines API. -// A default retry strategy applies to this operation ListDeployPipelines() -func (client DevopsClient) ListDeployPipelines(ctx context.Context, request ListDeployPipelinesRequest) (response ListDeployPipelinesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ReopenPullRequest.go.html to see an example of how to use ReopenPullRequest API. +// A default retry strategy applies to this operation ReopenPullRequest() +func (client DevopsClient) ReopenPullRequest(ctx context.Context, request ReopenPullRequestRequest) (response ReopenPullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3732,42 +6802,42 @@ func (client DevopsClient) ListDeployPipelines(ctx context.Context, request List if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listDeployPipelines, policy) + ociResponse, err = common.Retry(ctx, request, client.reopenPullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDeployPipelinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ReopenPullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDeployPipelinesResponse{} + response = ReopenPullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDeployPipelinesResponse); ok { + if convertedResponse, ok := ociResponse.(ReopenPullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDeployPipelinesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ReopenPullRequestResponse") } return } -// listDeployPipelines implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listDeployPipelines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// reopenPullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) reopenPullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployPipelines", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/actions/reopen", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDeployPipelinesResponse + var response ReopenPullRequestResponse 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/devops/20210630/DeployPipelineSummary/ListDeployPipelines" - err = common.PostProcessServiceError(err, "Devops", "ListDeployPipelines", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ReopenPullRequest" + err = common.PostProcessServiceError(err, "Devops", "ReopenPullRequest", apiReferenceLink) return response, err } @@ -3775,13 +6845,13 @@ func (client DevopsClient) listDeployPipelines(ctx context.Context, request comm return response, err } -// ListDeployStages Retrieves a list of deployment stages. +// ReviewPullRequest Review a PullRequest // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployStages.go.html to see an example of how to use ListDeployStages API. -// A default retry strategy applies to this operation ListDeployStages() -func (client DevopsClient) ListDeployStages(ctx context.Context, request ListDeployStagesRequest) (response ListDeployStagesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ReviewPullRequest.go.html to see an example of how to use ReviewPullRequest API. +// A default retry strategy applies to this operation ReviewPullRequest() +func (client DevopsClient) ReviewPullRequest(ctx context.Context, request ReviewPullRequestRequest) (response ReviewPullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3790,42 +6860,47 @@ func (client DevopsClient) ListDeployStages(ctx context.Context, request ListDep if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listDeployStages, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.reviewPullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDeployStagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ReviewPullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDeployStagesResponse{} + response = ReviewPullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDeployStagesResponse); ok { + if convertedResponse, ok := ociResponse.(ReviewPullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDeployStagesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ReviewPullRequestResponse") } return } -// listDeployStages implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listDeployStages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// reviewPullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) reviewPullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployStages", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/actions/review", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDeployStagesResponse + var response ReviewPullRequestResponse 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/devops/20210630/DeployStageSummary/ListDeployStages" - err = common.PostProcessServiceError(err, "Devops", "ListDeployStages", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ReviewPullRequest" + err = common.PostProcessServiceError(err, "Devops", "ReviewPullRequest", apiReferenceLink) return response, err } @@ -3833,13 +6908,13 @@ func (client DevopsClient) listDeployStages(ctx context.Context, request common. return response, err } -// ListDeployments Returns a list of deployments. +// ScheduleCascadingProjectDeletion Cascading operation that marks Project and child DevOps resources in a DELETING state for a retention period // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListDeployments.go.html to see an example of how to use ListDeployments API. -// A default retry strategy applies to this operation ListDeployments() -func (client DevopsClient) ListDeployments(ctx context.Context, request ListDeploymentsRequest) (response ListDeploymentsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ScheduleCascadingProjectDeletion.go.html to see an example of how to use ScheduleCascadingProjectDeletion API. +// A default retry strategy applies to this operation ScheduleCascadingProjectDeletion() +func (client DevopsClient) ScheduleCascadingProjectDeletion(ctx context.Context, request ScheduleCascadingProjectDeletionRequest) (response ScheduleCascadingProjectDeletionResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3848,42 +6923,47 @@ func (client DevopsClient) ListDeployments(ctx context.Context, request ListDepl if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listDeployments, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.scheduleCascadingProjectDeletion, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDeploymentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ScheduleCascadingProjectDeletionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDeploymentsResponse{} + response = ScheduleCascadingProjectDeletionResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDeploymentsResponse); ok { + if convertedResponse, ok := ociResponse.(ScheduleCascadingProjectDeletionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDeploymentsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ScheduleCascadingProjectDeletionResponse") } return } -// listDeployments implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listDeployments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// scheduleCascadingProjectDeletion implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) scheduleCascadingProjectDeletion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/deployments", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/projects/{projectId}/actions/scheduleCascadingProjectDeletion", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDeploymentsResponse + var response ScheduleCascadingProjectDeletionResponse 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/devops/20210630/DeploymentSummary/ListDeployments" - err = common.PostProcessServiceError(err, "Devops", "ListDeployments", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/ScheduleCascadingProjectDeletion" + err = common.PostProcessServiceError(err, "Devops", "ScheduleCascadingProjectDeletion", apiReferenceLink) return response, err } @@ -3891,13 +6971,13 @@ func (client DevopsClient) listDeployments(ctx context.Context, request common.O return response, err } -// ListMirrorRecords Returns a list of mirror entry in history within 30 days. +// SummarizeProjectRepositoryAnalytics Retrieves repository analytics for a given project. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListMirrorRecords.go.html to see an example of how to use ListMirrorRecords API. -// A default retry strategy applies to this operation ListMirrorRecords() -func (client DevopsClient) ListMirrorRecords(ctx context.Context, request ListMirrorRecordsRequest) (response ListMirrorRecordsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/SummarizeProjectRepositoryAnalytics.go.html to see an example of how to use SummarizeProjectRepositoryAnalytics API. +// A default retry strategy applies to this operation SummarizeProjectRepositoryAnalytics() +func (client DevopsClient) SummarizeProjectRepositoryAnalytics(ctx context.Context, request SummarizeProjectRepositoryAnalyticsRequest) (response SummarizeProjectRepositoryAnalyticsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3906,42 +6986,42 @@ func (client DevopsClient) ListMirrorRecords(ctx context.Context, request ListMi if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listMirrorRecords, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeProjectRepositoryAnalytics, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMirrorRecordsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SummarizeProjectRepositoryAnalyticsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMirrorRecordsResponse{} + response = SummarizeProjectRepositoryAnalyticsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMirrorRecordsResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeProjectRepositoryAnalyticsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMirrorRecordsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeProjectRepositoryAnalyticsResponse") } return } -// listMirrorRecords implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listMirrorRecords(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeProjectRepositoryAnalytics implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) summarizeProjectRepositoryAnalytics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/mirrorRecords", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/projects/{projectId}/repositoryAnalytics", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMirrorRecordsResponse + var response SummarizeProjectRepositoryAnalyticsResponse 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/devops/20210630/Repository/ListMirrorRecords" - err = common.PostProcessServiceError(err, "Devops", "ListMirrorRecords", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryMetricAggregation/SummarizeProjectRepositoryAnalytics" + err = common.PostProcessServiceError(err, "Devops", "SummarizeProjectRepositoryAnalytics", apiReferenceLink) return response, err } @@ -3949,13 +7029,13 @@ func (client DevopsClient) listMirrorRecords(ctx context.Context, request common return response, err } -// ListPaths Retrieves a list of files and directories in a repository. +// SummarizeRepositoryAnalytics Retrieves repository analytics for a given repository. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPaths.go.html to see an example of how to use ListPaths API. -// A default retry strategy applies to this operation ListPaths() -func (client DevopsClient) ListPaths(ctx context.Context, request ListPathsRequest) (response ListPathsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/SummarizeRepositoryAnalytics.go.html to see an example of how to use SummarizeRepositoryAnalytics API. +// A default retry strategy applies to this operation SummarizeRepositoryAnalytics() +func (client DevopsClient) SummarizeRepositoryAnalytics(ctx context.Context, request SummarizeRepositoryAnalyticsRequest) (response SummarizeRepositoryAnalyticsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3964,42 +7044,42 @@ func (client DevopsClient) ListPaths(ctx context.Context, request ListPathsReque if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listPaths, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeRepositoryAnalytics, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListPathsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SummarizeRepositoryAnalyticsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListPathsResponse{} + response = SummarizeRepositoryAnalyticsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListPathsResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeRepositoryAnalyticsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListPathsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeRepositoryAnalyticsResponse") } return } -// listPaths implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listPaths(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeRepositoryAnalytics implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) summarizeRepositoryAnalytics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/paths", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repository/{repositoryId}/repositoryAnalytics", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListPathsResponse + var response SummarizeRepositoryAnalyticsResponse 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/devops/20210630/RepositoryPathSummary/ListPaths" - err = common.PostProcessServiceError(err, "Devops", "ListPaths", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryMetricAggregation/SummarizeRepositoryAnalytics" + err = common.PostProcessServiceError(err, "Devops", "SummarizeRepositoryAnalytics", apiReferenceLink) return response, err } @@ -4007,13 +7087,13 @@ func (client DevopsClient) listPaths(ctx context.Context, request common.OCIRequ return response, err } -// ListProjects Returns a list of projects. +// SyncRepository Synchronize a forked repository to the latest version // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListProjects.go.html to see an example of how to use ListProjects API. -// A default retry strategy applies to this operation ListProjects() -func (client DevopsClient) ListProjects(ctx context.Context, request ListProjectsRequest) (response ListProjectsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/SyncRepository.go.html to see an example of how to use SyncRepository API. +// A default retry strategy applies to this operation SyncRepository() +func (client DevopsClient) SyncRepository(ctx context.Context, request SyncRepositoryRequest) (response SyncRepositoryResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4022,42 +7102,47 @@ func (client DevopsClient) ListProjects(ctx context.Context, request ListProject if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listProjects, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.syncRepository, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListProjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SyncRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListProjectsResponse{} + response = SyncRepositoryResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListProjectsResponse); ok { + if convertedResponse, ok := ociResponse.(SyncRepositoryResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListProjectsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SyncRepositoryResponse") } return } -// listProjects implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listProjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// syncRepository implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) syncRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/projects", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories/{repositoryId}/actions/sync", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListProjectsResponse + var response SyncRepositoryResponse 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/devops/20210630/ProjectSummary/ListProjects" - err = common.PostProcessServiceError(err, "Devops", "ListProjects", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/SyncRepository" + err = common.PostProcessServiceError(err, "Devops", "SyncRepository", apiReferenceLink) return response, err } @@ -4065,13 +7150,13 @@ func (client DevopsClient) listProjects(ctx context.Context, request common.OCIR return response, err } -// ListRefs Returns a list of references. +// UnlikePullRequestComment Unlike a PullRequest comment // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListRefs.go.html to see an example of how to use ListRefs API. -// A default retry strategy applies to this operation ListRefs() -func (client DevopsClient) ListRefs(ctx context.Context, request ListRefsRequest) (response ListRefsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UnlikePullRequestComment.go.html to see an example of how to use UnlikePullRequestComment API. +// A default retry strategy applies to this operation UnlikePullRequestComment() +func (client DevopsClient) UnlikePullRequestComment(ctx context.Context, request UnlikePullRequestCommentRequest) (response UnlikePullRequestCommentResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4080,42 +7165,42 @@ func (client DevopsClient) ListRefs(ctx context.Context, request ListRefsRequest if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listRefs, policy) + ociResponse, err = common.Retry(ctx, request, client.unlikePullRequestComment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListRefsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UnlikePullRequestCommentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListRefsResponse{} + response = UnlikePullRequestCommentResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListRefsResponse); ok { + if convertedResponse, ok := ociResponse.(UnlikePullRequestCommentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListRefsResponse") + err = fmt.Errorf("failed to convert OCIResponse into UnlikePullRequestCommentResponse") } return } -// listRefs implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listRefs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// unlikePullRequestComment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) unlikePullRequestComment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories/{repositoryId}/refs", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pullRequests/{pullRequestId}/comments/{commentId}/actions/unlike", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListRefsResponse + var response UnlikePullRequestCommentResponse 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/devops/20210630/RepositoryRef/ListRefs" - err = common.PostProcessServiceError(err, "Devops", "ListRefs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UnlikePullRequestComment" + err = common.PostProcessServiceError(err, "Devops", "UnlikePullRequestComment", apiReferenceLink) return response, err } @@ -4123,13 +7208,13 @@ func (client DevopsClient) listRefs(ctx context.Context, request common.OCIReque return response, err } -// ListRepositories Returns a list of repositories given a compartment ID or a project ID. +// UnsubscribePullRequest unsubscribe the PullRequest // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListRepositories.go.html to see an example of how to use ListRepositories API. -// A default retry strategy applies to this operation ListRepositories() -func (client DevopsClient) ListRepositories(ctx context.Context, request ListRepositoriesRequest) (response ListRepositoriesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UnsubscribePullRequest.go.html to see an example of how to use UnsubscribePullRequest API. +// A default retry strategy applies to this operation UnsubscribePullRequest() +func (client DevopsClient) UnsubscribePullRequest(ctx context.Context, request UnsubscribePullRequestRequest) (response UnsubscribePullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4138,42 +7223,41 @@ func (client DevopsClient) ListRepositories(ctx context.Context, request ListRep if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listRepositories, policy) + ociResponse, err = common.Retry(ctx, request, client.unsubscribePullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListRepositoriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UnsubscribePullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListRepositoriesResponse{} + response = UnsubscribePullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListRepositoriesResponse); ok { + if convertedResponse, ok := ociResponse.(UnsubscribePullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListRepositoriesResponse") + err = fmt.Errorf("failed to convert OCIResponse into UnsubscribePullRequestResponse") } return } -// listRepositories implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listRepositories(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// unsubscribePullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) unsubscribePullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/repositories", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pullRequests/{pullRequestId}/actions/unsubscribe", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListRepositoriesResponse + var response UnsubscribePullRequestResponse 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/devops/20210630/Repository/ListRepositories" - err = common.PostProcessServiceError(err, "Devops", "ListRepositories", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UnsubscribePullRequest" + err = common.PostProcessServiceError(err, "Devops", "UnsubscribePullRequest", apiReferenceLink) return response, err } @@ -4181,13 +7265,13 @@ func (client DevopsClient) listRepositories(ctx context.Context, request common. return response, err } -// ListTriggers Returns a list of triggers. +// UpdateBuildPipeline Updates the build pipeline. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListTriggers.go.html to see an example of how to use ListTriggers API. -// A default retry strategy applies to this operation ListTriggers() -func (client DevopsClient) ListTriggers(ctx context.Context, request ListTriggersRequest) (response ListTriggersResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateBuildPipeline.go.html to see an example of how to use UpdateBuildPipeline API. +// A default retry strategy applies to this operation UpdateBuildPipeline() +func (client DevopsClient) UpdateBuildPipeline(ctx context.Context, request UpdateBuildPipelineRequest) (response UpdateBuildPipelineResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4196,42 +7280,42 @@ func (client DevopsClient) ListTriggers(ctx context.Context, request ListTrigger if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listTriggers, policy) + ociResponse, err = common.Retry(ctx, request, client.updateBuildPipeline, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListTriggersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateBuildPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListTriggersResponse{} + response = UpdateBuildPipelineResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListTriggersResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateBuildPipelineResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListTriggersResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateBuildPipelineResponse") } return } -// listTriggers implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listTriggers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateBuildPipeline implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateBuildPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/triggers", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/buildPipelines/{buildPipelineId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListTriggersResponse + var response UpdateBuildPipelineResponse 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/devops/20210630/TriggerCollection/ListTriggers" - err = common.PostProcessServiceError(err, "Devops", "ListTriggers", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipeline/UpdateBuildPipeline" + err = common.PostProcessServiceError(err, "Devops", "UpdateBuildPipeline", apiReferenceLink) return response, err } @@ -4239,13 +7323,13 @@ func (client DevopsClient) listTriggers(ctx context.Context, request common.OCIR return response, err } -// ListWorkRequestErrors Returns a list of errors for a given work request. +// UpdateBuildPipelineStage Updates the stage based on the stage ID provided in the request. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. -// A default retry strategy applies to this operation ListWorkRequestErrors() -func (client DevopsClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateBuildPipelineStage.go.html to see an example of how to use UpdateBuildPipelineStage API. +// A default retry strategy applies to this operation UpdateBuildPipelineStage() +func (client DevopsClient) UpdateBuildPipelineStage(ctx context.Context, request UpdateBuildPipelineStageRequest) (response UpdateBuildPipelineStageResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4254,56 +7338,56 @@ func (client DevopsClient) ListWorkRequestErrors(ctx context.Context, request Li if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + ociResponse, err = common.Retry(ctx, request, client.updateBuildPipelineStage, 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 = UpdateBuildPipelineStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestErrorsResponse{} + response = UpdateBuildPipelineStageResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateBuildPipelineStageResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateBuildPipelineStageResponse") } return } -// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateBuildPipelineStage implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateBuildPipelineStage(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.MethodPut, "/buildPipelineStages/{buildPipelineStageId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestErrorsResponse + var response UpdateBuildPipelineStageResponse 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/devops/20210630/WorkRequestError/ListWorkRequestErrors" - err = common.PostProcessServiceError(err, "Devops", "ListWorkRequestErrors", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStage/UpdateBuildPipelineStage" + err = common.PostProcessServiceError(err, "Devops", "UpdateBuildPipelineStage", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &buildpipelinestage{}) return response, err } -// ListWorkRequestLogs Returns a list of logs for a given work request. +// UpdateBuildRun Updates the build run. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. -// A default retry strategy applies to this operation ListWorkRequestLogs() -func (client DevopsClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateBuildRun.go.html to see an example of how to use UpdateBuildRun API. +// A default retry strategy applies to this operation UpdateBuildRun() +func (client DevopsClient) UpdateBuildRun(ctx context.Context, request UpdateBuildRunRequest) (response UpdateBuildRunResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4312,42 +7396,42 @@ func (client DevopsClient) ListWorkRequestLogs(ctx context.Context, request List if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + ociResponse, err = common.Retry(ctx, request, client.updateBuildRun, 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 = UpdateBuildRunResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestLogsResponse{} + response = UpdateBuildRunResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateBuildRunResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateBuildRunResponse") } return } -// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateBuildRun implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateBuildRun(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.MethodPut, "/buildRuns/{buildRunId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestLogsResponse + var response UpdateBuildRunResponse 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/devops/20210630/WorkRequestLogEntry/ListWorkRequestLogs" - err = common.PostProcessServiceError(err, "Devops", "ListWorkRequestLogs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildRun/UpdateBuildRun" + err = common.PostProcessServiceError(err, "Devops", "UpdateBuildRun", apiReferenceLink) return response, err } @@ -4355,13 +7439,13 @@ func (client DevopsClient) listWorkRequestLogs(ctx context.Context, request comm return response, err } -// ListWorkRequests Lists the work requests in a compartment. +// UpdateConnection Updates the connection. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. -// A default retry strategy applies to this operation ListWorkRequests() -func (client DevopsClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateConnection.go.html to see an example of how to use UpdateConnection API. +// A default retry strategy applies to this operation UpdateConnection() +func (client DevopsClient) UpdateConnection(ctx context.Context, request UpdateConnectionRequest) (response UpdateConnectionResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4370,56 +7454,56 @@ func (client DevopsClient) ListWorkRequests(ctx context.Context, request ListWor if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + ociResponse, err = common.Retry(ctx, request, client.updateConnection, 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 = UpdateConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestsResponse{} + response = UpdateConnectionResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateConnectionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateConnectionResponse") } return } -// listWorkRequests implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateConnection implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateConnection(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.MethodPut, "/connections/{connectionId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestsResponse + var response UpdateConnectionResponse 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/devops/20210630/WorkRequest/ListWorkRequests" - err = common.PostProcessServiceError(err, "Devops", "ListWorkRequests", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Connection/UpdateConnection" + err = common.PostProcessServiceError(err, "Devops", "UpdateConnection", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &connection{}) return response, err } -// MirrorRepository Synchronize a mirrored repository to the latest version from external providers. +// UpdateDeployArtifact Updates the deployment artifact. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/MirrorRepository.go.html to see an example of how to use MirrorRepository API. -// A default retry strategy applies to this operation MirrorRepository() -func (client DevopsClient) MirrorRepository(ctx context.Context, request MirrorRepositoryRequest) (response MirrorRepositoryResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployArtifact.go.html to see an example of how to use UpdateDeployArtifact API. +// A default retry strategy applies to this operation UpdateDeployArtifact() +func (client DevopsClient) UpdateDeployArtifact(ctx context.Context, request UpdateDeployArtifactRequest) (response UpdateDeployArtifactResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4428,42 +7512,42 @@ func (client DevopsClient) MirrorRepository(ctx context.Context, request MirrorR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.mirrorRepository, policy) + ociResponse, err = common.Retry(ctx, request, client.updateDeployArtifact, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = MirrorRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateDeployArtifactResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = MirrorRepositoryResponse{} + response = UpdateDeployArtifactResponse{} } } return } - if convertedResponse, ok := ociResponse.(MirrorRepositoryResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateDeployArtifactResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into MirrorRepositoryResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployArtifactResponse") } return } -// mirrorRepository implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) mirrorRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateDeployArtifact implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateDeployArtifact(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/repositories/{repositoryId}/actions/mirror", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployArtifacts/{deployArtifactId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response MirrorRepositoryResponse + var response UpdateDeployArtifactResponse 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/devops/20210630/Repository/MirrorRepository" - err = common.PostProcessServiceError(err, "Devops", "MirrorRepository", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifact/UpdateDeployArtifact" + err = common.PostProcessServiceError(err, "Devops", "UpdateDeployArtifact", apiReferenceLink) return response, err } @@ -4471,13 +7555,13 @@ func (client DevopsClient) mirrorRepository(ctx context.Context, request common. return response, err } -// PutRepositoryRef Creates a new reference or updates an existing one. This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by "/repositories/{repositoryId}/actions/createOrUpdateGitRef". +// UpdateDeployEnvironment Updates the deployment environment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/PutRepositoryRef.go.html to see an example of how to use PutRepositoryRef API. -// A default retry strategy applies to this operation PutRepositoryRef() -func (client DevopsClient) PutRepositoryRef(ctx context.Context, request PutRepositoryRefRequest) (response PutRepositoryRefResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployEnvironment.go.html to see an example of how to use UpdateDeployEnvironment API. +// A default retry strategy applies to this operation UpdateDeployEnvironment() +func (client DevopsClient) UpdateDeployEnvironment(ctx context.Context, request UpdateDeployEnvironmentRequest) (response UpdateDeployEnvironmentResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4486,61 +7570,56 @@ func (client DevopsClient) PutRepositoryRef(ctx context.Context, request PutRepo 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.putRepositoryRef, policy) + ociResponse, err = common.Retry(ctx, request, client.updateDeployEnvironment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutRepositoryRefResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateDeployEnvironmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutRepositoryRefResponse{} + response = UpdateDeployEnvironmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutRepositoryRefResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateDeployEnvironmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutRepositoryRefResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployEnvironmentResponse") } return } -// putRepositoryRef implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) putRepositoryRef(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateDeployEnvironment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateDeployEnvironment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/repositories/{repositoryId}/refs/{refName}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployEnvironments/{deployEnvironmentId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutRepositoryRefResponse + var response UpdateDeployEnvironmentResponse 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/devops/20210630/Repository/PutRepositoryRef" - err = common.PostProcessServiceError(err, "Devops", "PutRepositoryRef", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironment/UpdateDeployEnvironment" + err = common.PostProcessServiceError(err, "Devops", "UpdateDeployEnvironment", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &repositoryref{}) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployenvironment{}) return response, err } -// ScheduleCascadingProjectDeletion Cascading operation that marks Project and child DevOps resources in a DELETING state for a retention period +// UpdateDeployPipeline Updates the deployment pipeline. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ScheduleCascadingProjectDeletion.go.html to see an example of how to use ScheduleCascadingProjectDeletion API. -// A default retry strategy applies to this operation ScheduleCascadingProjectDeletion() -func (client DevopsClient) ScheduleCascadingProjectDeletion(ctx context.Context, request ScheduleCascadingProjectDeletionRequest) (response ScheduleCascadingProjectDeletionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployPipeline.go.html to see an example of how to use UpdateDeployPipeline API. +// A default retry strategy applies to this operation UpdateDeployPipeline() +func (client DevopsClient) UpdateDeployPipeline(ctx context.Context, request UpdateDeployPipelineRequest) (response UpdateDeployPipelineResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4549,47 +7628,42 @@ func (client DevopsClient) ScheduleCascadingProjectDeletion(ctx context.Context, 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.scheduleCascadingProjectDeletion, policy) + ociResponse, err = common.Retry(ctx, request, client.updateDeployPipeline, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ScheduleCascadingProjectDeletionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateDeployPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ScheduleCascadingProjectDeletionResponse{} + response = UpdateDeployPipelineResponse{} } } return } - if convertedResponse, ok := ociResponse.(ScheduleCascadingProjectDeletionResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateDeployPipelineResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ScheduleCascadingProjectDeletionResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployPipelineResponse") } return } -// scheduleCascadingProjectDeletion implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) scheduleCascadingProjectDeletion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateDeployPipeline implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateDeployPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/projects/{projectId}/actions/scheduleCascadingProjectDeletion", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployPipelines/{deployPipelineId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ScheduleCascadingProjectDeletionResponse + var response UpdateDeployPipelineResponse 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/devops/20210630/Project/ScheduleCascadingProjectDeletion" - err = common.PostProcessServiceError(err, "Devops", "ScheduleCascadingProjectDeletion", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipeline/UpdateDeployPipeline" + err = common.PostProcessServiceError(err, "Devops", "UpdateDeployPipeline", apiReferenceLink) return response, err } @@ -4597,13 +7671,13 @@ func (client DevopsClient) scheduleCascadingProjectDeletion(ctx context.Context, return response, err } -// UpdateBuildPipeline Updates the build pipeline. +// UpdateDeployStage Updates the deployment stage. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateBuildPipeline.go.html to see an example of how to use UpdateBuildPipeline API. -// A default retry strategy applies to this operation UpdateBuildPipeline() -func (client DevopsClient) UpdateBuildPipeline(ctx context.Context, request UpdateBuildPipelineRequest) (response UpdateBuildPipelineResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployStage.go.html to see an example of how to use UpdateDeployStage API. +// A default retry strategy applies to this operation UpdateDeployStage() +func (client DevopsClient) UpdateDeployStage(ctx context.Context, request UpdateDeployStageRequest) (response UpdateDeployStageResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4612,56 +7686,56 @@ func (client DevopsClient) UpdateBuildPipeline(ctx context.Context, request Upda if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateBuildPipeline, policy) + ociResponse, err = common.Retry(ctx, request, client.updateDeployStage, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateBuildPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateDeployStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateBuildPipelineResponse{} + response = UpdateDeployStageResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateBuildPipelineResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateDeployStageResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateBuildPipelineResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployStageResponse") } return } -// updateBuildPipeline implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateBuildPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateDeployStage implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateDeployStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/buildPipelines/{buildPipelineId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployStages/{deployStageId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateBuildPipelineResponse + var response UpdateDeployStageResponse 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/devops/20210630/BuildPipeline/UpdateBuildPipeline" - err = common.PostProcessServiceError(err, "Devops", "UpdateBuildPipeline", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStage/UpdateDeployStage" + err = common.PostProcessServiceError(err, "Devops", "UpdateDeployStage", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deploystage{}) return response, err } -// UpdateBuildPipelineStage Updates the stage based on the stage ID provided in the request. +// UpdateDeployment Updates the deployment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateBuildPipelineStage.go.html to see an example of how to use UpdateBuildPipelineStage API. -// A default retry strategy applies to this operation UpdateBuildPipelineStage() -func (client DevopsClient) UpdateBuildPipelineStage(ctx context.Context, request UpdateBuildPipelineStageRequest) (response UpdateBuildPipelineStageResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployment.go.html to see an example of how to use UpdateDeployment API. +// A default retry strategy applies to this operation UpdateDeployment() +func (client DevopsClient) UpdateDeployment(ctx context.Context, request UpdateDeploymentRequest) (response UpdateDeploymentResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4670,56 +7744,56 @@ func (client DevopsClient) UpdateBuildPipelineStage(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateBuildPipelineStage, policy) + ociResponse, err = common.Retry(ctx, request, client.updateDeployment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateBuildPipelineStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateDeploymentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateBuildPipelineStageResponse{} + response = UpdateDeploymentResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateBuildPipelineStageResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateDeploymentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateBuildPipelineStageResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateDeploymentResponse") } return } -// updateBuildPipelineStage implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateBuildPipelineStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateDeployment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateDeployment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/buildPipelineStages/{buildPipelineStageId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployments/{deploymentId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateBuildPipelineStageResponse + var response UpdateDeploymentResponse 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/devops/20210630/BuildPipelineStage/UpdateBuildPipelineStage" - err = common.PostProcessServiceError(err, "Devops", "UpdateBuildPipelineStage", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Deployment/UpdateDeployment" + err = common.PostProcessServiceError(err, "Devops", "UpdateDeployment", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &buildpipelinestage{}) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployment{}) return response, err } -// UpdateBuildRun Updates the build run. +// UpdateProject Updates the project. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateBuildRun.go.html to see an example of how to use UpdateBuildRun API. -// A default retry strategy applies to this operation UpdateBuildRun() -func (client DevopsClient) UpdateBuildRun(ctx context.Context, request UpdateBuildRunRequest) (response UpdateBuildRunResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateProject.go.html to see an example of how to use UpdateProject API. +// A default retry strategy applies to this operation UpdateProject() +func (client DevopsClient) UpdateProject(ctx context.Context, request UpdateProjectRequest) (response UpdateProjectResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4728,42 +7802,42 @@ func (client DevopsClient) UpdateBuildRun(ctx context.Context, request UpdateBui if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateBuildRun, policy) + ociResponse, err = common.Retry(ctx, request, client.updateProject, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateBuildRunResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateBuildRunResponse{} + response = UpdateProjectResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateBuildRunResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateProjectResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateBuildRunResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateProjectResponse") } return } -// updateBuildRun implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateBuildRun(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateProject implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/buildRuns/{buildRunId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/projects/{projectId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateBuildRunResponse + var response UpdateProjectResponse 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/devops/20210630/BuildRun/UpdateBuildRun" - err = common.PostProcessServiceError(err, "Devops", "UpdateBuildRun", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/UpdateProject" + err = common.PostProcessServiceError(err, "Devops", "UpdateProject", apiReferenceLink) return response, err } @@ -4771,13 +7845,13 @@ func (client DevopsClient) updateBuildRun(ctx context.Context, request common.OC return response, err } -// UpdateConnection Updates the connection. +// UpdateProjectNotificationPreference Update the project notification preference for the user passed as path param // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateConnection.go.html to see an example of how to use UpdateConnection API. -// A default retry strategy applies to this operation UpdateConnection() -func (client DevopsClient) UpdateConnection(ctx context.Context, request UpdateConnectionRequest) (response UpdateConnectionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateProjectNotificationPreference.go.html to see an example of how to use UpdateProjectNotificationPreference API. +// A default retry strategy applies to this operation UpdateProjectNotificationPreference() +func (client DevopsClient) UpdateProjectNotificationPreference(ctx context.Context, request UpdateProjectNotificationPreferenceRequest) (response UpdateProjectNotificationPreferenceResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4786,56 +7860,56 @@ func (client DevopsClient) UpdateConnection(ctx context.Context, request UpdateC if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateConnection, policy) + ociResponse, err = common.Retry(ctx, request, client.updateProjectNotificationPreference, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateProjectNotificationPreferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateConnectionResponse{} + response = UpdateProjectNotificationPreferenceResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateConnectionResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateProjectNotificationPreferenceResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateConnectionResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateProjectNotificationPreferenceResponse") } return } -// updateConnection implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateProjectNotificationPreference implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateProjectNotificationPreference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/connections/{connectionId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/projects/{projectId}/principals/{principalId}/pullRequestNotificationPreference", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateConnectionResponse + var response UpdateProjectNotificationPreferenceResponse 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/devops/20210630/Connection/UpdateConnection" - err = common.PostProcessServiceError(err, "Devops", "UpdateConnection", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectNotificationPreference/UpdateProjectNotificationPreference" + err = common.PostProcessServiceError(err, "Devops", "UpdateProjectNotificationPreference", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &connection{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// UpdateDeployArtifact Updates the deployment artifact. +// UpdateProjectRepositorySettings Updates the repository settings for a project. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployArtifact.go.html to see an example of how to use UpdateDeployArtifact API. -// A default retry strategy applies to this operation UpdateDeployArtifact() -func (client DevopsClient) UpdateDeployArtifact(ctx context.Context, request UpdateDeployArtifactRequest) (response UpdateDeployArtifactResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateProjectRepositorySettings.go.html to see an example of how to use UpdateProjectRepositorySettings API. +// A default retry strategy applies to this operation UpdateProjectRepositorySettings() +func (client DevopsClient) UpdateProjectRepositorySettings(ctx context.Context, request UpdateProjectRepositorySettingsRequest) (response UpdateProjectRepositorySettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4844,42 +7918,47 @@ func (client DevopsClient) UpdateDeployArtifact(ctx context.Context, request Upd if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateDeployArtifact, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateProjectRepositorySettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateDeployArtifactResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateProjectRepositorySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateDeployArtifactResponse{} + response = UpdateProjectRepositorySettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateDeployArtifactResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateProjectRepositorySettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployArtifactResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateProjectRepositorySettingsResponse") } return } -// updateDeployArtifact implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateDeployArtifact(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateProjectRepositorySettings implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateProjectRepositorySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployArtifacts/{deployArtifactId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/projects/{projectId}/repositorySettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateDeployArtifactResponse + var response UpdateProjectRepositorySettingsResponse 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/devops/20210630/DeployArtifact/UpdateDeployArtifact" - err = common.PostProcessServiceError(err, "Devops", "UpdateDeployArtifact", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/UpdateProjectRepositorySettings" + err = common.PostProcessServiceError(err, "Devops", "UpdateProjectRepositorySettings", apiReferenceLink) return response, err } @@ -4887,13 +7966,13 @@ func (client DevopsClient) updateDeployArtifact(ctx context.Context, request com return response, err } -// UpdateDeployEnvironment Updates the deployment environment. +// UpdatePullRequest Updates the PullRequest // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployEnvironment.go.html to see an example of how to use UpdateDeployEnvironment API. -// A default retry strategy applies to this operation UpdateDeployEnvironment() -func (client DevopsClient) UpdateDeployEnvironment(ctx context.Context, request UpdateDeployEnvironmentRequest) (response UpdateDeployEnvironmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdatePullRequest.go.html to see an example of how to use UpdatePullRequest API. +// A default retry strategy applies to this operation UpdatePullRequest() +func (client DevopsClient) UpdatePullRequest(ctx context.Context, request UpdatePullRequestRequest) (response UpdatePullRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4902,56 +7981,56 @@ func (client DevopsClient) UpdateDeployEnvironment(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateDeployEnvironment, policy) + ociResponse, err = common.Retry(ctx, request, client.updatePullRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateDeployEnvironmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdatePullRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateDeployEnvironmentResponse{} + response = UpdatePullRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateDeployEnvironmentResponse); ok { + if convertedResponse, ok := ociResponse.(UpdatePullRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployEnvironmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdatePullRequestResponse") } return } -// updateDeployEnvironment implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateDeployEnvironment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updatePullRequest implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updatePullRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployEnvironments/{deployEnvironmentId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/pullRequests/{pullRequestId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateDeployEnvironmentResponse + var response UpdatePullRequestResponse 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/devops/20210630/DeployEnvironment/UpdateDeployEnvironment" - err = common.PostProcessServiceError(err, "Devops", "UpdateDeployEnvironment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UpdatePullRequest" + err = common.PostProcessServiceError(err, "Devops", "UpdatePullRequest", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployenvironment{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// UpdateDeployPipeline Updates the deployment pipeline. +// UpdatePullRequestComment Updates the PullRequest comment // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployPipeline.go.html to see an example of how to use UpdateDeployPipeline API. -// A default retry strategy applies to this operation UpdateDeployPipeline() -func (client DevopsClient) UpdateDeployPipeline(ctx context.Context, request UpdateDeployPipelineRequest) (response UpdateDeployPipelineResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdatePullRequestComment.go.html to see an example of how to use UpdatePullRequestComment API. +// A default retry strategy applies to this operation UpdatePullRequestComment() +func (client DevopsClient) UpdatePullRequestComment(ctx context.Context, request UpdatePullRequestCommentRequest) (response UpdatePullRequestCommentResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4960,42 +8039,42 @@ func (client DevopsClient) UpdateDeployPipeline(ctx context.Context, request Upd if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateDeployPipeline, policy) + ociResponse, err = common.Retry(ctx, request, client.updatePullRequestComment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateDeployPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdatePullRequestCommentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateDeployPipelineResponse{} + response = UpdatePullRequestCommentResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateDeployPipelineResponse); ok { + if convertedResponse, ok := ociResponse.(UpdatePullRequestCommentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployPipelineResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdatePullRequestCommentResponse") } return } -// updateDeployPipeline implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateDeployPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updatePullRequestComment implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updatePullRequestComment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployPipelines/{deployPipelineId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/pullRequests/{pullRequestId}/comments/{commentId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateDeployPipelineResponse + var response UpdatePullRequestCommentResponse 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/devops/20210630/DeployPipeline/UpdateDeployPipeline" - err = common.PostProcessServiceError(err, "Devops", "UpdateDeployPipeline", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UpdatePullRequestComment" + err = common.PostProcessServiceError(err, "Devops", "UpdatePullRequestComment", apiReferenceLink) return response, err } @@ -5003,13 +8082,13 @@ func (client DevopsClient) updateDeployPipeline(ctx context.Context, request com return response, err } -// UpdateDeployStage Updates the deployment stage. +// UpdatePullRequestNotificationPreference Update the pull request notification preference for the user passed as path param // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployStage.go.html to see an example of how to use UpdateDeployStage API. -// A default retry strategy applies to this operation UpdateDeployStage() -func (client DevopsClient) UpdateDeployStage(ctx context.Context, request UpdateDeployStageRequest) (response UpdateDeployStageResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdatePullRequestNotificationPreference.go.html to see an example of how to use UpdatePullRequestNotificationPreference API. +// A default retry strategy applies to this operation UpdatePullRequestNotificationPreference() +func (client DevopsClient) UpdatePullRequestNotificationPreference(ctx context.Context, request UpdatePullRequestNotificationPreferenceRequest) (response UpdatePullRequestNotificationPreferenceResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5018,56 +8097,56 @@ func (client DevopsClient) UpdateDeployStage(ctx context.Context, request Update if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateDeployStage, policy) + ociResponse, err = common.Retry(ctx, request, client.updatePullRequestNotificationPreference, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateDeployStageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdatePullRequestNotificationPreferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateDeployStageResponse{} + response = UpdatePullRequestNotificationPreferenceResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateDeployStageResponse); ok { + if convertedResponse, ok := ociResponse.(UpdatePullRequestNotificationPreferenceResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDeployStageResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdatePullRequestNotificationPreferenceResponse") } return } -// updateDeployStage implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateDeployStage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updatePullRequestNotificationPreference implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updatePullRequestNotificationPreference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployStages/{deployStageId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/pullRequests/{pullRequestId}/principals/{principalId}/pullRequestNotificationPreference", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateDeployStageResponse + var response UpdatePullRequestNotificationPreferenceResponse 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/devops/20210630/DeployStage/UpdateDeployStage" - err = common.PostProcessServiceError(err, "Devops", "UpdateDeployStage", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestNotificationPreference/UpdatePullRequestNotificationPreference" + err = common.PostProcessServiceError(err, "Devops", "UpdatePullRequestNotificationPreference", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deploystage{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// UpdateDeployment Updates the deployment. +// UpdateRepository Updates the repository. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateDeployment.go.html to see an example of how to use UpdateDeployment API. -// A default retry strategy applies to this operation UpdateDeployment() -func (client DevopsClient) UpdateDeployment(ctx context.Context, request UpdateDeploymentRequest) (response UpdateDeploymentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateRepository.go.html to see an example of how to use UpdateRepository API. +// A default retry strategy applies to this operation UpdateRepository() +func (client DevopsClient) UpdateRepository(ctx context.Context, request UpdateRepositoryRequest) (response UpdateRepositoryResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5076,56 +8155,56 @@ func (client DevopsClient) UpdateDeployment(ctx context.Context, request UpdateD if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateDeployment, policy) + ociResponse, err = common.Retry(ctx, request, client.updateRepository, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateDeploymentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateDeploymentResponse{} + response = UpdateRepositoryResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateDeploymentResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateRepositoryResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateDeploymentResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateRepositoryResponse") } return } -// updateDeployment implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateDeployment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateRepository implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/deployments/{deploymentId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/repositories/{repositoryId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateDeploymentResponse + var response UpdateRepositoryResponse 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/devops/20210630/Deployment/UpdateDeployment" - err = common.PostProcessServiceError(err, "Devops", "UpdateDeployment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/UpdateRepository" + err = common.PostProcessServiceError(err, "Devops", "UpdateRepository", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &deployment{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// UpdateProject Updates the project. +// UpdateRepositoryNotificationPreference Update the repository notification preference for the user passed as path param // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateProject.go.html to see an example of how to use UpdateProject API. -// A default retry strategy applies to this operation UpdateProject() -func (client DevopsClient) UpdateProject(ctx context.Context, request UpdateProjectRequest) (response UpdateProjectResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateRepositoryNotificationPreference.go.html to see an example of how to use UpdateRepositoryNotificationPreference API. +// A default retry strategy applies to this operation UpdateRepositoryNotificationPreference() +func (client DevopsClient) UpdateRepositoryNotificationPreference(ctx context.Context, request UpdateRepositoryNotificationPreferenceRequest) (response UpdateRepositoryNotificationPreferenceResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5134,42 +8213,42 @@ func (client DevopsClient) UpdateProject(ctx context.Context, request UpdateProj if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateProject, policy) + ociResponse, err = common.Retry(ctx, request, client.updateRepositoryNotificationPreference, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateProjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateRepositoryNotificationPreferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateProjectResponse{} + response = UpdateRepositoryNotificationPreferenceResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateProjectResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateRepositoryNotificationPreferenceResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateProjectResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateRepositoryNotificationPreferenceResponse") } return } -// updateProject implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateProject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateRepositoryNotificationPreference implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateRepositoryNotificationPreference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/projects/{projectId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/repositories/{repositoryId}/principals/{principalId}/pullRequestNotificationPreference", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateProjectResponse + var response UpdateRepositoryNotificationPreferenceResponse 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/devops/20210630/Project/UpdateProject" - err = common.PostProcessServiceError(err, "Devops", "UpdateProject", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryNotificationPreference/UpdateRepositoryNotificationPreference" + err = common.PostProcessServiceError(err, "Devops", "UpdateRepositoryNotificationPreference", apiReferenceLink) return response, err } @@ -5177,13 +8256,13 @@ func (client DevopsClient) updateProject(ctx context.Context, request common.OCI return response, err } -// UpdateRepository Updates the repository. +// UpdateRepositorySettings Updates the settings for a repository. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateRepository.go.html to see an example of how to use UpdateRepository API. -// A default retry strategy applies to this operation UpdateRepository() -func (client DevopsClient) UpdateRepository(ctx context.Context, request UpdateRepositoryRequest) (response UpdateRepositoryResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateRepositorySettings.go.html to see an example of how to use UpdateRepositorySettings API. +// A default retry strategy applies to this operation UpdateRepositorySettings() +func (client DevopsClient) UpdateRepositorySettings(ctx context.Context, request UpdateRepositorySettingsRequest) (response UpdateRepositorySettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5192,42 +8271,47 @@ func (client DevopsClient) UpdateRepository(ctx context.Context, request UpdateR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.updateRepository, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateRepositorySettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateRepositoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = UpdateRepositorySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = UpdateRepositoryResponse{} + response = UpdateRepositorySettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(UpdateRepositoryResponse); ok { + if convertedResponse, ok := ociResponse.(UpdateRepositorySettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateRepositoryResponse") + err = fmt.Errorf("failed to convert OCIResponse into UpdateRepositorySettingsResponse") } return } -// updateRepository implements the OCIOperation interface (enables retrying operations) -func (client DevopsClient) updateRepository(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// updateRepositorySettings implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) updateRepositorySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/repositories/{repositoryId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/repositories/{repositoryId}/repositorySettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response UpdateRepositoryResponse + var response UpdateRepositorySettingsResponse 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/devops/20210630/Repository/UpdateRepository" - err = common.PostProcessServiceError(err, "Devops", "UpdateRepository", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositorySettings/UpdateRepositorySettings" + err = common.PostProcessServiceError(err, "Devops", "UpdateRepositorySettings", apiReferenceLink) return response, err } diff --git a/devops/devops_code_repository_filter.go b/devops/devops_code_repository_filter.go index 71facf9e4c..aac779fc3b 100644 --- a/devops/devops_code_repository_filter.go +++ b/devops/devops_code_repository_filter.go @@ -66,15 +66,21 @@ type DevopsCodeRepositoryFilterEventsEnum string // Set of constants representing the allowable values for DevopsCodeRepositoryFilterEventsEnum const ( - DevopsCodeRepositoryFilterEventsPush DevopsCodeRepositoryFilterEventsEnum = "PUSH" + DevopsCodeRepositoryFilterEventsPush DevopsCodeRepositoryFilterEventsEnum = "PUSH" + DevopsCodeRepositoryFilterEventsPullRequestCreated DevopsCodeRepositoryFilterEventsEnum = "PULL_REQUEST_CREATED" + DevopsCodeRepositoryFilterEventsPullRequestUpdated DevopsCodeRepositoryFilterEventsEnum = "PULL_REQUEST_UPDATED" ) var mappingDevopsCodeRepositoryFilterEventsEnum = map[string]DevopsCodeRepositoryFilterEventsEnum{ - "PUSH": DevopsCodeRepositoryFilterEventsPush, + "PUSH": DevopsCodeRepositoryFilterEventsPush, + "PULL_REQUEST_CREATED": DevopsCodeRepositoryFilterEventsPullRequestCreated, + "PULL_REQUEST_UPDATED": DevopsCodeRepositoryFilterEventsPullRequestUpdated, } var mappingDevopsCodeRepositoryFilterEventsEnumLowerCase = map[string]DevopsCodeRepositoryFilterEventsEnum{ - "push": DevopsCodeRepositoryFilterEventsPush, + "push": DevopsCodeRepositoryFilterEventsPush, + "pull_request_created": DevopsCodeRepositoryFilterEventsPullRequestCreated, + "pull_request_updated": DevopsCodeRepositoryFilterEventsPullRequestUpdated, } // GetDevopsCodeRepositoryFilterEventsEnumValues Enumerates the set of values for DevopsCodeRepositoryFilterEventsEnum @@ -90,6 +96,8 @@ func GetDevopsCodeRepositoryFilterEventsEnumValues() []DevopsCodeRepositoryFilte func GetDevopsCodeRepositoryFilterEventsEnumStringValues() []string { return []string{ "PUSH", + "PULL_REQUEST_CREATED", + "PULL_REQUEST_UPDATED", } } diff --git a/devops/devops_code_repository_filter_attributes.go b/devops/devops_code_repository_filter_attributes.go index b706b3799f..98e109503d 100644 --- a/devops/devops_code_repository_filter_attributes.go +++ b/devops/devops_code_repository_filter_attributes.go @@ -21,6 +21,9 @@ type DevopsCodeRepositoryFilterAttributes struct { // Branch for push event; source branch for pull requests HeadRef *string `mandatory:"false" json:"headRef"` + // The target branch for pull requests; not applicable for push requests. + BaseRef *string `mandatory:"false" json:"baseRef"` + FileFilter *FileFilter `mandatory:"false" json:"fileFilter"` } diff --git a/devops/execute_merge_pull_request_details.go b/devops/execute_merge_pull_request_details.go new file mode 100644 index 0000000000..5ff4e0c0f3 --- /dev/null +++ b/devops/execute_merge_pull_request_details.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExecuteMergePullRequestDetails The information about the merge. +type ExecuteMergePullRequestDetails struct { + + // The commit message to be shown for this pull request in the destination branch after merge is done. + CommitMessage *string `mandatory:"true" json:"commitMessage"` + + // What needs to happen after the merge is done successfully. + PostMergeAction ExecuteMergePullRequestDetailsPostMergeActionEnum `mandatory:"false" json:"postMergeAction,omitempty"` + + // the strategy of merging. + MergeStrategy MergeStrategyEnum `mandatory:"true" json:"mergeStrategy"` +} + +func (m ExecuteMergePullRequestDetails) 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 ExecuteMergePullRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingExecuteMergePullRequestDetailsPostMergeActionEnum(string(m.PostMergeAction)); !ok && m.PostMergeAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PostMergeAction: %s. Supported values are: %s.", m.PostMergeAction, strings.Join(GetExecuteMergePullRequestDetailsPostMergeActionEnumStringValues(), ","))) + } + + if _, ok := GetMappingMergeStrategyEnum(string(m.MergeStrategy)); !ok && m.MergeStrategy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MergeStrategy: %s. Supported values are: %s.", m.MergeStrategy, strings.Join(GetMergeStrategyEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ExecuteMergePullRequestDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExecuteMergePullRequestDetails ExecuteMergePullRequestDetails + s := struct { + DiscriminatorParam string `json:"actionType"` + MarshalTypeExecuteMergePullRequestDetails + }{ + "EXECUTE", + (MarshalTypeExecuteMergePullRequestDetails)(m), + } + + return json.Marshal(&s) +} + +// ExecuteMergePullRequestDetailsPostMergeActionEnum Enum with underlying type: string +type ExecuteMergePullRequestDetailsPostMergeActionEnum string + +// Set of constants representing the allowable values for ExecuteMergePullRequestDetailsPostMergeActionEnum +const ( + ExecuteMergePullRequestDetailsPostMergeActionDeleteSourceBranch ExecuteMergePullRequestDetailsPostMergeActionEnum = "DELETE_SOURCE_BRANCH" + ExecuteMergePullRequestDetailsPostMergeActionKeepSourceBranch ExecuteMergePullRequestDetailsPostMergeActionEnum = "KEEP_SOURCE_BRANCH" +) + +var mappingExecuteMergePullRequestDetailsPostMergeActionEnum = map[string]ExecuteMergePullRequestDetailsPostMergeActionEnum{ + "DELETE_SOURCE_BRANCH": ExecuteMergePullRequestDetailsPostMergeActionDeleteSourceBranch, + "KEEP_SOURCE_BRANCH": ExecuteMergePullRequestDetailsPostMergeActionKeepSourceBranch, +} + +var mappingExecuteMergePullRequestDetailsPostMergeActionEnumLowerCase = map[string]ExecuteMergePullRequestDetailsPostMergeActionEnum{ + "delete_source_branch": ExecuteMergePullRequestDetailsPostMergeActionDeleteSourceBranch, + "keep_source_branch": ExecuteMergePullRequestDetailsPostMergeActionKeepSourceBranch, +} + +// GetExecuteMergePullRequestDetailsPostMergeActionEnumValues Enumerates the set of values for ExecuteMergePullRequestDetailsPostMergeActionEnum +func GetExecuteMergePullRequestDetailsPostMergeActionEnumValues() []ExecuteMergePullRequestDetailsPostMergeActionEnum { + values := make([]ExecuteMergePullRequestDetailsPostMergeActionEnum, 0) + for _, v := range mappingExecuteMergePullRequestDetailsPostMergeActionEnum { + values = append(values, v) + } + return values +} + +// GetExecuteMergePullRequestDetailsPostMergeActionEnumStringValues Enumerates the set of values in String for ExecuteMergePullRequestDetailsPostMergeActionEnum +func GetExecuteMergePullRequestDetailsPostMergeActionEnumStringValues() []string { + return []string{ + "DELETE_SOURCE_BRANCH", + "KEEP_SOURCE_BRANCH", + } +} + +// GetMappingExecuteMergePullRequestDetailsPostMergeActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExecuteMergePullRequestDetailsPostMergeActionEnum(val string) (ExecuteMergePullRequestDetailsPostMergeActionEnum, bool) { + enum, ok := mappingExecuteMergePullRequestDetailsPostMergeActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/fork_sync_status_collection.go b/devops/fork_sync_status_collection.go new file mode 100644 index 0000000000..5b2489f7e0 --- /dev/null +++ b/devops/fork_sync_status_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ForkSyncStatusCollection A collection of Fork Sync Status summaries. +type ForkSyncStatusCollection struct { + + // List of fork sync status objects. + Items []ForkSyncStatusSummary `mandatory:"true" json:"items"` +} + +func (m ForkSyncStatusCollection) 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 ForkSyncStatusCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/fork_sync_status_summary.go b/devops/fork_sync_status_summary.go new file mode 100644 index 0000000000..8c98cfdee9 --- /dev/null +++ b/devops/fork_sync_status_summary.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ForkSyncStatusSummary Object that contains the sync status for a specific branch name. +type ForkSyncStatusSummary struct { + + // Sync status for the provided branch. + SyncStatus ForkSyncStatusSummarySyncStatusEnum `mandatory:"true" json:"syncStatus"` + + // The OCID of the child repository. + RepositoryId *string `mandatory:"true" json:"repositoryId"` + + // The branch in the child repository we are checking the sync status of. + BranchName *string `mandatory:"true" json:"branchName"` +} + +func (m ForkSyncStatusSummary) 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 ForkSyncStatusSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingForkSyncStatusSummarySyncStatusEnum(string(m.SyncStatus)); !ok && m.SyncStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SyncStatus: %s. Supported values are: %s.", m.SyncStatus, strings.Join(GetForkSyncStatusSummarySyncStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ForkSyncStatusSummarySyncStatusEnum Enum with underlying type: string +type ForkSyncStatusSummarySyncStatusEnum string + +// Set of constants representing the allowable values for ForkSyncStatusSummarySyncStatusEnum +const ( + ForkSyncStatusSummarySyncStatusInSync ForkSyncStatusSummarySyncStatusEnum = "IN_SYNC" + ForkSyncStatusSummarySyncStatusSyncInProgress ForkSyncStatusSummarySyncStatusEnum = "SYNC_IN_PROGRESS" + ForkSyncStatusSummarySyncStatusOutOfSync ForkSyncStatusSummarySyncStatusEnum = "OUT_OF_SYNC" +) + +var mappingForkSyncStatusSummarySyncStatusEnum = map[string]ForkSyncStatusSummarySyncStatusEnum{ + "IN_SYNC": ForkSyncStatusSummarySyncStatusInSync, + "SYNC_IN_PROGRESS": ForkSyncStatusSummarySyncStatusSyncInProgress, + "OUT_OF_SYNC": ForkSyncStatusSummarySyncStatusOutOfSync, +} + +var mappingForkSyncStatusSummarySyncStatusEnumLowerCase = map[string]ForkSyncStatusSummarySyncStatusEnum{ + "in_sync": ForkSyncStatusSummarySyncStatusInSync, + "sync_in_progress": ForkSyncStatusSummarySyncStatusSyncInProgress, + "out_of_sync": ForkSyncStatusSummarySyncStatusOutOfSync, +} + +// GetForkSyncStatusSummarySyncStatusEnumValues Enumerates the set of values for ForkSyncStatusSummarySyncStatusEnum +func GetForkSyncStatusSummarySyncStatusEnumValues() []ForkSyncStatusSummarySyncStatusEnum { + values := make([]ForkSyncStatusSummarySyncStatusEnum, 0) + for _, v := range mappingForkSyncStatusSummarySyncStatusEnum { + values = append(values, v) + } + return values +} + +// GetForkSyncStatusSummarySyncStatusEnumStringValues Enumerates the set of values in String for ForkSyncStatusSummarySyncStatusEnum +func GetForkSyncStatusSummarySyncStatusEnumStringValues() []string { + return []string{ + "IN_SYNC", + "SYNC_IN_PROGRESS", + "OUT_OF_SYNC", + } +} + +// GetMappingForkSyncStatusSummarySyncStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingForkSyncStatusSummarySyncStatusEnum(val string) (ForkSyncStatusSummarySyncStatusEnum, bool) { + enum, ok := mappingForkSyncStatusSummarySyncStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/generic_artifact_location_details.go b/devops/generic_artifact_location_details.go new file mode 100644 index 0000000000..c838758290 --- /dev/null +++ b/devops/generic_artifact_location_details.go @@ -0,0 +1,115 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericArtifactLocationDetails Location where artifact is uploaded for user access. +type GenericArtifactLocationDetails interface { +} + +type genericartifactlocationdetails struct { + JsonData []byte + StorageType string `json:"storageType"` +} + +// UnmarshalJSON unmarshals json +func (m *genericartifactlocationdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalergenericartifactlocationdetails genericartifactlocationdetails + s := struct { + Model Unmarshalergenericartifactlocationdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.StorageType = s.Model.StorageType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *genericartifactlocationdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.StorageType { + case "OBJECT_STORAGE": + mm := ObjectStorageGenericArtifactLocationDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for GenericArtifactLocationDetails: %s.", m.StorageType) + return *m, nil + } +} + +func (m genericartifactlocationdetails) 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 genericartifactlocationdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GenericArtifactLocationDetailsStorageTypeEnum Enum with underlying type: string +type GenericArtifactLocationDetailsStorageTypeEnum string + +// Set of constants representing the allowable values for GenericArtifactLocationDetailsStorageTypeEnum +const ( + GenericArtifactLocationDetailsStorageTypeObjectStorage GenericArtifactLocationDetailsStorageTypeEnum = "OBJECT_STORAGE" +) + +var mappingGenericArtifactLocationDetailsStorageTypeEnum = map[string]GenericArtifactLocationDetailsStorageTypeEnum{ + "OBJECT_STORAGE": GenericArtifactLocationDetailsStorageTypeObjectStorage, +} + +var mappingGenericArtifactLocationDetailsStorageTypeEnumLowerCase = map[string]GenericArtifactLocationDetailsStorageTypeEnum{ + "object_storage": GenericArtifactLocationDetailsStorageTypeObjectStorage, +} + +// GetGenericArtifactLocationDetailsStorageTypeEnumValues Enumerates the set of values for GenericArtifactLocationDetailsStorageTypeEnum +func GetGenericArtifactLocationDetailsStorageTypeEnumValues() []GenericArtifactLocationDetailsStorageTypeEnum { + values := make([]GenericArtifactLocationDetailsStorageTypeEnum, 0) + for _, v := range mappingGenericArtifactLocationDetailsStorageTypeEnum { + values = append(values, v) + } + return values +} + +// GetGenericArtifactLocationDetailsStorageTypeEnumStringValues Enumerates the set of values in String for GenericArtifactLocationDetailsStorageTypeEnum +func GetGenericArtifactLocationDetailsStorageTypeEnumStringValues() []string { + return []string{ + "OBJECT_STORAGE", + } +} + +// GetMappingGenericArtifactLocationDetailsStorageTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGenericArtifactLocationDetailsStorageTypeEnum(val string) (GenericArtifactLocationDetailsStorageTypeEnum, bool) { + enum, ok := mappingGenericArtifactLocationDetailsStorageTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/generic_artifacts.go b/devops/generic_artifacts.go new file mode 100644 index 0000000000..f4525af40c --- /dev/null +++ b/devops/generic_artifacts.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericArtifacts Details of artifact generated via pipeline run +type GenericArtifacts struct { + + // Name of stage step at which this output is generated. + StepName *string `mandatory:"true" json:"stepName"` + + // Name of artifact. + Name *string `mandatory:"true" json:"name"` + + LocationDetails GenericArtifactLocationDetails `mandatory:"true" json:"locationDetails"` +} + +// GetStepName returns StepName +func (m GenericArtifacts) GetStepName() *string { + return m.StepName +} + +func (m GenericArtifacts) 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 GenericArtifacts) 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 GenericArtifacts) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericArtifacts GenericArtifacts + s := struct { + DiscriminatorParam string `json:"outputType"` + MarshalTypeGenericArtifacts + }{ + "ARTIFACT", + (MarshalTypeGenericArtifacts)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *GenericArtifacts) UnmarshalJSON(data []byte) (e error) { + model := struct { + StepName *string `json:"stepName"` + Name *string `json:"name"` + LocationDetails genericartifactlocationdetails `json:"locationDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.StepName = model.StepName + + m.Name = model.Name + + nn, e = model.LocationDetails.UnmarshalPolymorphicJSON(model.LocationDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.LocationDetails = nn.(GenericArtifactLocationDetails) + } else { + m.LocationDetails = nil + } + + return +} diff --git a/devops/get_commit_diff_request_response.go b/devops/get_commit_diff_request_response.go index 7325e1568b..2ae236e964 100644 --- a/devops/get_commit_diff_request_response.go +++ b/devops/get_commit_diff_request_response.go @@ -27,6 +27,9 @@ type GetCommitDiffRequest struct { // The commit or reference name to compare changes against. If base version is not provided, the difference goes against an empty tree. BaseVersion *string `mandatory:"false" contributesTo:"query" name:"baseVersion"` + // The target repository identifier + TargetRepositoryId *string `mandatory:"false" contributesTo:"query" name:"targetRepositoryId"` + // Boolean value to indicate whether to use merge base or most recent revision. IsComparisonFromMergeBase *bool `mandatory:"false" contributesTo:"query" name:"isComparisonFromMergeBase"` diff --git a/devops/get_project_notification_preference_request_response.go b/devops/get_project_notification_preference_request_response.go new file mode 100644 index 0000000000..1f3fe9422f --- /dev/null +++ b/devops/get_project_notification_preference_request_response.go @@ -0,0 +1,95 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetProjectNotificationPreferenceRequest wrapper for the GetProjectNotificationPreference operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetProjectNotificationPreference.go.html to see an example of how to use GetProjectNotificationPreferenceRequest. +type GetProjectNotificationPreferenceRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // Unique principal identifier. + PrincipalId *string `mandatory:"true" contributesTo:"path" name:"principalId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetProjectNotificationPreferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetProjectNotificationPreferenceRequest) 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 GetProjectNotificationPreferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetProjectNotificationPreferenceRequest) 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 GetProjectNotificationPreferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetProjectNotificationPreferenceResponse wrapper for the GetProjectNotificationPreference operation +type GetProjectNotificationPreferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ProjectNotificationPreference instance + ProjectNotificationPreference `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetProjectNotificationPreferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetProjectNotificationPreferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_project_repository_settings_request_response.go b/devops/get_project_repository_settings_request_response.go new file mode 100644 index 0000000000..5e96bdab2f --- /dev/null +++ b/devops/get_project_repository_settings_request_response.go @@ -0,0 +1,92 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetProjectRepositorySettingsRequest wrapper for the GetProjectRepositorySettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetProjectRepositorySettings.go.html to see an example of how to use GetProjectRepositorySettingsRequest. +type GetProjectRepositorySettingsRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetProjectRepositorySettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetProjectRepositorySettingsRequest) 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 GetProjectRepositorySettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetProjectRepositorySettingsRequest) 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 GetProjectRepositorySettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetProjectRepositorySettingsResponse wrapper for the GetProjectRepositorySettings operation +type GetProjectRepositorySettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ProjectRepositorySettings instance + ProjectRepositorySettings `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetProjectRepositorySettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetProjectRepositorySettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_pull_request_attachment_content_request_response.go b/devops/get_pull_request_attachment_content_request_response.go new file mode 100644 index 0000000000..002336e04d --- /dev/null +++ b/devops/get_pull_request_attachment_content_request_response.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. + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GetPullRequestAttachmentContentRequest wrapper for the GetPullRequestAttachmentContent operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestAttachmentContent.go.html to see an example of how to use GetPullRequestAttachmentContentRequest. +type GetPullRequestAttachmentContentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest attachment identifier + AttachmentId *string `mandatory:"true" contributesTo:"path" name:"attachmentId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPullRequestAttachmentContentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPullRequestAttachmentContentRequest) 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 GetPullRequestAttachmentContentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPullRequestAttachmentContentRequest) 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 GetPullRequestAttachmentContentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPullRequestAttachmentContentResponse wrapper for the GetPullRequestAttachmentContent operation +type GetPullRequestAttachmentContentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPullRequestAttachmentContentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPullRequestAttachmentContentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_pull_request_attachment_request_response.go b/devops/get_pull_request_attachment_request_response.go new file mode 100644 index 0000000000..9ca34cfdbb --- /dev/null +++ b/devops/get_pull_request_attachment_request_response.go @@ -0,0 +1,95 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPullRequestAttachmentRequest wrapper for the GetPullRequestAttachment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestAttachment.go.html to see an example of how to use GetPullRequestAttachmentRequest. +type GetPullRequestAttachmentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest attachment identifier + AttachmentId *string `mandatory:"true" contributesTo:"path" name:"attachmentId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPullRequestAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPullRequestAttachmentRequest) 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 GetPullRequestAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPullRequestAttachmentRequest) 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 GetPullRequestAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPullRequestAttachmentResponse wrapper for the GetPullRequestAttachment operation +type GetPullRequestAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestAttachment instance + PullRequestAttachment `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPullRequestAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPullRequestAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_pull_request_change_summary_metrics_request_response.go b/devops/get_pull_request_change_summary_metrics_request_response.go new file mode 100644 index 0000000000..01aa72f925 --- /dev/null +++ b/devops/get_pull_request_change_summary_metrics_request_response.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. + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPullRequestChangeSummaryMetricsRequest wrapper for the GetPullRequestChangeSummaryMetrics operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestChangeSummaryMetrics.go.html to see an example of how to use GetPullRequestChangeSummaryMetricsRequest. +type GetPullRequestChangeSummaryMetricsRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPullRequestChangeSummaryMetricsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPullRequestChangeSummaryMetricsRequest) 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 GetPullRequestChangeSummaryMetricsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPullRequestChangeSummaryMetricsRequest) 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 GetPullRequestChangeSummaryMetricsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPullRequestChangeSummaryMetricsResponse wrapper for the GetPullRequestChangeSummaryMetrics operation +type GetPullRequestChangeSummaryMetricsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestChangeSummaryMetrics instance + PullRequestChangeSummaryMetrics `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPullRequestChangeSummaryMetricsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPullRequestChangeSummaryMetricsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_pull_request_comment_request_response.go b/devops/get_pull_request_comment_request_response.go new file mode 100644 index 0000000000..9cbe727088 --- /dev/null +++ b/devops/get_pull_request_comment_request_response.go @@ -0,0 +1,95 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPullRequestCommentRequest wrapper for the GetPullRequestComment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestComment.go.html to see an example of how to use GetPullRequestCommentRequest. +type GetPullRequestCommentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest Comment identifier + CommentId *string `mandatory:"true" contributesTo:"path" name:"commentId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPullRequestCommentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPullRequestCommentRequest) 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 GetPullRequestCommentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPullRequestCommentRequest) 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 GetPullRequestCommentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPullRequestCommentResponse wrapper for the GetPullRequestComment operation +type GetPullRequestCommentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestComment instance + PullRequestComment `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPullRequestCommentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPullRequestCommentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_pull_request_notification_preference_request_response.go b/devops/get_pull_request_notification_preference_request_response.go new file mode 100644 index 0000000000..51cbbec4d2 --- /dev/null +++ b/devops/get_pull_request_notification_preference_request_response.go @@ -0,0 +1,95 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPullRequestNotificationPreferenceRequest wrapper for the GetPullRequestNotificationPreference operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequestNotificationPreference.go.html to see an example of how to use GetPullRequestNotificationPreferenceRequest. +type GetPullRequestNotificationPreferenceRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Unique principal identifier. + PrincipalId *string `mandatory:"true" contributesTo:"path" name:"principalId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPullRequestNotificationPreferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPullRequestNotificationPreferenceRequest) 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 GetPullRequestNotificationPreferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPullRequestNotificationPreferenceRequest) 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 GetPullRequestNotificationPreferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPullRequestNotificationPreferenceResponse wrapper for the GetPullRequestNotificationPreference operation +type GetPullRequestNotificationPreferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestNotificationPreference instance + PullRequestNotificationPreference `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPullRequestNotificationPreferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPullRequestNotificationPreferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_pull_request_request_response.go b/devops/get_pull_request_request_response.go new file mode 100644 index 0000000000..56ce14e079 --- /dev/null +++ b/devops/get_pull_request_request_response.go @@ -0,0 +1,92 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPullRequestRequest wrapper for the GetPullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetPullRequest.go.html to see an example of how to use GetPullRequestRequest. +type GetPullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPullRequestRequest) 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 GetPullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPullRequestRequest) 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 GetPullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPullRequestResponse wrapper for the GetPullRequest operation +type GetPullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_repository_notification_preference_request_response.go b/devops/get_repository_notification_preference_request_response.go new file mode 100644 index 0000000000..83bace662a --- /dev/null +++ b/devops/get_repository_notification_preference_request_response.go @@ -0,0 +1,95 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetRepositoryNotificationPreferenceRequest wrapper for the GetRepositoryNotificationPreference operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositoryNotificationPreference.go.html to see an example of how to use GetRepositoryNotificationPreferenceRequest. +type GetRepositoryNotificationPreferenceRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Unique principal identifier. + PrincipalId *string `mandatory:"true" contributesTo:"path" name:"principalId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRepositoryNotificationPreferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRepositoryNotificationPreferenceRequest) 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 GetRepositoryNotificationPreferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRepositoryNotificationPreferenceRequest) 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 GetRepositoryNotificationPreferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetRepositoryNotificationPreferenceResponse wrapper for the GetRepositoryNotificationPreference operation +type GetRepositoryNotificationPreferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RepositoryNotificationPreference instance + RepositoryNotificationPreference `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetRepositoryNotificationPreferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRepositoryNotificationPreferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/get_repository_settings_request_response.go b/devops/get_repository_settings_request_response.go new file mode 100644 index 0000000000..01bf28d89a --- /dev/null +++ b/devops/get_repository_settings_request_response.go @@ -0,0 +1,92 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetRepositorySettingsRequest wrapper for the GetRepositorySettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/GetRepositorySettings.go.html to see an example of how to use GetRepositorySettingsRequest. +type GetRepositorySettingsRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRepositorySettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRepositorySettingsRequest) 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 GetRepositorySettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRepositorySettingsRequest) 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 GetRepositorySettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetRepositorySettingsResponse wrapper for the GetRepositorySettings operation +type GetRepositorySettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RepositorySettings instance + RepositorySettings `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetRepositorySettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRepositorySettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/like_pull_request_comment_request_response.go b/devops/like_pull_request_comment_request_response.go new file mode 100644 index 0000000000..042222f75e --- /dev/null +++ b/devops/like_pull_request_comment_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// LikePullRequestCommentRequest wrapper for the LikePullRequestComment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/LikePullRequestComment.go.html to see an example of how to use LikePullRequestCommentRequest. +type LikePullRequestCommentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest Comment identifier + CommentId *string `mandatory:"true" contributesTo:"path" name:"commentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request LikePullRequestCommentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request LikePullRequestCommentRequest) 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 LikePullRequestCommentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request LikePullRequestCommentRequest) 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 LikePullRequestCommentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LikePullRequestCommentResponse wrapper for the LikePullRequestComment operation +type LikePullRequestCommentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestComment instance + PullRequestComment `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response LikePullRequestCommentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response LikePullRequestCommentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/list_build_run_snapshots_request_response.go b/devops/list_build_run_snapshots_request_response.go new file mode 100644 index 0000000000..8cc7ada603 --- /dev/null +++ b/devops/list_build_run_snapshots_request_response.go @@ -0,0 +1,203 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBuildRunSnapshotsRequest wrapper for the ListBuildRunSnapshots operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListBuildRunSnapshots.go.html to see an example of how to use ListBuildRunSnapshotsRequest. +type ListBuildRunSnapshotsRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Unique build pipeline identifier. + PipelineId *string `mandatory:"false" contributesTo:"query" name:"pipelineId"` + + // Unique build run identifier. + BuildRunId *string `mandatory:"false" contributesTo:"query" name:"buildRunId"` + + // Commit ID in a repository. + CommitId *string `mandatory:"false" contributesTo:"query" name:"commitId"` + + // 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. Use either ascending or descending. + SortOrder ListBuildRunSnapshotsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for name is ascending. If no value is specified time created is default. + SortBy ListBuildRunSnapshotsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBuildRunSnapshotsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBuildRunSnapshotsRequest) 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 ListBuildRunSnapshotsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBuildRunSnapshotsRequest) 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 ListBuildRunSnapshotsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListBuildRunSnapshotsSortOrderEnum(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(GetListBuildRunSnapshotsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListBuildRunSnapshotsSortByEnum(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(GetListBuildRunSnapshotsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBuildRunSnapshotsResponse wrapper for the ListBuildRunSnapshots operation +type ListBuildRunSnapshotsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of BuildRunSnapshotCollection instances + BuildRunSnapshotCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListBuildRunSnapshotsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBuildRunSnapshotsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBuildRunSnapshotsSortOrderEnum Enum with underlying type: string +type ListBuildRunSnapshotsSortOrderEnum string + +// Set of constants representing the allowable values for ListBuildRunSnapshotsSortOrderEnum +const ( + ListBuildRunSnapshotsSortOrderAsc ListBuildRunSnapshotsSortOrderEnum = "ASC" + ListBuildRunSnapshotsSortOrderDesc ListBuildRunSnapshotsSortOrderEnum = "DESC" +) + +var mappingListBuildRunSnapshotsSortOrderEnum = map[string]ListBuildRunSnapshotsSortOrderEnum{ + "ASC": ListBuildRunSnapshotsSortOrderAsc, + "DESC": ListBuildRunSnapshotsSortOrderDesc, +} + +var mappingListBuildRunSnapshotsSortOrderEnumLowerCase = map[string]ListBuildRunSnapshotsSortOrderEnum{ + "asc": ListBuildRunSnapshotsSortOrderAsc, + "desc": ListBuildRunSnapshotsSortOrderDesc, +} + +// GetListBuildRunSnapshotsSortOrderEnumValues Enumerates the set of values for ListBuildRunSnapshotsSortOrderEnum +func GetListBuildRunSnapshotsSortOrderEnumValues() []ListBuildRunSnapshotsSortOrderEnum { + values := make([]ListBuildRunSnapshotsSortOrderEnum, 0) + for _, v := range mappingListBuildRunSnapshotsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListBuildRunSnapshotsSortOrderEnumStringValues Enumerates the set of values in String for ListBuildRunSnapshotsSortOrderEnum +func GetListBuildRunSnapshotsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListBuildRunSnapshotsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBuildRunSnapshotsSortOrderEnum(val string) (ListBuildRunSnapshotsSortOrderEnum, bool) { + enum, ok := mappingListBuildRunSnapshotsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListBuildRunSnapshotsSortByEnum Enum with underlying type: string +type ListBuildRunSnapshotsSortByEnum string + +// Set of constants representing the allowable values for ListBuildRunSnapshotsSortByEnum +const ( + ListBuildRunSnapshotsSortByTimecreated ListBuildRunSnapshotsSortByEnum = "timeCreated" + ListBuildRunSnapshotsSortByName ListBuildRunSnapshotsSortByEnum = "name" +) + +var mappingListBuildRunSnapshotsSortByEnum = map[string]ListBuildRunSnapshotsSortByEnum{ + "timeCreated": ListBuildRunSnapshotsSortByTimecreated, + "name": ListBuildRunSnapshotsSortByName, +} + +var mappingListBuildRunSnapshotsSortByEnumLowerCase = map[string]ListBuildRunSnapshotsSortByEnum{ + "timecreated": ListBuildRunSnapshotsSortByTimecreated, + "name": ListBuildRunSnapshotsSortByName, +} + +// GetListBuildRunSnapshotsSortByEnumValues Enumerates the set of values for ListBuildRunSnapshotsSortByEnum +func GetListBuildRunSnapshotsSortByEnumValues() []ListBuildRunSnapshotsSortByEnum { + values := make([]ListBuildRunSnapshotsSortByEnum, 0) + for _, v := range mappingListBuildRunSnapshotsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListBuildRunSnapshotsSortByEnumStringValues Enumerates the set of values in String for ListBuildRunSnapshotsSortByEnum +func GetListBuildRunSnapshotsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "name", + } +} + +// GetMappingListBuildRunSnapshotsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBuildRunSnapshotsSortByEnum(val string) (ListBuildRunSnapshotsSortByEnum, bool) { + enum, ok := mappingListBuildRunSnapshotsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_commit_diffs_request_response.go b/devops/list_commit_diffs_request_response.go index 76c44f0ef2..f36a268705 100644 --- a/devops/list_commit_diffs_request_response.go +++ b/devops/list_commit_diffs_request_response.go @@ -27,6 +27,9 @@ type ListCommitDiffsRequest struct { // The commit or reference name where changes are coming from. TargetVersion *string `mandatory:"true" contributesTo:"query" name:"targetVersion"` + // The target repository identifier + TargetRepositoryId *string `mandatory:"false" contributesTo:"query" name:"targetRepositoryId"` + // Boolean value to indicate whether to use merge base or most recent revision. IsComparisonFromMergeBase *bool `mandatory:"false" contributesTo:"query" name:"isComparisonFromMergeBase"` diff --git a/devops/list_fork_sync_statuses_request_response.go b/devops/list_fork_sync_statuses_request_response.go new file mode 100644 index 0000000000..c3b56b4ebc --- /dev/null +++ b/devops/list_fork_sync_statuses_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListForkSyncStatusesRequest wrapper for the ListForkSyncStatuses operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListForkSyncStatuses.go.html to see an example of how to use ListForkSyncStatusesRequest. +type ListForkSyncStatusesRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Specifies the branch for which the fork sync status will be checked. + BranchNameQueryParam *string `mandatory:"true" contributesTo:"query" name:"branchNameQueryParam"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListForkSyncStatusesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListForkSyncStatusesRequest) 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 ListForkSyncStatusesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListForkSyncStatusesRequest) 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 ListForkSyncStatusesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListForkSyncStatusesResponse wrapper for the ListForkSyncStatuses operation +type ListForkSyncStatusesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ForkSyncStatusCollection instance + ForkSyncStatusCollection `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListForkSyncStatusesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListForkSyncStatusesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/list_project_commit_analytics_authors_request_response.go b/devops/list_project_commit_analytics_authors_request_response.go new file mode 100644 index 0000000000..732f558022 --- /dev/null +++ b/devops/list_project_commit_analytics_authors_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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListProjectCommitAnalyticsAuthorsRequest wrapper for the ListProjectCommitAnalyticsAuthors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListProjectCommitAnalyticsAuthors.go.html to see an example of how to use ListProjectCommitAnalyticsAuthorsRequest. +type ListProjectCommitAnalyticsAuthorsRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // 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. Use either ascending or descending. + SortOrder ListProjectCommitAnalyticsAuthorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + SortBy ListProjectCommitAnalyticsAuthorsSortByEnum `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 ListProjectCommitAnalyticsAuthorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListProjectCommitAnalyticsAuthorsRequest) 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 ListProjectCommitAnalyticsAuthorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListProjectCommitAnalyticsAuthorsRequest) 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 ListProjectCommitAnalyticsAuthorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListProjectCommitAnalyticsAuthorsSortOrderEnum(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(GetListProjectCommitAnalyticsAuthorsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListProjectCommitAnalyticsAuthorsSortByEnum(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(GetListProjectCommitAnalyticsAuthorsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListProjectCommitAnalyticsAuthorsResponse wrapper for the ListProjectCommitAnalyticsAuthors operation +type ListProjectCommitAnalyticsAuthorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CommitAnalyticsAuthorCollection instances + CommitAnalyticsAuthorCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListProjectCommitAnalyticsAuthorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListProjectCommitAnalyticsAuthorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListProjectCommitAnalyticsAuthorsSortOrderEnum Enum with underlying type: string +type ListProjectCommitAnalyticsAuthorsSortOrderEnum string + +// Set of constants representing the allowable values for ListProjectCommitAnalyticsAuthorsSortOrderEnum +const ( + ListProjectCommitAnalyticsAuthorsSortOrderAsc ListProjectCommitAnalyticsAuthorsSortOrderEnum = "ASC" + ListProjectCommitAnalyticsAuthorsSortOrderDesc ListProjectCommitAnalyticsAuthorsSortOrderEnum = "DESC" +) + +var mappingListProjectCommitAnalyticsAuthorsSortOrderEnum = map[string]ListProjectCommitAnalyticsAuthorsSortOrderEnum{ + "ASC": ListProjectCommitAnalyticsAuthorsSortOrderAsc, + "DESC": ListProjectCommitAnalyticsAuthorsSortOrderDesc, +} + +var mappingListProjectCommitAnalyticsAuthorsSortOrderEnumLowerCase = map[string]ListProjectCommitAnalyticsAuthorsSortOrderEnum{ + "asc": ListProjectCommitAnalyticsAuthorsSortOrderAsc, + "desc": ListProjectCommitAnalyticsAuthorsSortOrderDesc, +} + +// GetListProjectCommitAnalyticsAuthorsSortOrderEnumValues Enumerates the set of values for ListProjectCommitAnalyticsAuthorsSortOrderEnum +func GetListProjectCommitAnalyticsAuthorsSortOrderEnumValues() []ListProjectCommitAnalyticsAuthorsSortOrderEnum { + values := make([]ListProjectCommitAnalyticsAuthorsSortOrderEnum, 0) + for _, v := range mappingListProjectCommitAnalyticsAuthorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListProjectCommitAnalyticsAuthorsSortOrderEnumStringValues Enumerates the set of values in String for ListProjectCommitAnalyticsAuthorsSortOrderEnum +func GetListProjectCommitAnalyticsAuthorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListProjectCommitAnalyticsAuthorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProjectCommitAnalyticsAuthorsSortOrderEnum(val string) (ListProjectCommitAnalyticsAuthorsSortOrderEnum, bool) { + enum, ok := mappingListProjectCommitAnalyticsAuthorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListProjectCommitAnalyticsAuthorsSortByEnum Enum with underlying type: string +type ListProjectCommitAnalyticsAuthorsSortByEnum string + +// Set of constants representing the allowable values for ListProjectCommitAnalyticsAuthorsSortByEnum +const ( + ListProjectCommitAnalyticsAuthorsSortByAuthorname ListProjectCommitAnalyticsAuthorsSortByEnum = "authorName" +) + +var mappingListProjectCommitAnalyticsAuthorsSortByEnum = map[string]ListProjectCommitAnalyticsAuthorsSortByEnum{ + "authorName": ListProjectCommitAnalyticsAuthorsSortByAuthorname, +} + +var mappingListProjectCommitAnalyticsAuthorsSortByEnumLowerCase = map[string]ListProjectCommitAnalyticsAuthorsSortByEnum{ + "authorname": ListProjectCommitAnalyticsAuthorsSortByAuthorname, +} + +// GetListProjectCommitAnalyticsAuthorsSortByEnumValues Enumerates the set of values for ListProjectCommitAnalyticsAuthorsSortByEnum +func GetListProjectCommitAnalyticsAuthorsSortByEnumValues() []ListProjectCommitAnalyticsAuthorsSortByEnum { + values := make([]ListProjectCommitAnalyticsAuthorsSortByEnum, 0) + for _, v := range mappingListProjectCommitAnalyticsAuthorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListProjectCommitAnalyticsAuthorsSortByEnumStringValues Enumerates the set of values in String for ListProjectCommitAnalyticsAuthorsSortByEnum +func GetListProjectCommitAnalyticsAuthorsSortByEnumStringValues() []string { + return []string{ + "authorName", + } +} + +// GetMappingListProjectCommitAnalyticsAuthorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProjectCommitAnalyticsAuthorsSortByEnum(val string) (ListProjectCommitAnalyticsAuthorsSortByEnum, bool) { + enum, ok := mappingListProjectCommitAnalyticsAuthorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_protected_branches_request_response.go b/devops/list_protected_branches_request_response.go new file mode 100644 index 0000000000..d2315f4a0f --- /dev/null +++ b/devops/list_protected_branches_request_response.go @@ -0,0 +1,193 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListProtectedBranchesRequest wrapper for the ListProtectedBranches operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListProtectedBranches.go.html to see an example of how to use ListProtectedBranchesRequest. +type ListProtectedBranchesRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // A filter to return only resources that match the given branch name. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // 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. Use either ascending or descending. + SortOrder ListProtectedBranchesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for branch name is ascending. If no value is specified branch name is default. + SortBy ListProtectedBranchesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListProtectedBranchesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListProtectedBranchesRequest) 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 ListProtectedBranchesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListProtectedBranchesRequest) 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 ListProtectedBranchesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListProtectedBranchesSortOrderEnum(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(GetListProtectedBranchesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListProtectedBranchesSortByEnum(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(GetListProtectedBranchesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListProtectedBranchesResponse wrapper for the ListProtectedBranches operation +type ListProtectedBranchesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ProtectedBranchCollection instances + ProtectedBranchCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListProtectedBranchesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListProtectedBranchesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListProtectedBranchesSortOrderEnum Enum with underlying type: string +type ListProtectedBranchesSortOrderEnum string + +// Set of constants representing the allowable values for ListProtectedBranchesSortOrderEnum +const ( + ListProtectedBranchesSortOrderAsc ListProtectedBranchesSortOrderEnum = "ASC" + ListProtectedBranchesSortOrderDesc ListProtectedBranchesSortOrderEnum = "DESC" +) + +var mappingListProtectedBranchesSortOrderEnum = map[string]ListProtectedBranchesSortOrderEnum{ + "ASC": ListProtectedBranchesSortOrderAsc, + "DESC": ListProtectedBranchesSortOrderDesc, +} + +var mappingListProtectedBranchesSortOrderEnumLowerCase = map[string]ListProtectedBranchesSortOrderEnum{ + "asc": ListProtectedBranchesSortOrderAsc, + "desc": ListProtectedBranchesSortOrderDesc, +} + +// GetListProtectedBranchesSortOrderEnumValues Enumerates the set of values for ListProtectedBranchesSortOrderEnum +func GetListProtectedBranchesSortOrderEnumValues() []ListProtectedBranchesSortOrderEnum { + values := make([]ListProtectedBranchesSortOrderEnum, 0) + for _, v := range mappingListProtectedBranchesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListProtectedBranchesSortOrderEnumStringValues Enumerates the set of values in String for ListProtectedBranchesSortOrderEnum +func GetListProtectedBranchesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListProtectedBranchesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProtectedBranchesSortOrderEnum(val string) (ListProtectedBranchesSortOrderEnum, bool) { + enum, ok := mappingListProtectedBranchesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListProtectedBranchesSortByEnum Enum with underlying type: string +type ListProtectedBranchesSortByEnum string + +// Set of constants representing the allowable values for ListProtectedBranchesSortByEnum +const ( + ListProtectedBranchesSortByBranchname ListProtectedBranchesSortByEnum = "branchName" +) + +var mappingListProtectedBranchesSortByEnum = map[string]ListProtectedBranchesSortByEnum{ + "branchName": ListProtectedBranchesSortByBranchname, +} + +var mappingListProtectedBranchesSortByEnumLowerCase = map[string]ListProtectedBranchesSortByEnum{ + "branchname": ListProtectedBranchesSortByBranchname, +} + +// GetListProtectedBranchesSortByEnumValues Enumerates the set of values for ListProtectedBranchesSortByEnum +func GetListProtectedBranchesSortByEnumValues() []ListProtectedBranchesSortByEnum { + values := make([]ListProtectedBranchesSortByEnum, 0) + for _, v := range mappingListProtectedBranchesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListProtectedBranchesSortByEnumStringValues Enumerates the set of values in String for ListProtectedBranchesSortByEnum +func GetListProtectedBranchesSortByEnumStringValues() []string { + return []string{ + "branchName", + } +} + +// GetMappingListProtectedBranchesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProtectedBranchesSortByEnum(val string) (ListProtectedBranchesSortByEnum, bool) { + enum, ok := mappingListProtectedBranchesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_pull_request_activities_request_response.go b/devops/list_pull_request_activities_request_response.go new file mode 100644 index 0000000000..5aa4c6b446 --- /dev/null +++ b/devops/list_pull_request_activities_request_response.go @@ -0,0 +1,206 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPullRequestActivitiesRequest wrapper for the ListPullRequestActivities operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestActivities.go.html to see an example of how to use ListPullRequestActivitiesRequest. +type ListPullRequestActivitiesRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // An optional filter to list activities based on activity type. If no value is specified, all activity types will returned. + ActivityType ListPullRequestActivitiesActivityTypeEnum `mandatory:"false" contributesTo:"query" name:"activityType" omitEmpty:"true"` + + // The sort order to use. Use either ascending or descending. + SortOrder ListPullRequestActivitiesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPullRequestActivitiesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPullRequestActivitiesRequest) 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 ListPullRequestActivitiesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPullRequestActivitiesRequest) 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 ListPullRequestActivitiesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPullRequestActivitiesActivityTypeEnum(string(request.ActivityType)); !ok && request.ActivityType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActivityType: %s. Supported values are: %s.", request.ActivityType, strings.Join(GetListPullRequestActivitiesActivityTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListPullRequestActivitiesSortOrderEnum(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(GetListPullRequestActivitiesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPullRequestActivitiesResponse wrapper for the ListPullRequestActivities operation +type ListPullRequestActivitiesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PullRequestActivityCollection instances + PullRequestActivityCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListPullRequestActivitiesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPullRequestActivitiesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPullRequestActivitiesActivityTypeEnum Enum with underlying type: string +type ListPullRequestActivitiesActivityTypeEnum string + +// Set of constants representing the allowable values for ListPullRequestActivitiesActivityTypeEnum +const ( + ListPullRequestActivitiesActivityTypeLifecycle ListPullRequestActivitiesActivityTypeEnum = "LIFECYCLE" + ListPullRequestActivitiesActivityTypeApproval ListPullRequestActivitiesActivityTypeEnum = "APPROVAL" + ListPullRequestActivitiesActivityTypeCommit ListPullRequestActivitiesActivityTypeEnum = "COMMIT" + ListPullRequestActivitiesActivityTypeReviewer ListPullRequestActivitiesActivityTypeEnum = "REVIEWER" + ListPullRequestActivitiesActivityTypeComment ListPullRequestActivitiesActivityTypeEnum = "COMMENT" +) + +var mappingListPullRequestActivitiesActivityTypeEnum = map[string]ListPullRequestActivitiesActivityTypeEnum{ + "LIFECYCLE": ListPullRequestActivitiesActivityTypeLifecycle, + "APPROVAL": ListPullRequestActivitiesActivityTypeApproval, + "COMMIT": ListPullRequestActivitiesActivityTypeCommit, + "REVIEWER": ListPullRequestActivitiesActivityTypeReviewer, + "COMMENT": ListPullRequestActivitiesActivityTypeComment, +} + +var mappingListPullRequestActivitiesActivityTypeEnumLowerCase = map[string]ListPullRequestActivitiesActivityTypeEnum{ + "lifecycle": ListPullRequestActivitiesActivityTypeLifecycle, + "approval": ListPullRequestActivitiesActivityTypeApproval, + "commit": ListPullRequestActivitiesActivityTypeCommit, + "reviewer": ListPullRequestActivitiesActivityTypeReviewer, + "comment": ListPullRequestActivitiesActivityTypeComment, +} + +// GetListPullRequestActivitiesActivityTypeEnumValues Enumerates the set of values for ListPullRequestActivitiesActivityTypeEnum +func GetListPullRequestActivitiesActivityTypeEnumValues() []ListPullRequestActivitiesActivityTypeEnum { + values := make([]ListPullRequestActivitiesActivityTypeEnum, 0) + for _, v := range mappingListPullRequestActivitiesActivityTypeEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestActivitiesActivityTypeEnumStringValues Enumerates the set of values in String for ListPullRequestActivitiesActivityTypeEnum +func GetListPullRequestActivitiesActivityTypeEnumStringValues() []string { + return []string{ + "LIFECYCLE", + "APPROVAL", + "COMMIT", + "REVIEWER", + "COMMENT", + } +} + +// GetMappingListPullRequestActivitiesActivityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestActivitiesActivityTypeEnum(val string) (ListPullRequestActivitiesActivityTypeEnum, bool) { + enum, ok := mappingListPullRequestActivitiesActivityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPullRequestActivitiesSortOrderEnum Enum with underlying type: string +type ListPullRequestActivitiesSortOrderEnum string + +// Set of constants representing the allowable values for ListPullRequestActivitiesSortOrderEnum +const ( + ListPullRequestActivitiesSortOrderAsc ListPullRequestActivitiesSortOrderEnum = "ASC" + ListPullRequestActivitiesSortOrderDesc ListPullRequestActivitiesSortOrderEnum = "DESC" +) + +var mappingListPullRequestActivitiesSortOrderEnum = map[string]ListPullRequestActivitiesSortOrderEnum{ + "ASC": ListPullRequestActivitiesSortOrderAsc, + "DESC": ListPullRequestActivitiesSortOrderDesc, +} + +var mappingListPullRequestActivitiesSortOrderEnumLowerCase = map[string]ListPullRequestActivitiesSortOrderEnum{ + "asc": ListPullRequestActivitiesSortOrderAsc, + "desc": ListPullRequestActivitiesSortOrderDesc, +} + +// GetListPullRequestActivitiesSortOrderEnumValues Enumerates the set of values for ListPullRequestActivitiesSortOrderEnum +func GetListPullRequestActivitiesSortOrderEnumValues() []ListPullRequestActivitiesSortOrderEnum { + values := make([]ListPullRequestActivitiesSortOrderEnum, 0) + for _, v := range mappingListPullRequestActivitiesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestActivitiesSortOrderEnumStringValues Enumerates the set of values in String for ListPullRequestActivitiesSortOrderEnum +func GetListPullRequestActivitiesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPullRequestActivitiesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestActivitiesSortOrderEnum(val string) (ListPullRequestActivitiesSortOrderEnum, bool) { + enum, ok := mappingListPullRequestActivitiesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_pull_request_attachments_request_response.go b/devops/list_pull_request_attachments_request_response.go new file mode 100644 index 0000000000..84109604c8 --- /dev/null +++ b/devops/list_pull_request_attachments_request_response.go @@ -0,0 +1,204 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPullRequestAttachmentsRequest wrapper for the ListPullRequestAttachments operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestAttachments.go.html to see an example of how to use ListPullRequestAttachmentsRequest. +type ListPullRequestAttachmentsRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // The OCID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The sort order to use. Use either ascending or descending. + SortOrder ListPullRequestAttachmentsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + SortBy ListPullRequestAttachmentsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // A filter to return only resources that match the entire file name given. + FileName *string `mandatory:"false" contributesTo:"query" name:"fileName"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPullRequestAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPullRequestAttachmentsRequest) 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 ListPullRequestAttachmentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPullRequestAttachmentsRequest) 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 ListPullRequestAttachmentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPullRequestAttachmentsSortOrderEnum(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(GetListPullRequestAttachmentsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPullRequestAttachmentsSortByEnum(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(GetListPullRequestAttachmentsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPullRequestAttachmentsResponse wrapper for the ListPullRequestAttachments operation +type ListPullRequestAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PullRequestAttachmentCollection instances + PullRequestAttachmentCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListPullRequestAttachmentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPullRequestAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPullRequestAttachmentsSortOrderEnum Enum with underlying type: string +type ListPullRequestAttachmentsSortOrderEnum string + +// Set of constants representing the allowable values for ListPullRequestAttachmentsSortOrderEnum +const ( + ListPullRequestAttachmentsSortOrderAsc ListPullRequestAttachmentsSortOrderEnum = "ASC" + ListPullRequestAttachmentsSortOrderDesc ListPullRequestAttachmentsSortOrderEnum = "DESC" +) + +var mappingListPullRequestAttachmentsSortOrderEnum = map[string]ListPullRequestAttachmentsSortOrderEnum{ + "ASC": ListPullRequestAttachmentsSortOrderAsc, + "DESC": ListPullRequestAttachmentsSortOrderDesc, +} + +var mappingListPullRequestAttachmentsSortOrderEnumLowerCase = map[string]ListPullRequestAttachmentsSortOrderEnum{ + "asc": ListPullRequestAttachmentsSortOrderAsc, + "desc": ListPullRequestAttachmentsSortOrderDesc, +} + +// GetListPullRequestAttachmentsSortOrderEnumValues Enumerates the set of values for ListPullRequestAttachmentsSortOrderEnum +func GetListPullRequestAttachmentsSortOrderEnumValues() []ListPullRequestAttachmentsSortOrderEnum { + values := make([]ListPullRequestAttachmentsSortOrderEnum, 0) + for _, v := range mappingListPullRequestAttachmentsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestAttachmentsSortOrderEnumStringValues Enumerates the set of values in String for ListPullRequestAttachmentsSortOrderEnum +func GetListPullRequestAttachmentsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPullRequestAttachmentsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestAttachmentsSortOrderEnum(val string) (ListPullRequestAttachmentsSortOrderEnum, bool) { + enum, ok := mappingListPullRequestAttachmentsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPullRequestAttachmentsSortByEnum Enum with underlying type: string +type ListPullRequestAttachmentsSortByEnum string + +// Set of constants representing the allowable values for ListPullRequestAttachmentsSortByEnum +const ( + ListPullRequestAttachmentsSortByFilename ListPullRequestAttachmentsSortByEnum = "fileName" + ListPullRequestAttachmentsSortByTimecreated ListPullRequestAttachmentsSortByEnum = "timeCreated" + ListPullRequestAttachmentsSortByCreatedby ListPullRequestAttachmentsSortByEnum = "createdBy" +) + +var mappingListPullRequestAttachmentsSortByEnum = map[string]ListPullRequestAttachmentsSortByEnum{ + "fileName": ListPullRequestAttachmentsSortByFilename, + "timeCreated": ListPullRequestAttachmentsSortByTimecreated, + "createdBy": ListPullRequestAttachmentsSortByCreatedby, +} + +var mappingListPullRequestAttachmentsSortByEnumLowerCase = map[string]ListPullRequestAttachmentsSortByEnum{ + "filename": ListPullRequestAttachmentsSortByFilename, + "timecreated": ListPullRequestAttachmentsSortByTimecreated, + "createdby": ListPullRequestAttachmentsSortByCreatedby, +} + +// GetListPullRequestAttachmentsSortByEnumValues Enumerates the set of values for ListPullRequestAttachmentsSortByEnum +func GetListPullRequestAttachmentsSortByEnumValues() []ListPullRequestAttachmentsSortByEnum { + values := make([]ListPullRequestAttachmentsSortByEnum, 0) + for _, v := range mappingListPullRequestAttachmentsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestAttachmentsSortByEnumStringValues Enumerates the set of values in String for ListPullRequestAttachmentsSortByEnum +func GetListPullRequestAttachmentsSortByEnumStringValues() []string { + return []string{ + "fileName", + "timeCreated", + "createdBy", + } +} + +// GetMappingListPullRequestAttachmentsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestAttachmentsSortByEnum(val string) (ListPullRequestAttachmentsSortByEnum, bool) { + enum, ok := mappingListPullRequestAttachmentsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_pull_request_authors_request_response.go b/devops/list_pull_request_authors_request_response.go new file mode 100644 index 0000000000..abfcfc85ea --- /dev/null +++ b/devops/list_pull_request_authors_request_response.go @@ -0,0 +1,146 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPullRequestAuthorsRequest wrapper for the ListPullRequestAuthors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestAuthors.go.html to see an example of how to use ListPullRequestAuthorsRequest. +type ListPullRequestAuthorsRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // 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. Use either ascending or descending. + SortOrder ListPullRequestAuthorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPullRequestAuthorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPullRequestAuthorsRequest) 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 ListPullRequestAuthorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPullRequestAuthorsRequest) 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 ListPullRequestAuthorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPullRequestAuthorsSortOrderEnum(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(GetListPullRequestAuthorsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPullRequestAuthorsResponse wrapper for the ListPullRequestAuthors operation +type ListPullRequestAuthorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PullRequestAuthorCollection instances + PullRequestAuthorCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListPullRequestAuthorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPullRequestAuthorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPullRequestAuthorsSortOrderEnum Enum with underlying type: string +type ListPullRequestAuthorsSortOrderEnum string + +// Set of constants representing the allowable values for ListPullRequestAuthorsSortOrderEnum +const ( + ListPullRequestAuthorsSortOrderAsc ListPullRequestAuthorsSortOrderEnum = "ASC" + ListPullRequestAuthorsSortOrderDesc ListPullRequestAuthorsSortOrderEnum = "DESC" +) + +var mappingListPullRequestAuthorsSortOrderEnum = map[string]ListPullRequestAuthorsSortOrderEnum{ + "ASC": ListPullRequestAuthorsSortOrderAsc, + "DESC": ListPullRequestAuthorsSortOrderDesc, +} + +var mappingListPullRequestAuthorsSortOrderEnumLowerCase = map[string]ListPullRequestAuthorsSortOrderEnum{ + "asc": ListPullRequestAuthorsSortOrderAsc, + "desc": ListPullRequestAuthorsSortOrderDesc, +} + +// GetListPullRequestAuthorsSortOrderEnumValues Enumerates the set of values for ListPullRequestAuthorsSortOrderEnum +func GetListPullRequestAuthorsSortOrderEnumValues() []ListPullRequestAuthorsSortOrderEnum { + values := make([]ListPullRequestAuthorsSortOrderEnum, 0) + for _, v := range mappingListPullRequestAuthorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestAuthorsSortOrderEnumStringValues Enumerates the set of values in String for ListPullRequestAuthorsSortOrderEnum +func GetListPullRequestAuthorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPullRequestAuthorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestAuthorsSortOrderEnum(val string) (ListPullRequestAuthorsSortOrderEnum, bool) { + enum, ok := mappingListPullRequestAuthorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_pull_request_comments_request_response.go b/devops/list_pull_request_comments_request_response.go new file mode 100644 index 0000000000..01b1b0daa8 --- /dev/null +++ b/devops/list_pull_request_comments_request_response.go @@ -0,0 +1,206 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPullRequestCommentsRequest wrapper for the ListPullRequestComments operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestComments.go.html to see an example of how to use ListPullRequestCommentsRequest. +type ListPullRequestCommentsRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // The OCID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The sort order to use. Use either ascending or descending. + SortOrder ListPullRequestCommentsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + SortBy ListPullRequestCommentsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // unique PullRequest Comment identifier + CommentId *string `mandatory:"false" contributesTo:"query" name:"commentId"` + + // PullRequest Comment Commit SHA + CommitId *string `mandatory:"false" contributesTo:"query" name:"commitId"` + + // PullRequest File Path + FilePath *string `mandatory:"false" contributesTo:"query" name:"filePath"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPullRequestCommentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPullRequestCommentsRequest) 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 ListPullRequestCommentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPullRequestCommentsRequest) 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 ListPullRequestCommentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPullRequestCommentsSortOrderEnum(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(GetListPullRequestCommentsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPullRequestCommentsSortByEnum(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(GetListPullRequestCommentsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPullRequestCommentsResponse wrapper for the ListPullRequestComments operation +type ListPullRequestCommentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PullRequestCommentCollection instances + PullRequestCommentCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListPullRequestCommentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPullRequestCommentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPullRequestCommentsSortOrderEnum Enum with underlying type: string +type ListPullRequestCommentsSortOrderEnum string + +// Set of constants representing the allowable values for ListPullRequestCommentsSortOrderEnum +const ( + ListPullRequestCommentsSortOrderAsc ListPullRequestCommentsSortOrderEnum = "ASC" + ListPullRequestCommentsSortOrderDesc ListPullRequestCommentsSortOrderEnum = "DESC" +) + +var mappingListPullRequestCommentsSortOrderEnum = map[string]ListPullRequestCommentsSortOrderEnum{ + "ASC": ListPullRequestCommentsSortOrderAsc, + "DESC": ListPullRequestCommentsSortOrderDesc, +} + +var mappingListPullRequestCommentsSortOrderEnumLowerCase = map[string]ListPullRequestCommentsSortOrderEnum{ + "asc": ListPullRequestCommentsSortOrderAsc, + "desc": ListPullRequestCommentsSortOrderDesc, +} + +// GetListPullRequestCommentsSortOrderEnumValues Enumerates the set of values for ListPullRequestCommentsSortOrderEnum +func GetListPullRequestCommentsSortOrderEnumValues() []ListPullRequestCommentsSortOrderEnum { + values := make([]ListPullRequestCommentsSortOrderEnum, 0) + for _, v := range mappingListPullRequestCommentsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestCommentsSortOrderEnumStringValues Enumerates the set of values in String for ListPullRequestCommentsSortOrderEnum +func GetListPullRequestCommentsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPullRequestCommentsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestCommentsSortOrderEnum(val string) (ListPullRequestCommentsSortOrderEnum, bool) { + enum, ok := mappingListPullRequestCommentsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPullRequestCommentsSortByEnum Enum with underlying type: string +type ListPullRequestCommentsSortByEnum string + +// Set of constants representing the allowable values for ListPullRequestCommentsSortByEnum +const ( + ListPullRequestCommentsSortByTimecreated ListPullRequestCommentsSortByEnum = "timeCreated" + ListPullRequestCommentsSortByCreatedby ListPullRequestCommentsSortByEnum = "createdBy" +) + +var mappingListPullRequestCommentsSortByEnum = map[string]ListPullRequestCommentsSortByEnum{ + "timeCreated": ListPullRequestCommentsSortByTimecreated, + "createdBy": ListPullRequestCommentsSortByCreatedby, +} + +var mappingListPullRequestCommentsSortByEnumLowerCase = map[string]ListPullRequestCommentsSortByEnum{ + "timecreated": ListPullRequestCommentsSortByTimecreated, + "createdby": ListPullRequestCommentsSortByCreatedby, +} + +// GetListPullRequestCommentsSortByEnumValues Enumerates the set of values for ListPullRequestCommentsSortByEnum +func GetListPullRequestCommentsSortByEnumValues() []ListPullRequestCommentsSortByEnum { + values := make([]ListPullRequestCommentsSortByEnum, 0) + for _, v := range mappingListPullRequestCommentsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestCommentsSortByEnumStringValues Enumerates the set of values in String for ListPullRequestCommentsSortByEnum +func GetListPullRequestCommentsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "createdBy", + } +} + +// GetMappingListPullRequestCommentsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestCommentsSortByEnum(val string) (ListPullRequestCommentsSortByEnum, bool) { + enum, ok := mappingListPullRequestCommentsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_pull_request_commits_request_response.go b/devops/list_pull_request_commits_request_response.go new file mode 100644 index 0000000000..5c4a18f118 --- /dev/null +++ b/devops/list_pull_request_commits_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPullRequestCommitsRequest wrapper for the ListPullRequestCommits operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestCommits.go.html to see an example of how to use ListPullRequestCommitsRequest. +type ListPullRequestCommitsRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPullRequestCommitsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPullRequestCommitsRequest) 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 ListPullRequestCommitsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPullRequestCommitsRequest) 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 ListPullRequestCommitsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPullRequestCommitsResponse wrapper for the ListPullRequestCommits operation +type ListPullRequestCommitsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RepositoryCommitCollection instances + RepositoryCommitCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListPullRequestCommitsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPullRequestCommitsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/list_pull_request_file_changes_request_response.go b/devops/list_pull_request_file_changes_request_response.go new file mode 100644 index 0000000000..4616d64cab --- /dev/null +++ b/devops/list_pull_request_file_changes_request_response.go @@ -0,0 +1,101 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPullRequestFileChangesRequest wrapper for the ListPullRequestFileChanges operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequestFileChanges.go.html to see an example of how to use ListPullRequestFileChangesRequest. +type ListPullRequestFileChangesRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // PullRequest File Path + FilePath *string `mandatory:"false" contributesTo:"query" name:"filePath"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPullRequestFileChangesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPullRequestFileChangesRequest) 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 ListPullRequestFileChangesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPullRequestFileChangesRequest) 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 ListPullRequestFileChangesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPullRequestFileChangesResponse wrapper for the ListPullRequestFileChanges operation +type ListPullRequestFileChangesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PullRequestFileChangeCollection instances + PullRequestFileChangeCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListPullRequestFileChangesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPullRequestFileChangesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/list_pull_requests_request_response.go b/devops/list_pull_requests_request_response.go new file mode 100644 index 0000000000..8e44831b1b --- /dev/null +++ b/devops/list_pull_requests_request_response.go @@ -0,0 +1,230 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPullRequestsRequest wrapper for the ListPullRequests operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListPullRequests.go.html to see an example of how to use ListPullRequestsRequest. +type ListPullRequestsRequest struct { + + // The OCID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only pull requests that match the given lifecycle state. + LifecycleState PullRequestLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only pull requests that match the given lifecycle state. + LifecycleDetails PullRequestLifecycleDetailsEnum `mandatory:"false" contributesTo:"query" name:"lifecycleDetails" omitEmpty:"true"` + + // The OCID of the repository in which to list resources. + RepositoryId *string `mandatory:"false" contributesTo:"query" name:"repositoryId"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Unique identifier or OCID for listing a single resource by ID. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // PullRequest Created By + CreatedBy *string `mandatory:"false" contributesTo:"query" name:"createdBy"` + + // PullRequest Target Branch + DestinationBranch *string `mandatory:"false" contributesTo:"query" name:"destinationBranch"` + + // PullRequest Source Branch. + SourceBranch *string `mandatory:"false" contributesTo:"query" name:"sourceBranch"` + + // PullRequest Reviewer Id + ReviewerPrincipalId *string `mandatory:"false" contributesTo:"query" name:"reviewerPrincipalId"` + + // PullRequest Source Repository Id + SourceRepositoryId *string `mandatory:"false" contributesTo:"query" name:"sourceRepositoryId"` + + // 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. Use either ascending or descending. + SortOrder ListPullRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + SortBy ListPullRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPullRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPullRequestsRequest) 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 ListPullRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPullRequestsRequest) 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 ListPullRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestLifecycleStateEnum(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(GetPullRequestLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPullRequestLifecycleDetailsEnum(string(request.LifecycleDetails)); !ok && request.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", request.LifecycleDetails, strings.Join(GetPullRequestLifecycleDetailsEnumStringValues(), ","))) + } + if _, ok := GetMappingListPullRequestsSortOrderEnum(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(GetListPullRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPullRequestsSortByEnum(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(GetListPullRequestsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPullRequestsResponse wrapper for the ListPullRequests operation +type ListPullRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PullRequestCollection instances + PullRequestCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListPullRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPullRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPullRequestsSortOrderEnum Enum with underlying type: string +type ListPullRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListPullRequestsSortOrderEnum +const ( + ListPullRequestsSortOrderAsc ListPullRequestsSortOrderEnum = "ASC" + ListPullRequestsSortOrderDesc ListPullRequestsSortOrderEnum = "DESC" +) + +var mappingListPullRequestsSortOrderEnum = map[string]ListPullRequestsSortOrderEnum{ + "ASC": ListPullRequestsSortOrderAsc, + "DESC": ListPullRequestsSortOrderDesc, +} + +var mappingListPullRequestsSortOrderEnumLowerCase = map[string]ListPullRequestsSortOrderEnum{ + "asc": ListPullRequestsSortOrderAsc, + "desc": ListPullRequestsSortOrderDesc, +} + +// GetListPullRequestsSortOrderEnumValues Enumerates the set of values for ListPullRequestsSortOrderEnum +func GetListPullRequestsSortOrderEnumValues() []ListPullRequestsSortOrderEnum { + values := make([]ListPullRequestsSortOrderEnum, 0) + for _, v := range mappingListPullRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListPullRequestsSortOrderEnum +func GetListPullRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPullRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestsSortOrderEnum(val string) (ListPullRequestsSortOrderEnum, bool) { + enum, ok := mappingListPullRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPullRequestsSortByEnum Enum with underlying type: string +type ListPullRequestsSortByEnum string + +// Set of constants representing the allowable values for ListPullRequestsSortByEnum +const ( + ListPullRequestsSortByTimecreated ListPullRequestsSortByEnum = "timeCreated" + ListPullRequestsSortByDisplayname ListPullRequestsSortByEnum = "displayName" +) + +var mappingListPullRequestsSortByEnum = map[string]ListPullRequestsSortByEnum{ + "timeCreated": ListPullRequestsSortByTimecreated, + "displayName": ListPullRequestsSortByDisplayname, +} + +var mappingListPullRequestsSortByEnumLowerCase = map[string]ListPullRequestsSortByEnum{ + "timecreated": ListPullRequestsSortByTimecreated, + "displayname": ListPullRequestsSortByDisplayname, +} + +// GetListPullRequestsSortByEnumValues Enumerates the set of values for ListPullRequestsSortByEnum +func GetListPullRequestsSortByEnumValues() []ListPullRequestsSortByEnum { + values := make([]ListPullRequestsSortByEnum, 0) + for _, v := range mappingListPullRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPullRequestsSortByEnumStringValues Enumerates the set of values in String for ListPullRequestsSortByEnum +func GetListPullRequestsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPullRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPullRequestsSortByEnum(val string) (ListPullRequestsSortByEnum, bool) { + enum, ok := mappingListPullRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/list_repository_commit_analytics_authors_request_response.go b/devops/list_repository_commit_analytics_authors_request_response.go new file mode 100644 index 0000000000..f2398c4187 --- /dev/null +++ b/devops/list_repository_commit_analytics_authors_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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRepositoryCommitAnalyticsAuthorsRequest wrapper for the ListRepositoryCommitAnalyticsAuthors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ListRepositoryCommitAnalyticsAuthors.go.html to see an example of how to use ListRepositoryCommitAnalyticsAuthorsRequest. +type ListRepositoryCommitAnalyticsAuthorsRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // 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. Use either ascending or descending. + SortOrder ListRepositoryCommitAnalyticsAuthorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + SortBy ListRepositoryCommitAnalyticsAuthorsSortByEnum `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 ListRepositoryCommitAnalyticsAuthorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRepositoryCommitAnalyticsAuthorsRequest) 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 ListRepositoryCommitAnalyticsAuthorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRepositoryCommitAnalyticsAuthorsRequest) 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 ListRepositoryCommitAnalyticsAuthorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListRepositoryCommitAnalyticsAuthorsSortOrderEnum(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(GetListRepositoryCommitAnalyticsAuthorsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListRepositoryCommitAnalyticsAuthorsSortByEnum(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(GetListRepositoryCommitAnalyticsAuthorsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRepositoryCommitAnalyticsAuthorsResponse wrapper for the ListRepositoryCommitAnalyticsAuthors operation +type ListRepositoryCommitAnalyticsAuthorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CommitAnalyticsAuthorCollection instances + CommitAnalyticsAuthorCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 ListRepositoryCommitAnalyticsAuthorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRepositoryCommitAnalyticsAuthorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListRepositoryCommitAnalyticsAuthorsSortOrderEnum Enum with underlying type: string +type ListRepositoryCommitAnalyticsAuthorsSortOrderEnum string + +// Set of constants representing the allowable values for ListRepositoryCommitAnalyticsAuthorsSortOrderEnum +const ( + ListRepositoryCommitAnalyticsAuthorsSortOrderAsc ListRepositoryCommitAnalyticsAuthorsSortOrderEnum = "ASC" + ListRepositoryCommitAnalyticsAuthorsSortOrderDesc ListRepositoryCommitAnalyticsAuthorsSortOrderEnum = "DESC" +) + +var mappingListRepositoryCommitAnalyticsAuthorsSortOrderEnum = map[string]ListRepositoryCommitAnalyticsAuthorsSortOrderEnum{ + "ASC": ListRepositoryCommitAnalyticsAuthorsSortOrderAsc, + "DESC": ListRepositoryCommitAnalyticsAuthorsSortOrderDesc, +} + +var mappingListRepositoryCommitAnalyticsAuthorsSortOrderEnumLowerCase = map[string]ListRepositoryCommitAnalyticsAuthorsSortOrderEnum{ + "asc": ListRepositoryCommitAnalyticsAuthorsSortOrderAsc, + "desc": ListRepositoryCommitAnalyticsAuthorsSortOrderDesc, +} + +// GetListRepositoryCommitAnalyticsAuthorsSortOrderEnumValues Enumerates the set of values for ListRepositoryCommitAnalyticsAuthorsSortOrderEnum +func GetListRepositoryCommitAnalyticsAuthorsSortOrderEnumValues() []ListRepositoryCommitAnalyticsAuthorsSortOrderEnum { + values := make([]ListRepositoryCommitAnalyticsAuthorsSortOrderEnum, 0) + for _, v := range mappingListRepositoryCommitAnalyticsAuthorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListRepositoryCommitAnalyticsAuthorsSortOrderEnumStringValues Enumerates the set of values in String for ListRepositoryCommitAnalyticsAuthorsSortOrderEnum +func GetListRepositoryCommitAnalyticsAuthorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListRepositoryCommitAnalyticsAuthorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRepositoryCommitAnalyticsAuthorsSortOrderEnum(val string) (ListRepositoryCommitAnalyticsAuthorsSortOrderEnum, bool) { + enum, ok := mappingListRepositoryCommitAnalyticsAuthorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRepositoryCommitAnalyticsAuthorsSortByEnum Enum with underlying type: string +type ListRepositoryCommitAnalyticsAuthorsSortByEnum string + +// Set of constants representing the allowable values for ListRepositoryCommitAnalyticsAuthorsSortByEnum +const ( + ListRepositoryCommitAnalyticsAuthorsSortByAuthorname ListRepositoryCommitAnalyticsAuthorsSortByEnum = "authorName" +) + +var mappingListRepositoryCommitAnalyticsAuthorsSortByEnum = map[string]ListRepositoryCommitAnalyticsAuthorsSortByEnum{ + "authorName": ListRepositoryCommitAnalyticsAuthorsSortByAuthorname, +} + +var mappingListRepositoryCommitAnalyticsAuthorsSortByEnumLowerCase = map[string]ListRepositoryCommitAnalyticsAuthorsSortByEnum{ + "authorname": ListRepositoryCommitAnalyticsAuthorsSortByAuthorname, +} + +// GetListRepositoryCommitAnalyticsAuthorsSortByEnumValues Enumerates the set of values for ListRepositoryCommitAnalyticsAuthorsSortByEnum +func GetListRepositoryCommitAnalyticsAuthorsSortByEnumValues() []ListRepositoryCommitAnalyticsAuthorsSortByEnum { + values := make([]ListRepositoryCommitAnalyticsAuthorsSortByEnum, 0) + for _, v := range mappingListRepositoryCommitAnalyticsAuthorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListRepositoryCommitAnalyticsAuthorsSortByEnumStringValues Enumerates the set of values in String for ListRepositoryCommitAnalyticsAuthorsSortByEnum +func GetListRepositoryCommitAnalyticsAuthorsSortByEnumStringValues() []string { + return []string{ + "authorName", + } +} + +// GetMappingListRepositoryCommitAnalyticsAuthorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRepositoryCommitAnalyticsAuthorsSortByEnum(val string) (ListRepositoryCommitAnalyticsAuthorsSortByEnum, bool) { + enum, ok := mappingListRepositoryCommitAnalyticsAuthorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/merge_check.go b/devops/merge_check.go new file mode 100644 index 0000000000..05c2207870 --- /dev/null +++ b/devops/merge_check.go @@ -0,0 +1,131 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MergeCheck Merge Check summary +type MergeCheck interface { +} + +type mergecheck struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *mergecheck) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalermergecheck mergecheck + s := struct { + Model Unmarshalermergecheck + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *mergecheck) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "BUILD": + mm := BuildMergeCheck{} + err = json.Unmarshal(data, &mm) + return mm, err + case "CONFLICT": + mm := ConflictMergeCheck{} + err = json.Unmarshal(data, &mm) + return mm, err + case "APPROVAL_RULE": + mm := ApprovalRuleMergeCheck{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for MergeCheck: %s.", m.Type) + return *m, nil + } +} + +func (m mergecheck) 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 mergecheck) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MergeCheckTypeEnum Enum with underlying type: string +type MergeCheckTypeEnum string + +// Set of constants representing the allowable values for MergeCheckTypeEnum +const ( + MergeCheckTypeConflict MergeCheckTypeEnum = "CONFLICT" + MergeCheckTypeApprovalRule MergeCheckTypeEnum = "APPROVAL_RULE" + MergeCheckTypeBuild MergeCheckTypeEnum = "BUILD" +) + +var mappingMergeCheckTypeEnum = map[string]MergeCheckTypeEnum{ + "CONFLICT": MergeCheckTypeConflict, + "APPROVAL_RULE": MergeCheckTypeApprovalRule, + "BUILD": MergeCheckTypeBuild, +} + +var mappingMergeCheckTypeEnumLowerCase = map[string]MergeCheckTypeEnum{ + "conflict": MergeCheckTypeConflict, + "approval_rule": MergeCheckTypeApprovalRule, + "build": MergeCheckTypeBuild, +} + +// GetMergeCheckTypeEnumValues Enumerates the set of values for MergeCheckTypeEnum +func GetMergeCheckTypeEnumValues() []MergeCheckTypeEnum { + values := make([]MergeCheckTypeEnum, 0) + for _, v := range mappingMergeCheckTypeEnum { + values = append(values, v) + } + return values +} + +// GetMergeCheckTypeEnumStringValues Enumerates the set of values in String for MergeCheckTypeEnum +func GetMergeCheckTypeEnumStringValues() []string { + return []string{ + "CONFLICT", + "APPROVAL_RULE", + "BUILD", + } +} + +// GetMappingMergeCheckTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMergeCheckTypeEnum(val string) (MergeCheckTypeEnum, bool) { + enum, ok := mappingMergeCheckTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/merge_check_collection.go b/devops/merge_check_collection.go new file mode 100644 index 0000000000..69ed8eca38 --- /dev/null +++ b/devops/merge_check_collection.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MergeCheckCollection list of merge checks. +type MergeCheckCollection struct { + + // List of pullRequest mergeCheck objects. + // Example: {"items": [{ "type" : "CONFLICT(ENUM values)", + // "status" : "FAILED(ENUM values)"}, + // {"type": "APPROVAL_RULE(ENUM VALUE)", + // "ruleName": "rule 1", + // "status" : "NEEDS_APPROVAL(ENUM values)", + // "totalApprovalCount":"5", + // "currentApprovalCount":"1", + // "reviewers":[], + // "level": "PROJECT/REPOSITORY(ENUM values)"}, + // {"type": "APPROVAL_RULE(ENUM VALUE)", + // "ruleName": "rule 2", + // "status" : "SUCCEEDED(ENUM values)", + // "totalApprovalCount":"5", + // "currentApprovalCount":"5", + // "reviewers":[], + // "level": "PROJECT/REPOSITORY(ENUM values)"} , + // {"type": "BUILD(ENUM VALUE)", + // "pipelineId": "PipelineOCID", + // "buildRunId": "BuildRunOCID", + // "status" : "SUCCEEDED/PENDING/FAIlED/IN-PROGRESS(ENUM values)"} + // ]} + Items []MergeCheck `mandatory:"false" json:"items"` + + // The time Stamp of the validation check. + TimeValidated *common.SDKTime `mandatory:"false" json:"timeValidated"` +} + +func (m MergeCheckCollection) 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 MergeCheckCollection) 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 *MergeCheckCollection) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []mergecheck `json:"items"` + TimeValidated *common.SDKTime `json:"timeValidated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]MergeCheck, 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.(MergeCheck) + } else { + m.Items[i] = nil + } + } + m.TimeValidated = model.TimeValidated + + return +} diff --git a/devops/merge_check_settings_value.go b/devops/merge_check_settings_value.go new file mode 100644 index 0000000000..bd98daaf26 --- /dev/null +++ b/devops/merge_check_settings_value.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "strings" +) + +// MergeCheckSettingsValueEnum Enum with underlying type: string +type MergeCheckSettingsValueEnum string + +// Set of constants representing the allowable values for MergeCheckSettingsValueEnum +const ( + MergeCheckSettingsValueEnabled MergeCheckSettingsValueEnum = "ENABLED" + MergeCheckSettingsValueDisabled MergeCheckSettingsValueEnum = "DISABLED" +) + +var mappingMergeCheckSettingsValueEnum = map[string]MergeCheckSettingsValueEnum{ + "ENABLED": MergeCheckSettingsValueEnabled, + "DISABLED": MergeCheckSettingsValueDisabled, +} + +var mappingMergeCheckSettingsValueEnumLowerCase = map[string]MergeCheckSettingsValueEnum{ + "enabled": MergeCheckSettingsValueEnabled, + "disabled": MergeCheckSettingsValueDisabled, +} + +// GetMergeCheckSettingsValueEnumValues Enumerates the set of values for MergeCheckSettingsValueEnum +func GetMergeCheckSettingsValueEnumValues() []MergeCheckSettingsValueEnum { + values := make([]MergeCheckSettingsValueEnum, 0) + for _, v := range mappingMergeCheckSettingsValueEnum { + values = append(values, v) + } + return values +} + +// GetMergeCheckSettingsValueEnumStringValues Enumerates the set of values in String for MergeCheckSettingsValueEnum +func GetMergeCheckSettingsValueEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingMergeCheckSettingsValueEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMergeCheckSettingsValueEnum(val string) (MergeCheckSettingsValueEnum, bool) { + enum, ok := mappingMergeCheckSettingsValueEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/merge_checks.go b/devops/merge_checks.go new file mode 100644 index 0000000000..4869d39fcb --- /dev/null +++ b/devops/merge_checks.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MergeChecks Criteria which must be satisfied to merge a pull request. +type MergeChecks struct { + + // Indicates whether or not a pull request must have a successful build run and no queued builds before it can be merged + LastBuildSucceeded MergeCheckSettingsValueEnum `mandatory:"true" json:"lastBuildSucceeded"` +} + +func (m MergeChecks) 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 MergeChecks) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMergeCheckSettingsValueEnum(string(m.LastBuildSucceeded)); !ok && m.LastBuildSucceeded != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LastBuildSucceeded: %s. Supported values are: %s.", m.LastBuildSucceeded, strings.Join(GetMergeCheckSettingsValueEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/merge_pull_request_details.go b/devops/merge_pull_request_details.go new file mode 100644 index 0000000000..9273f55677 --- /dev/null +++ b/devops/merge_pull_request_details.go @@ -0,0 +1,123 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MergePullRequestDetails determines if this is a merge or a validation. +type MergePullRequestDetails interface { +} + +type mergepullrequestdetails struct { + JsonData []byte + ActionType string `json:"actionType"` +} + +// UnmarshalJSON unmarshals json +func (m *mergepullrequestdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalermergepullrequestdetails mergepullrequestdetails + s := struct { + Model Unmarshalermergepullrequestdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.ActionType = s.Model.ActionType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *mergepullrequestdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ActionType { + case "EXECUTE": + mm := ExecuteMergePullRequestDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "VALIDATE": + mm := ValidateMergePullRequestDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for MergePullRequestDetails: %s.", m.ActionType) + return *m, nil + } +} + +func (m mergepullrequestdetails) 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 mergepullrequestdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MergePullRequestDetailsActionTypeEnum Enum with underlying type: string +type MergePullRequestDetailsActionTypeEnum string + +// Set of constants representing the allowable values for MergePullRequestDetailsActionTypeEnum +const ( + MergePullRequestDetailsActionTypeExecute MergePullRequestDetailsActionTypeEnum = "EXECUTE" + MergePullRequestDetailsActionTypeValidate MergePullRequestDetailsActionTypeEnum = "VALIDATE" +) + +var mappingMergePullRequestDetailsActionTypeEnum = map[string]MergePullRequestDetailsActionTypeEnum{ + "EXECUTE": MergePullRequestDetailsActionTypeExecute, + "VALIDATE": MergePullRequestDetailsActionTypeValidate, +} + +var mappingMergePullRequestDetailsActionTypeEnumLowerCase = map[string]MergePullRequestDetailsActionTypeEnum{ + "execute": MergePullRequestDetailsActionTypeExecute, + "validate": MergePullRequestDetailsActionTypeValidate, +} + +// GetMergePullRequestDetailsActionTypeEnumValues Enumerates the set of values for MergePullRequestDetailsActionTypeEnum +func GetMergePullRequestDetailsActionTypeEnumValues() []MergePullRequestDetailsActionTypeEnum { + values := make([]MergePullRequestDetailsActionTypeEnum, 0) + for _, v := range mappingMergePullRequestDetailsActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetMergePullRequestDetailsActionTypeEnumStringValues Enumerates the set of values in String for MergePullRequestDetailsActionTypeEnum +func GetMergePullRequestDetailsActionTypeEnumStringValues() []string { + return []string{ + "EXECUTE", + "VALIDATE", + } +} + +// GetMappingMergePullRequestDetailsActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMergePullRequestDetailsActionTypeEnum(val string) (MergePullRequestDetailsActionTypeEnum, bool) { + enum, ok := mappingMergePullRequestDetailsActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/merge_pull_request_request_response.go b/devops/merge_pull_request_request_response.go new file mode 100644 index 0000000000..c718bad8e2 --- /dev/null +++ b/devops/merge_pull_request_request_response.go @@ -0,0 +1,107 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// MergePullRequestRequest wrapper for the MergePullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/MergePullRequest.go.html to see an example of how to use MergePullRequestRequest. +type MergePullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // The details about the merge operation. + MergePullRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier 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 MergePullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request MergePullRequestRequest) 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 MergePullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request MergePullRequestRequest) 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 MergePullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MergePullRequestResponse wrapper for the MergePullRequest operation +type MergePullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `presentIn:"body"` + + // Relative URL of the newly created resource. + ContentLocation *string `presentIn:"header" name:"content-location"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response MergePullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response MergePullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/merge_settings.go b/devops/merge_settings.go new file mode 100644 index 0000000000..63aec483de --- /dev/null +++ b/devops/merge_settings.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MergeSettings Enabled and disabled merge strategies for a project or repository, also contains a default strategy. +type MergeSettings struct { + + // Default type of merge strategy associated with the a Project or Repository. + DefaultMergeStrategy MergeStrategyEnum `mandatory:"true" json:"defaultMergeStrategy"` + + // List of merge strategies which are allowed for a Project or Repository. + AllowedMergeStrategies []MergeStrategyEnum `mandatory:"true" json:"allowedMergeStrategies"` +} + +func (m MergeSettings) 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 MergeSettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMergeStrategyEnum(string(m.DefaultMergeStrategy)); !ok && m.DefaultMergeStrategy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DefaultMergeStrategy: %s. Supported values are: %s.", m.DefaultMergeStrategy, strings.Join(GetMergeStrategyEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/merge_strategy.go b/devops/merge_strategy.go new file mode 100644 index 0000000000..956e17111d --- /dev/null +++ b/devops/merge_strategy.go @@ -0,0 +1,76 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "strings" +) + +// MergeStrategyEnum Enum with underlying type: string +type MergeStrategyEnum string + +// Set of constants representing the allowable values for MergeStrategyEnum +const ( + MergeStrategyMergeCommit MergeStrategyEnum = "MERGE_COMMIT" + MergeStrategyFastForward MergeStrategyEnum = "FAST_FORWARD" + MergeStrategyFastForwardOnly MergeStrategyEnum = "FAST_FORWARD_ONLY" + MergeStrategyRebaseAndMerge MergeStrategyEnum = "REBASE_AND_MERGE" + MergeStrategyRebaseAndFastForward MergeStrategyEnum = "REBASE_AND_FAST_FORWARD" + MergeStrategySquash MergeStrategyEnum = "SQUASH" + MergeStrategySquashFastForwardOnly MergeStrategyEnum = "SQUASH_FAST_FORWARD_ONLY" +) + +var mappingMergeStrategyEnum = map[string]MergeStrategyEnum{ + "MERGE_COMMIT": MergeStrategyMergeCommit, + "FAST_FORWARD": MergeStrategyFastForward, + "FAST_FORWARD_ONLY": MergeStrategyFastForwardOnly, + "REBASE_AND_MERGE": MergeStrategyRebaseAndMerge, + "REBASE_AND_FAST_FORWARD": MergeStrategyRebaseAndFastForward, + "SQUASH": MergeStrategySquash, + "SQUASH_FAST_FORWARD_ONLY": MergeStrategySquashFastForwardOnly, +} + +var mappingMergeStrategyEnumLowerCase = map[string]MergeStrategyEnum{ + "merge_commit": MergeStrategyMergeCommit, + "fast_forward": MergeStrategyFastForward, + "fast_forward_only": MergeStrategyFastForwardOnly, + "rebase_and_merge": MergeStrategyRebaseAndMerge, + "rebase_and_fast_forward": MergeStrategyRebaseAndFastForward, + "squash": MergeStrategySquash, + "squash_fast_forward_only": MergeStrategySquashFastForwardOnly, +} + +// GetMergeStrategyEnumValues Enumerates the set of values for MergeStrategyEnum +func GetMergeStrategyEnumValues() []MergeStrategyEnum { + values := make([]MergeStrategyEnum, 0) + for _, v := range mappingMergeStrategyEnum { + values = append(values, v) + } + return values +} + +// GetMergeStrategyEnumStringValues Enumerates the set of values in String for MergeStrategyEnum +func GetMergeStrategyEnumStringValues() []string { + return []string{ + "MERGE_COMMIT", + "FAST_FORWARD", + "FAST_FORWARD_ONLY", + "REBASE_AND_MERGE", + "REBASE_AND_FAST_FORWARD", + "SQUASH", + "SQUASH_FAST_FORWARD_ONLY", + } +} + +// GetMappingMergeStrategyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMergeStrategyEnum(val string) (MergeStrategyEnum, bool) { + enum, ok := mappingMergeStrategyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/metric_name.go b/devops/metric_name.go new file mode 100644 index 0000000000..76ca7e2368 --- /dev/null +++ b/devops/metric_name.go @@ -0,0 +1,92 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "strings" +) + +// MetricNameEnum Enum with underlying type: string +type MetricNameEnum string + +// Set of constants representing the allowable values for MetricNameEnum +const ( + MetricNameCommits MetricNameEnum = "COMMITS" + MetricNameLinesAdded MetricNameEnum = "LINES_ADDED" + MetricNameLinesDeleted MetricNameEnum = "LINES_DELETED" + MetricNamePullRequestCreated MetricNameEnum = "PULL_REQUEST_CREATED" + MetricNamePullRequestMerged MetricNameEnum = "PULL_REQUEST_MERGED" + MetricNamePullRequestDeclined MetricNameEnum = "PULL_REQUEST_DECLINED" + MetricNamePullRequestReviewStartDurationInDays MetricNameEnum = "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS" + MetricNamePullRequestReviewDurationInDays MetricNameEnum = "PULL_REQUEST_REVIEW_DURATION_IN_DAYS" + MetricNamePullRequestApproved MetricNameEnum = "PULL_REQUEST_APPROVED" + MetricNamePullRequestReviewed MetricNameEnum = "PULL_REQUEST_REVIEWED" + MetricNamePullRequestComments MetricNameEnum = "PULL_REQUEST_COMMENTS" +) + +var mappingMetricNameEnum = map[string]MetricNameEnum{ + "COMMITS": MetricNameCommits, + "LINES_ADDED": MetricNameLinesAdded, + "LINES_DELETED": MetricNameLinesDeleted, + "PULL_REQUEST_CREATED": MetricNamePullRequestCreated, + "PULL_REQUEST_MERGED": MetricNamePullRequestMerged, + "PULL_REQUEST_DECLINED": MetricNamePullRequestDeclined, + "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS": MetricNamePullRequestReviewStartDurationInDays, + "PULL_REQUEST_REVIEW_DURATION_IN_DAYS": MetricNamePullRequestReviewDurationInDays, + "PULL_REQUEST_APPROVED": MetricNamePullRequestApproved, + "PULL_REQUEST_REVIEWED": MetricNamePullRequestReviewed, + "PULL_REQUEST_COMMENTS": MetricNamePullRequestComments, +} + +var mappingMetricNameEnumLowerCase = map[string]MetricNameEnum{ + "commits": MetricNameCommits, + "lines_added": MetricNameLinesAdded, + "lines_deleted": MetricNameLinesDeleted, + "pull_request_created": MetricNamePullRequestCreated, + "pull_request_merged": MetricNamePullRequestMerged, + "pull_request_declined": MetricNamePullRequestDeclined, + "pull_request_review_start_duration_in_days": MetricNamePullRequestReviewStartDurationInDays, + "pull_request_review_duration_in_days": MetricNamePullRequestReviewDurationInDays, + "pull_request_approved": MetricNamePullRequestApproved, + "pull_request_reviewed": MetricNamePullRequestReviewed, + "pull_request_comments": MetricNamePullRequestComments, +} + +// GetMetricNameEnumValues Enumerates the set of values for MetricNameEnum +func GetMetricNameEnumValues() []MetricNameEnum { + values := make([]MetricNameEnum, 0) + for _, v := range mappingMetricNameEnum { + values = append(values, v) + } + return values +} + +// GetMetricNameEnumStringValues Enumerates the set of values in String for MetricNameEnum +func GetMetricNameEnumStringValues() []string { + return []string{ + "COMMITS", + "LINES_ADDED", + "LINES_DELETED", + "PULL_REQUEST_CREATED", + "PULL_REQUEST_MERGED", + "PULL_REQUEST_DECLINED", + "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS", + "PULL_REQUEST_REVIEW_DURATION_IN_DAYS", + "PULL_REQUEST_APPROVED", + "PULL_REQUEST_REVIEWED", + "PULL_REQUEST_COMMENTS", + } +} + +// GetMappingMetricNameEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMetricNameEnum(val string) (MetricNameEnum, bool) { + enum, ok := mappingMetricNameEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/mirror_repository_config.go b/devops/mirror_repository_config.go index d4f04582d4..e57c4c2558 100644 --- a/devops/mirror_repository_config.go +++ b/devops/mirror_repository_config.go @@ -18,7 +18,7 @@ import ( // MirrorRepositoryConfig Configuration information for mirroring the repository. type MirrorRepositoryConfig struct { - // Upstream git repository connection identifer. + // Upstream git repository connection identifier. ConnectorId *string `mandatory:"false" json:"connectorId"` // URL of external repository you want to mirror. diff --git a/devops/object_storage_generic_artifact_location_details.go b/devops/object_storage_generic_artifact_location_details.go new file mode 100644 index 0000000000..705bdd30fd --- /dev/null +++ b/devops/object_storage_generic_artifact_location_details.go @@ -0,0 +1,63 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectStorageGenericArtifactLocationDetails ObjectStorage bucket details where artifact is located. +type ObjectStorageGenericArtifactLocationDetails struct { + + // Unique namespace in the tenancy which contains the bucket + Namespace *string `mandatory:"true" json:"namespace"` + + // Specifies the Object Storage bucket. + BucketName *string `mandatory:"true" json:"bucketName"` + + // Specifies the name of object inside the bucket. + ObjectName *string `mandatory:"true" json:"objectName"` + + // Region identifier. + Region *string `mandatory:"true" json:"region"` +} + +func (m ObjectStorageGenericArtifactLocationDetails) 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 ObjectStorageGenericArtifactLocationDetails) 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 ObjectStorageGenericArtifactLocationDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeObjectStorageGenericArtifactLocationDetails ObjectStorageGenericArtifactLocationDetails + s := struct { + DiscriminatorParam string `json:"storageType"` + MarshalTypeObjectStorageGenericArtifactLocationDetails + }{ + "OBJECT_STORAGE", + (MarshalTypeObjectStorageGenericArtifactLocationDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/operation_type.go b/devops/operation_type.go index a816baf259..2b460f0a21 100644 --- a/devops/operation_type.go +++ b/devops/operation_type.go @@ -54,8 +54,15 @@ const ( OperationTypeUpdateRepository OperationTypeEnum = "UPDATE_REPOSITORY" OperationTypeDeleteRepository OperationTypeEnum = "DELETE_REPOSITORY" OperationTypeMirrorRepository OperationTypeEnum = "MIRROR_REPOSITORY" + OperationTypeForkRepository OperationTypeEnum = "FORK_REPOSITORY" + OperationTypeSyncForkRepository OperationTypeEnum = "SYNC_FORK_REPOSITORY" OperationTypeScheduleCascadingProjectDeletion OperationTypeEnum = "SCHEDULE_CASCADING_PROJECT_DELETION" OperationTypeCancelScheduledCascadingProjectDeletion OperationTypeEnum = "CANCEL_SCHEDULED_CASCADING_PROJECT_DELETION" + OperationTypeCreatePullRequest OperationTypeEnum = "CREATE_PULL_REQUEST" + OperationTypeUpdatePullRequest OperationTypeEnum = "UPDATE_PULL_REQUEST" + OperationTypeDeletePullRequest OperationTypeEnum = "DELETE_PULL_REQUEST" + OperationTypeMovePullRequest OperationTypeEnum = "MOVE_PULL_REQUEST" + OperationTypeMergePullRequest OperationTypeEnum = "MERGE_PULL_REQUEST" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -95,8 +102,15 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "UPDATE_REPOSITORY": OperationTypeUpdateRepository, "DELETE_REPOSITORY": OperationTypeDeleteRepository, "MIRROR_REPOSITORY": OperationTypeMirrorRepository, + "FORK_REPOSITORY": OperationTypeForkRepository, + "SYNC_FORK_REPOSITORY": OperationTypeSyncForkRepository, "SCHEDULE_CASCADING_PROJECT_DELETION": OperationTypeScheduleCascadingProjectDeletion, "CANCEL_SCHEDULED_CASCADING_PROJECT_DELETION": OperationTypeCancelScheduledCascadingProjectDeletion, + "CREATE_PULL_REQUEST": OperationTypeCreatePullRequest, + "UPDATE_PULL_REQUEST": OperationTypeUpdatePullRequest, + "DELETE_PULL_REQUEST": OperationTypeDeletePullRequest, + "MOVE_PULL_REQUEST": OperationTypeMovePullRequest, + "MERGE_PULL_REQUEST": OperationTypeMergePullRequest, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -136,8 +150,15 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "update_repository": OperationTypeUpdateRepository, "delete_repository": OperationTypeDeleteRepository, "mirror_repository": OperationTypeMirrorRepository, + "fork_repository": OperationTypeForkRepository, + "sync_fork_repository": OperationTypeSyncForkRepository, "schedule_cascading_project_deletion": OperationTypeScheduleCascadingProjectDeletion, "cancel_scheduled_cascading_project_deletion": OperationTypeCancelScheduledCascadingProjectDeletion, + "create_pull_request": OperationTypeCreatePullRequest, + "update_pull_request": OperationTypeUpdatePullRequest, + "delete_pull_request": OperationTypeDeletePullRequest, + "move_pull_request": OperationTypeMovePullRequest, + "merge_pull_request": OperationTypeMergePullRequest, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -188,8 +209,15 @@ func GetOperationTypeEnumStringValues() []string { "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY", + "FORK_REPOSITORY", + "SYNC_FORK_REPOSITORY", "SCHEDULE_CASCADING_PROJECT_DELETION", "CANCEL_SCHEDULED_CASCADING_PROJECT_DELETION", + "CREATE_PULL_REQUEST", + "UPDATE_PULL_REQUEST", + "DELETE_PULL_REQUEST", + "MOVE_PULL_REQUEST", + "MERGE_PULL_REQUEST", } } diff --git a/devops/patch_insert_instruction.go b/devops/patch_insert_instruction.go new file mode 100644 index 0000000000..5af6835e8c --- /dev/null +++ b/devops/patch_insert_instruction.go @@ -0,0 +1,117 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchInsertInstruction An operation that inserts a value into an array, shifting array items as necessary and handling NOT_FOUND exceptions by creating the implied containing structure. +type PatchInsertInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be inserted into the target. + Value *interface{} `mandatory:"true" json:"value"` + + // A selection to be evaluated against the array for identifying a particular reference item within it, with the same format and semantics as `selection`. + SelectedItem *string `mandatory:"false" json:"selectedItem"` + + // Where to insert the value, relative to the first item matched by `selectedItem`. + // If `selectedItem` is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + // If `selectedItem` is specified but results in an empty selection, then both values specify insertion at the last position. + Position PatchInsertInstructionPositionEnum `mandatory:"false" json:"position,omitempty"` +} + +// GetSelection returns Selection +func (m PatchInsertInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchInsertInstruction) 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 PatchInsertInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchInsertInstructionPositionEnum(string(m.Position)); !ok && m.Position != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Position: %s. Supported values are: %s.", m.Position, strings.Join(GetPatchInsertInstructionPositionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchInsertInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchInsertInstruction PatchInsertInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchInsertInstruction + }{ + "INSERT", + (MarshalTypePatchInsertInstruction)(m), + } + + return json.Marshal(&s) +} + +// PatchInsertInstructionPositionEnum Enum with underlying type: string +type PatchInsertInstructionPositionEnum string + +// Set of constants representing the allowable values for PatchInsertInstructionPositionEnum +const ( + PatchInsertInstructionPositionBefore PatchInsertInstructionPositionEnum = "BEFORE" + PatchInsertInstructionPositionAfter PatchInsertInstructionPositionEnum = "AFTER" +) + +var mappingPatchInsertInstructionPositionEnum = map[string]PatchInsertInstructionPositionEnum{ + "BEFORE": PatchInsertInstructionPositionBefore, + "AFTER": PatchInsertInstructionPositionAfter, +} + +var mappingPatchInsertInstructionPositionEnumLowerCase = map[string]PatchInsertInstructionPositionEnum{ + "before": PatchInsertInstructionPositionBefore, + "after": PatchInsertInstructionPositionAfter, +} + +// GetPatchInsertInstructionPositionEnumValues Enumerates the set of values for PatchInsertInstructionPositionEnum +func GetPatchInsertInstructionPositionEnumValues() []PatchInsertInstructionPositionEnum { + values := make([]PatchInsertInstructionPositionEnum, 0) + for _, v := range mappingPatchInsertInstructionPositionEnum { + values = append(values, v) + } + return values +} + +// GetPatchInsertInstructionPositionEnumStringValues Enumerates the set of values in String for PatchInsertInstructionPositionEnum +func GetPatchInsertInstructionPositionEnumStringValues() []string { + return []string{ + "BEFORE", + "AFTER", + } +} + +// GetMappingPatchInsertInstructionPositionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchInsertInstructionPositionEnum(val string) (PatchInsertInstructionPositionEnum, bool) { + enum, ok := mappingPatchInsertInstructionPositionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/patch_instruction.go b/devops/patch_instruction.go new file mode 100644 index 0000000000..2dbfca6592 --- /dev/null +++ b/devops/patch_instruction.go @@ -0,0 +1,175 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchInstruction A single instruction to be included as part of Patch request content. +type PatchInstruction interface { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + GetSelection() *string +} + +type patchinstruction struct { + JsonData []byte + Selection *string `mandatory:"true" json:"selection"` + Operation string `json:"operation"` +} + +// UnmarshalJSON unmarshals json +func (m *patchinstruction) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpatchinstruction patchinstruction + s := struct { + Model Unmarshalerpatchinstruction + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Selection = s.Model.Selection + m.Operation = s.Model.Operation + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *patchinstruction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Operation { + case "MOVE": + mm := PatchMoveInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REMOVE": + mm := PatchRemoveInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REPLACE": + mm := PatchReplaceInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INSERT": + mm := PatchInsertInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REQUIRE": + mm := PatchRequireInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MERGE": + mm := PatchMergeInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PROHIBIT": + mm := PatchProhibitInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PatchInstruction: %s.", m.Operation) + return *m, nil + } +} + +// GetSelection returns Selection +func (m patchinstruction) GetSelection() *string { + return m.Selection +} + +func (m patchinstruction) 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 patchinstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchInstructionOperationEnum Enum with underlying type: string +type PatchInstructionOperationEnum string + +// Set of constants representing the allowable values for PatchInstructionOperationEnum +const ( + PatchInstructionOperationRequire PatchInstructionOperationEnum = "REQUIRE" + PatchInstructionOperationProhibit PatchInstructionOperationEnum = "PROHIBIT" + PatchInstructionOperationReplace PatchInstructionOperationEnum = "REPLACE" + PatchInstructionOperationInsert PatchInstructionOperationEnum = "INSERT" + PatchInstructionOperationRemove PatchInstructionOperationEnum = "REMOVE" + PatchInstructionOperationMove PatchInstructionOperationEnum = "MOVE" + PatchInstructionOperationMerge PatchInstructionOperationEnum = "MERGE" +) + +var mappingPatchInstructionOperationEnum = map[string]PatchInstructionOperationEnum{ + "REQUIRE": PatchInstructionOperationRequire, + "PROHIBIT": PatchInstructionOperationProhibit, + "REPLACE": PatchInstructionOperationReplace, + "INSERT": PatchInstructionOperationInsert, + "REMOVE": PatchInstructionOperationRemove, + "MOVE": PatchInstructionOperationMove, + "MERGE": PatchInstructionOperationMerge, +} + +var mappingPatchInstructionOperationEnumLowerCase = map[string]PatchInstructionOperationEnum{ + "require": PatchInstructionOperationRequire, + "prohibit": PatchInstructionOperationProhibit, + "replace": PatchInstructionOperationReplace, + "insert": PatchInstructionOperationInsert, + "remove": PatchInstructionOperationRemove, + "move": PatchInstructionOperationMove, + "merge": PatchInstructionOperationMerge, +} + +// GetPatchInstructionOperationEnumValues Enumerates the set of values for PatchInstructionOperationEnum +func GetPatchInstructionOperationEnumValues() []PatchInstructionOperationEnum { + values := make([]PatchInstructionOperationEnum, 0) + for _, v := range mappingPatchInstructionOperationEnum { + values = append(values, v) + } + return values +} + +// GetPatchInstructionOperationEnumStringValues Enumerates the set of values in String for PatchInstructionOperationEnum +func GetPatchInstructionOperationEnumStringValues() []string { + return []string{ + "REQUIRE", + "PROHIBIT", + "REPLACE", + "INSERT", + "REMOVE", + "MOVE", + "MERGE", + } +} + +// GetMappingPatchInstructionOperationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchInstructionOperationEnum(val string) (PatchInstructionOperationEnum, bool) { + enum, ok := mappingPatchInstructionOperationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/patch_merge_instruction.go b/devops/patch_merge_instruction.go new file mode 100644 index 0000000000..aca35d4cdf --- /dev/null +++ b/devops/patch_merge_instruction.go @@ -0,0 +1,70 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchMergeInstruction An operation that recursively updates items of the selection, or adding the value if the selection is empty. +// If the value is not an object, it is used directly, otherwise each key-value member is used +// to create or update a member of the same name in the target and the same process is applied recursively for each object-typed value +// (similar to RFC 7396 (https://tools.ietf.org/html/rfc7396#section-2) JSON Merge Patch, except that null values are copied +// rather than transformed into deletions). +// NOT_FOUND exceptions are handled by creating the implied containing structure. +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchMergeInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be merged into the target. + Value *interface{} `mandatory:"false" json:"value"` +} + +// GetSelection returns Selection +func (m PatchMergeInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchMergeInstruction) 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 PatchMergeInstruction) 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 PatchMergeInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchMergeInstruction PatchMergeInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchMergeInstruction + }{ + "MERGE", + (MarshalTypePatchMergeInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/patch_move_instruction.go b/devops/patch_move_instruction.go new file mode 100644 index 0000000000..c663ce6b6b --- /dev/null +++ b/devops/patch_move_instruction.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchMoveInstruction An operation that "puts" values from elsewhere in the target, functionally equivalent to a single add and then a remove. +// The first item of the selection is replaced, or created if the selection is empty. +// NOT_FOUND exceptions in the selection are handled by creating the implied containing structure. +// This operation fails if the `from` selection yields any exceptions, or if an item is moved to any of its descendants. +type PatchMoveInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // The selection that is to be moved, with the same format and semantics as `selection`. + From *string `mandatory:"true" json:"from"` + + // Where to insert the value in an array, relative to the first item in the selection. + // If there is no such item, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + // If the first item in the selection is not the child of an array, then this field has no effect. + Position PatchMoveInstructionPositionEnum `mandatory:"false" json:"position,omitempty"` +} + +// GetSelection returns Selection +func (m PatchMoveInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchMoveInstruction) 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 PatchMoveInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchMoveInstructionPositionEnum(string(m.Position)); !ok && m.Position != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Position: %s. Supported values are: %s.", m.Position, strings.Join(GetPatchMoveInstructionPositionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchMoveInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchMoveInstruction PatchMoveInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchMoveInstruction + }{ + "MOVE", + (MarshalTypePatchMoveInstruction)(m), + } + + return json.Marshal(&s) +} + +// PatchMoveInstructionPositionEnum Enum with underlying type: string +type PatchMoveInstructionPositionEnum string + +// Set of constants representing the allowable values for PatchMoveInstructionPositionEnum +const ( + PatchMoveInstructionPositionAt PatchMoveInstructionPositionEnum = "AT" + PatchMoveInstructionPositionBefore PatchMoveInstructionPositionEnum = "BEFORE" + PatchMoveInstructionPositionAfter PatchMoveInstructionPositionEnum = "AFTER" +) + +var mappingPatchMoveInstructionPositionEnum = map[string]PatchMoveInstructionPositionEnum{ + "AT": PatchMoveInstructionPositionAt, + "BEFORE": PatchMoveInstructionPositionBefore, + "AFTER": PatchMoveInstructionPositionAfter, +} + +var mappingPatchMoveInstructionPositionEnumLowerCase = map[string]PatchMoveInstructionPositionEnum{ + "at": PatchMoveInstructionPositionAt, + "before": PatchMoveInstructionPositionBefore, + "after": PatchMoveInstructionPositionAfter, +} + +// GetPatchMoveInstructionPositionEnumValues Enumerates the set of values for PatchMoveInstructionPositionEnum +func GetPatchMoveInstructionPositionEnumValues() []PatchMoveInstructionPositionEnum { + values := make([]PatchMoveInstructionPositionEnum, 0) + for _, v := range mappingPatchMoveInstructionPositionEnum { + values = append(values, v) + } + return values +} + +// GetPatchMoveInstructionPositionEnumStringValues Enumerates the set of values in String for PatchMoveInstructionPositionEnum +func GetPatchMoveInstructionPositionEnumStringValues() []string { + return []string{ + "AT", + "BEFORE", + "AFTER", + } +} + +// GetMappingPatchMoveInstructionPositionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchMoveInstructionPositionEnum(val string) (PatchMoveInstructionPositionEnum, bool) { + enum, ok := mappingPatchMoveInstructionPositionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/patch_prohibit_instruction.go b/devops/patch_prohibit_instruction.go new file mode 100644 index 0000000000..0b2179f1cb --- /dev/null +++ b/devops/patch_prohibit_instruction.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchProhibitInstruction A precondition operation that requires a selection to be empty, or optionally to be non-empty but include no item with a specified value +// (useful for asserting that a value does not exist before attempting to create it, avoiding accidental update). +// It fails if value is provided and the selection includes an item matching it, or if value is not provided and the selection is not empty, +// but ignores NOT_FOUND exceptions. +type PatchProhibitInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be compared against each item of the selection. + // If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + // Otherwise, it matches any item to which it is equal according to the rules of JSON Schema (https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + Value *interface{} `mandatory:"false" json:"value"` +} + +// GetSelection returns Selection +func (m PatchProhibitInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchProhibitInstruction) 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 PatchProhibitInstruction) 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 PatchProhibitInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchProhibitInstruction PatchProhibitInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchProhibitInstruction + }{ + "PROHIBIT", + (MarshalTypePatchProhibitInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/patch_pull_request_details.go b/devops/patch_pull_request_details.go new file mode 100644 index 0000000000..1863e9fc25 --- /dev/null +++ b/devops/patch_pull_request_details.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchPullRequestDetails Pull request details to patch +type PatchPullRequestDetails struct { + + // List of patch instructions + Items []PatchInstruction `mandatory:"false" json:"items"` +} + +func (m PatchPullRequestDetails) 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 PatchPullRequestDetails) 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 *PatchPullRequestDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []patchinstruction `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]PatchInstruction, 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.(PatchInstruction) + } else { + m.Items[i] = nil + } + } + return +} diff --git a/devops/patch_pull_request_request_response.go b/devops/patch_pull_request_request_response.go new file mode 100644 index 0000000000..0c494eddfe --- /dev/null +++ b/devops/patch_pull_request_request_response.go @@ -0,0 +1,101 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchPullRequestRequest wrapper for the PatchPullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/PatchPullRequest.go.html to see an example of how to use PatchPullRequestRequest. +type PatchPullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Details for the PullRequest update. + PatchPullRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchPullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchPullRequestRequest) 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 PatchPullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchPullRequestRequest) 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 PatchPullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchPullRequestResponse wrapper for the PatchPullRequest operation +type PatchPullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchPullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchPullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/patch_remove_instruction.go b/devops/patch_remove_instruction.go new file mode 100644 index 0000000000..2b821dae02 --- /dev/null +++ b/devops/patch_remove_instruction.go @@ -0,0 +1,62 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchRemoveInstruction An operation that deletes items, ignoring NOT_FOUND exceptions. +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchRemoveInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` +} + +// GetSelection returns Selection +func (m PatchRemoveInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchRemoveInstruction) 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 PatchRemoveInstruction) 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 PatchRemoveInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchRemoveInstruction PatchRemoveInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchRemoveInstruction + }{ + "REMOVE", + (MarshalTypePatchRemoveInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/patch_replace_instruction.go b/devops/patch_replace_instruction.go new file mode 100644 index 0000000000..ae757dabc1 --- /dev/null +++ b/devops/patch_replace_instruction.go @@ -0,0 +1,67 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchReplaceInstruction An operation that "puts" a value, replacing every item of the selection with it, or creating it if the selection is empty. +// NOT_FOUND exceptions are handled by creating the implied containing structure (but note that this may put the target in an invalid state, +// which can be prevented by use of precondition operations). +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchReplaceInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be added into the target. + Value *interface{} `mandatory:"true" json:"value"` +} + +// GetSelection returns Selection +func (m PatchReplaceInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchReplaceInstruction) 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 PatchReplaceInstruction) 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 PatchReplaceInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchReplaceInstruction PatchReplaceInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchReplaceInstruction + }{ + "REPLACE", + (MarshalTypePatchReplaceInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/patch_require_instruction.go b/devops/patch_require_instruction.go new file mode 100644 index 0000000000..0cfad15b3d --- /dev/null +++ b/devops/patch_require_instruction.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchRequireInstruction A precondition operation that requires a selection to be non-empty, and optionally to include an item with a specified value +// (useful for asserting that a value exists before attempting to update it, avoiding accidental creation). +// It fails if the selection is empty, or if value is provided and no item of the selection matches it. +type PatchRequireInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be compared against each item of the selection. + // If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + // Otherwise, it matches any item to which it is equal according to the rules of JSON Schema (https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + Value *interface{} `mandatory:"false" json:"value"` +} + +// GetSelection returns Selection +func (m PatchRequireInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchRequireInstruction) 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 PatchRequireInstruction) 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 PatchRequireInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchRequireInstruction PatchRequireInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchRequireInstruction + }{ + "REQUIRE", + (MarshalTypePatchRequireInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/principal_details.go b/devops/principal_details.go new file mode 100644 index 0000000000..8243227455 --- /dev/null +++ b/devops/principal_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrincipalDetails The principal details +type PrincipalDetails struct { + + // the OCID of the principal + PrincipalId *string `mandatory:"true" json:"principalId"` + + // the name of the principal + PrincipalName *string `mandatory:"false" json:"principalName"` + + // the type of principal + PrincipalType PrincipalDetailsPrincipalTypeEnum `mandatory:"false" json:"principalType,omitempty"` + + // The state of the principal, it can be active or inactive or suppressed for emails + PrincipalState PrincipalDetailsPrincipalStateEnum `mandatory:"false" json:"principalState,omitempty"` +} + +func (m PrincipalDetails) 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 PrincipalDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPrincipalDetailsPrincipalTypeEnum(string(m.PrincipalType)); !ok && m.PrincipalType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PrincipalType: %s. Supported values are: %s.", m.PrincipalType, strings.Join(GetPrincipalDetailsPrincipalTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPrincipalDetailsPrincipalStateEnum(string(m.PrincipalState)); !ok && m.PrincipalState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PrincipalState: %s. Supported values are: %s.", m.PrincipalState, strings.Join(GetPrincipalDetailsPrincipalStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PrincipalDetailsPrincipalTypeEnum Enum with underlying type: string +type PrincipalDetailsPrincipalTypeEnum string + +// Set of constants representing the allowable values for PrincipalDetailsPrincipalTypeEnum +const ( + PrincipalDetailsPrincipalTypeService PrincipalDetailsPrincipalTypeEnum = "SERVICE" + PrincipalDetailsPrincipalTypeUser PrincipalDetailsPrincipalTypeEnum = "USER" + PrincipalDetailsPrincipalTypeInstance PrincipalDetailsPrincipalTypeEnum = "INSTANCE" + PrincipalDetailsPrincipalTypeResource PrincipalDetailsPrincipalTypeEnum = "RESOURCE" +) + +var mappingPrincipalDetailsPrincipalTypeEnum = map[string]PrincipalDetailsPrincipalTypeEnum{ + "SERVICE": PrincipalDetailsPrincipalTypeService, + "USER": PrincipalDetailsPrincipalTypeUser, + "INSTANCE": PrincipalDetailsPrincipalTypeInstance, + "RESOURCE": PrincipalDetailsPrincipalTypeResource, +} + +var mappingPrincipalDetailsPrincipalTypeEnumLowerCase = map[string]PrincipalDetailsPrincipalTypeEnum{ + "service": PrincipalDetailsPrincipalTypeService, + "user": PrincipalDetailsPrincipalTypeUser, + "instance": PrincipalDetailsPrincipalTypeInstance, + "resource": PrincipalDetailsPrincipalTypeResource, +} + +// GetPrincipalDetailsPrincipalTypeEnumValues Enumerates the set of values for PrincipalDetailsPrincipalTypeEnum +func GetPrincipalDetailsPrincipalTypeEnumValues() []PrincipalDetailsPrincipalTypeEnum { + values := make([]PrincipalDetailsPrincipalTypeEnum, 0) + for _, v := range mappingPrincipalDetailsPrincipalTypeEnum { + values = append(values, v) + } + return values +} + +// GetPrincipalDetailsPrincipalTypeEnumStringValues Enumerates the set of values in String for PrincipalDetailsPrincipalTypeEnum +func GetPrincipalDetailsPrincipalTypeEnumStringValues() []string { + return []string{ + "SERVICE", + "USER", + "INSTANCE", + "RESOURCE", + } +} + +// GetMappingPrincipalDetailsPrincipalTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPrincipalDetailsPrincipalTypeEnum(val string) (PrincipalDetailsPrincipalTypeEnum, bool) { + enum, ok := mappingPrincipalDetailsPrincipalTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PrincipalDetailsPrincipalStateEnum Enum with underlying type: string +type PrincipalDetailsPrincipalStateEnum string + +// Set of constants representing the allowable values for PrincipalDetailsPrincipalStateEnum +const ( + PrincipalDetailsPrincipalStateActive PrincipalDetailsPrincipalStateEnum = "ACTIVE" + PrincipalDetailsPrincipalStateInactive PrincipalDetailsPrincipalStateEnum = "INACTIVE" + PrincipalDetailsPrincipalStateSuppressed PrincipalDetailsPrincipalStateEnum = "SUPPRESSED" +) + +var mappingPrincipalDetailsPrincipalStateEnum = map[string]PrincipalDetailsPrincipalStateEnum{ + "ACTIVE": PrincipalDetailsPrincipalStateActive, + "INACTIVE": PrincipalDetailsPrincipalStateInactive, + "SUPPRESSED": PrincipalDetailsPrincipalStateSuppressed, +} + +var mappingPrincipalDetailsPrincipalStateEnumLowerCase = map[string]PrincipalDetailsPrincipalStateEnum{ + "active": PrincipalDetailsPrincipalStateActive, + "inactive": PrincipalDetailsPrincipalStateInactive, + "suppressed": PrincipalDetailsPrincipalStateSuppressed, +} + +// GetPrincipalDetailsPrincipalStateEnumValues Enumerates the set of values for PrincipalDetailsPrincipalStateEnum +func GetPrincipalDetailsPrincipalStateEnumValues() []PrincipalDetailsPrincipalStateEnum { + values := make([]PrincipalDetailsPrincipalStateEnum, 0) + for _, v := range mappingPrincipalDetailsPrincipalStateEnum { + values = append(values, v) + } + return values +} + +// GetPrincipalDetailsPrincipalStateEnumStringValues Enumerates the set of values in String for PrincipalDetailsPrincipalStateEnum +func GetPrincipalDetailsPrincipalStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "SUPPRESSED", + } +} + +// GetMappingPrincipalDetailsPrincipalStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPrincipalDetailsPrincipalStateEnum(val string) (PrincipalDetailsPrincipalStateEnum, bool) { + enum, ok := mappingPrincipalDetailsPrincipalStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/project_notification_preference.go b/devops/project_notification_preference.go new file mode 100644 index 0000000000..536e6cfc47 --- /dev/null +++ b/devops/project_notification_preference.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProjectNotificationPreference The notification preference of the project. +type ProjectNotificationPreference struct { + + // The ocid of project resource + ProjectId *string `mandatory:"true" json:"projectId"` + + // The ocid of user. + UserId *string `mandatory:"true" json:"userId"` + + // The override value of project notification preference. + NotificationPreference ProjectNotificationPreferenceNotificationPreferenceEnum `mandatory:"true" json:"notificationPreference"` +} + +func (m ProjectNotificationPreference) 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 ProjectNotificationPreference) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingProjectNotificationPreferenceNotificationPreferenceEnum(string(m.NotificationPreference)); !ok && m.NotificationPreference != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NotificationPreference: %s. Supported values are: %s.", m.NotificationPreference, strings.Join(GetProjectNotificationPreferenceNotificationPreferenceEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ProjectNotificationPreferenceNotificationPreferenceEnum Enum with underlying type: string +type ProjectNotificationPreferenceNotificationPreferenceEnum string + +// Set of constants representing the allowable values for ProjectNotificationPreferenceNotificationPreferenceEnum +const ( + ProjectNotificationPreferenceNotificationPreferenceWatch ProjectNotificationPreferenceNotificationPreferenceEnum = "WATCH" + ProjectNotificationPreferenceNotificationPreferenceIgnore ProjectNotificationPreferenceNotificationPreferenceEnum = "IGNORE" + ProjectNotificationPreferenceNotificationPreferenceMention ProjectNotificationPreferenceNotificationPreferenceEnum = "MENTION" +) + +var mappingProjectNotificationPreferenceNotificationPreferenceEnum = map[string]ProjectNotificationPreferenceNotificationPreferenceEnum{ + "WATCH": ProjectNotificationPreferenceNotificationPreferenceWatch, + "IGNORE": ProjectNotificationPreferenceNotificationPreferenceIgnore, + "MENTION": ProjectNotificationPreferenceNotificationPreferenceMention, +} + +var mappingProjectNotificationPreferenceNotificationPreferenceEnumLowerCase = map[string]ProjectNotificationPreferenceNotificationPreferenceEnum{ + "watch": ProjectNotificationPreferenceNotificationPreferenceWatch, + "ignore": ProjectNotificationPreferenceNotificationPreferenceIgnore, + "mention": ProjectNotificationPreferenceNotificationPreferenceMention, +} + +// GetProjectNotificationPreferenceNotificationPreferenceEnumValues Enumerates the set of values for ProjectNotificationPreferenceNotificationPreferenceEnum +func GetProjectNotificationPreferenceNotificationPreferenceEnumValues() []ProjectNotificationPreferenceNotificationPreferenceEnum { + values := make([]ProjectNotificationPreferenceNotificationPreferenceEnum, 0) + for _, v := range mappingProjectNotificationPreferenceNotificationPreferenceEnum { + values = append(values, v) + } + return values +} + +// GetProjectNotificationPreferenceNotificationPreferenceEnumStringValues Enumerates the set of values in String for ProjectNotificationPreferenceNotificationPreferenceEnum +func GetProjectNotificationPreferenceNotificationPreferenceEnumStringValues() []string { + return []string{ + "WATCH", + "IGNORE", + "MENTION", + } +} + +// GetMappingProjectNotificationPreferenceNotificationPreferenceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProjectNotificationPreferenceNotificationPreferenceEnum(val string) (ProjectNotificationPreferenceNotificationPreferenceEnum, bool) { + enum, ok := mappingProjectNotificationPreferenceNotificationPreferenceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/project_repository_settings.go b/devops/project_repository_settings.go new file mode 100644 index 0000000000..06fa17cc0b --- /dev/null +++ b/devops/project_repository_settings.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProjectRepositorySettings User configured settings for project resources and their child repositories. +type ProjectRepositorySettings struct { + MergeSettings *MergeSettings `mandatory:"true" json:"mergeSettings"` + + ApprovalRules *ApprovalRuleCollection `mandatory:"true" json:"approvalRules"` +} + +func (m ProjectRepositorySettings) 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 ProjectRepositorySettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/protected_branch.go b/devops/protected_branch.go new file mode 100644 index 0000000000..bb8f1baf46 --- /dev/null +++ b/devops/protected_branch.go @@ -0,0 +1,53 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProtectedBranch Holds information used to restrict certain actions on branches +type ProtectedBranch struct { + + // Branch name inside a repository. + BranchName *string `mandatory:"true" json:"branchName"` + + // Protection levels to be added on the branch. + ProtectionLevels []ProtectionLevelEnum `mandatory:"true" json:"protectionLevels"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 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. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m ProtectedBranch) 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 ProtectedBranch) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range m.ProtectionLevels { + if _, ok := GetMappingProtectionLevelEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtectionLevels: %s. Supported values are: %s.", val, strings.Join(GetProtectionLevelEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/protected_branch_collection.go b/devops/protected_branch_collection.go new file mode 100644 index 0000000000..336db68d2d --- /dev/null +++ b/devops/protected_branch_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProtectedBranchCollection Collection of protected branches +type ProtectedBranchCollection struct { + + // List of objects describing protected branches + Items []ProtectedBranchSummary `mandatory:"true" json:"items"` +} + +func (m ProtectedBranchCollection) 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 ProtectedBranchCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/protected_branch_summary.go b/devops/protected_branch_summary.go new file mode 100644 index 0000000000..8bc2b08cd1 --- /dev/null +++ b/devops/protected_branch_summary.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProtectedBranchSummary Holds information used to restrict certain actions on branches +type ProtectedBranchSummary struct { + + // Branch name inside a repository. + BranchName *string `mandatory:"true" json:"branchName"` + + // Protection level to be added on the branch. + ProtectionLevels []ProtectionLevelEnum `mandatory:"true" json:"protectionLevels"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 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. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 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. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m ProtectedBranchSummary) 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 ProtectedBranchSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range m.ProtectionLevels { + if _, ok := GetMappingProtectionLevelEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtectionLevels: %s. Supported values are: %s.", val, strings.Join(GetProtectionLevelEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/protection_level.go b/devops/protection_level.go new file mode 100644 index 0000000000..dc67003621 --- /dev/null +++ b/devops/protection_level.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "strings" +) + +// ProtectionLevelEnum Enum with underlying type: string +type ProtectionLevelEnum string + +// Set of constants representing the allowable values for ProtectionLevelEnum +const ( + ProtectionLevelReadOnly ProtectionLevelEnum = "READ_ONLY" + ProtectionLevelPullRequestMergeOnly ProtectionLevelEnum = "PULL_REQUEST_MERGE_ONLY" +) + +var mappingProtectionLevelEnum = map[string]ProtectionLevelEnum{ + "READ_ONLY": ProtectionLevelReadOnly, + "PULL_REQUEST_MERGE_ONLY": ProtectionLevelPullRequestMergeOnly, +} + +var mappingProtectionLevelEnumLowerCase = map[string]ProtectionLevelEnum{ + "read_only": ProtectionLevelReadOnly, + "pull_request_merge_only": ProtectionLevelPullRequestMergeOnly, +} + +// GetProtectionLevelEnumValues Enumerates the set of values for ProtectionLevelEnum +func GetProtectionLevelEnumValues() []ProtectionLevelEnum { + values := make([]ProtectionLevelEnum, 0) + for _, v := range mappingProtectionLevelEnum { + values = append(values, v) + } + return values +} + +// GetProtectionLevelEnumStringValues Enumerates the set of values in String for ProtectionLevelEnum +func GetProtectionLevelEnumStringValues() []string { + return []string{ + "READ_ONLY", + "PULL_REQUEST_MERGE_ONLY", + } +} + +// GetMappingProtectionLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProtectionLevelEnum(val string) (ProtectionLevelEnum, bool) { + enum, ok := mappingProtectionLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/pull_request.go b/devops/pull_request.go new file mode 100644 index 0000000000..edd0a20c0e --- /dev/null +++ b/devops/pull_request.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequest Pull Request containing the diff between a review branch and a destination branch +type PullRequest struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // PullRequest title, can be renamed + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment Identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // DevOps Repository Identifier tells which repository this pull request belongs to + RepositoryId *string `mandatory:"true" json:"repositoryId"` + + // The source branch which contains the changes to be reviewed. Example: "feature/JIRA-123" + SourceBranch *string `mandatory:"true" json:"sourceBranch"` + + // The destination branch against which the changes are to be reviewed. Example: "main". + DestinationBranch *string `mandatory:"true" json:"destinationBranch"` + + // The time the PullRequest was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the PullRequest. + LifecycleState PullRequestLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The status of the Pull Request. + LifecycleDetails PullRequestLifecycleDetailsEnum `mandatory:"true" json:"lifecycleDetails"` + + CreatedBy *PrincipalDetails `mandatory:"true" json:"createdBy"` + + // The total number of comments on the pull request. + TotalComments *int `mandatory:"true" json:"totalComments"` + + // The total number of reviewers on the pull request. + TotalReviewers *int `mandatory:"true" json:"totalReviewers"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` + + // Details of the pull request. Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The source branch commit ID when the Pull Request status was last changed to merged or closed + SourceCommitIdAtTermination *string `mandatory:"false" json:"sourceCommitIdAtTermination"` + + // The merge base commit ID when the Pull Request status was last changed to merged or closed + MergeBaseCommitIdAtTermination *string `mandatory:"false" json:"mergeBaseCommitIdAtTermination"` + + // The time the PullRequest was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // List of Reviewers. + Reviewers []Reviewer `mandatory:"false" json:"reviewers"` + + MergeChecks *MergeCheckCollection `mandatory:"false" json:"mergeChecks"` + + MergedBy *PrincipalDetails `mandatory:"false" json:"mergedBy"` + + // The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + SourceRepositoryId *string `mandatory:"false" json:"sourceRepositoryId"` +} + +func (m PullRequest) 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 PullRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestLifecycleStateEnum(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(GetPullRequestLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPullRequestLifecycleDetailsEnum(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(GetPullRequestLifecycleDetailsEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PullRequestLifecycleStateEnum Enum with underlying type: string +type PullRequestLifecycleStateEnum string + +// Set of constants representing the allowable values for PullRequestLifecycleStateEnum +const ( + PullRequestLifecycleStateCreating PullRequestLifecycleStateEnum = "CREATING" + PullRequestLifecycleStateUpdating PullRequestLifecycleStateEnum = "UPDATING" + PullRequestLifecycleStateActive PullRequestLifecycleStateEnum = "ACTIVE" + PullRequestLifecycleStateDeleting PullRequestLifecycleStateEnum = "DELETING" + PullRequestLifecycleStateDeleted PullRequestLifecycleStateEnum = "DELETED" + PullRequestLifecycleStateFailed PullRequestLifecycleStateEnum = "FAILED" +) + +var mappingPullRequestLifecycleStateEnum = map[string]PullRequestLifecycleStateEnum{ + "CREATING": PullRequestLifecycleStateCreating, + "UPDATING": PullRequestLifecycleStateUpdating, + "ACTIVE": PullRequestLifecycleStateActive, + "DELETING": PullRequestLifecycleStateDeleting, + "DELETED": PullRequestLifecycleStateDeleted, + "FAILED": PullRequestLifecycleStateFailed, +} + +var mappingPullRequestLifecycleStateEnumLowerCase = map[string]PullRequestLifecycleStateEnum{ + "creating": PullRequestLifecycleStateCreating, + "updating": PullRequestLifecycleStateUpdating, + "active": PullRequestLifecycleStateActive, + "deleting": PullRequestLifecycleStateDeleting, + "deleted": PullRequestLifecycleStateDeleted, + "failed": PullRequestLifecycleStateFailed, +} + +// GetPullRequestLifecycleStateEnumValues Enumerates the set of values for PullRequestLifecycleStateEnum +func GetPullRequestLifecycleStateEnumValues() []PullRequestLifecycleStateEnum { + values := make([]PullRequestLifecycleStateEnum, 0) + for _, v := range mappingPullRequestLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestLifecycleStateEnumStringValues Enumerates the set of values in String for PullRequestLifecycleStateEnum +func GetPullRequestLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingPullRequestLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestLifecycleStateEnum(val string) (PullRequestLifecycleStateEnum, bool) { + enum, ok := mappingPullRequestLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PullRequestLifecycleDetailsEnum Enum with underlying type: string +type PullRequestLifecycleDetailsEnum string + +// Set of constants representing the allowable values for PullRequestLifecycleDetailsEnum +const ( + PullRequestLifecycleDetailsOpen PullRequestLifecycleDetailsEnum = "OPEN" + PullRequestLifecycleDetailsConflict PullRequestLifecycleDetailsEnum = "CONFLICT" + PullRequestLifecycleDetailsClosed PullRequestLifecycleDetailsEnum = "CLOSED" + PullRequestLifecycleDetailsMerging PullRequestLifecycleDetailsEnum = "MERGING" + PullRequestLifecycleDetailsMerged PullRequestLifecycleDetailsEnum = "MERGED" +) + +var mappingPullRequestLifecycleDetailsEnum = map[string]PullRequestLifecycleDetailsEnum{ + "OPEN": PullRequestLifecycleDetailsOpen, + "CONFLICT": PullRequestLifecycleDetailsConflict, + "CLOSED": PullRequestLifecycleDetailsClosed, + "MERGING": PullRequestLifecycleDetailsMerging, + "MERGED": PullRequestLifecycleDetailsMerged, +} + +var mappingPullRequestLifecycleDetailsEnumLowerCase = map[string]PullRequestLifecycleDetailsEnum{ + "open": PullRequestLifecycleDetailsOpen, + "conflict": PullRequestLifecycleDetailsConflict, + "closed": PullRequestLifecycleDetailsClosed, + "merging": PullRequestLifecycleDetailsMerging, + "merged": PullRequestLifecycleDetailsMerged, +} + +// GetPullRequestLifecycleDetailsEnumValues Enumerates the set of values for PullRequestLifecycleDetailsEnum +func GetPullRequestLifecycleDetailsEnumValues() []PullRequestLifecycleDetailsEnum { + values := make([]PullRequestLifecycleDetailsEnum, 0) + for _, v := range mappingPullRequestLifecycleDetailsEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestLifecycleDetailsEnumStringValues Enumerates the set of values in String for PullRequestLifecycleDetailsEnum +func GetPullRequestLifecycleDetailsEnumStringValues() []string { + return []string{ + "OPEN", + "CONFLICT", + "CLOSED", + "MERGING", + "MERGED", + } +} + +// GetMappingPullRequestLifecycleDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestLifecycleDetailsEnum(val string) (PullRequestLifecycleDetailsEnum, bool) { + enum, ok := mappingPullRequestLifecycleDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/pull_request_activity_collection.go b/devops/pull_request_activity_collection.go new file mode 100644 index 0000000000..5f84b706cc --- /dev/null +++ b/devops/pull_request_activity_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestActivityCollection Result of list pullRequest activities. +type PullRequestActivityCollection struct { + + // List of pullRequest activity objects. + Items []PullRequestActivitySummary `mandatory:"true" json:"items"` +} + +func (m PullRequestActivityCollection) 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 PullRequestActivityCollection) 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 *PullRequestActivityCollection) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []pullrequestactivitysummary `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]PullRequestActivitySummary, 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.(PullRequestActivitySummary) + } else { + m.Items[i] = nil + } + } + return +} diff --git a/devops/pull_request_activity_summary.go b/devops/pull_request_activity_summary.go new file mode 100644 index 0000000000..c293d7f794 --- /dev/null +++ b/devops/pull_request_activity_summary.go @@ -0,0 +1,186 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestActivitySummary Summary of an activity record in a pull request +type PullRequestActivitySummary interface { + + // activity identifier + GetId() *string + + GetPrincipal() *PrincipalDetails + + // pullRequest OCID + GetPullRequestId() *string + + // The time the action was performed. An RFC3339 formatted datetime string + GetTimeOccurred() *common.SDKTime +} + +type pullrequestactivitysummary struct { + JsonData []byte + Id *string `mandatory:"true" json:"id"` + Principal *PrincipalDetails `mandatory:"true" json:"principal"` + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + TimeOccurred *common.SDKTime `mandatory:"true" json:"timeOccurred"` + ActivityType string `json:"activityType"` +} + +// UnmarshalJSON unmarshals json +func (m *pullrequestactivitysummary) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpullrequestactivitysummary pullrequestactivitysummary + s := struct { + Model Unmarshalerpullrequestactivitysummary + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.Principal = s.Model.Principal + m.PullRequestId = s.Model.PullRequestId + m.TimeOccurred = s.Model.TimeOccurred + m.ActivityType = s.Model.ActivityType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *pullrequestactivitysummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ActivityType { + case "COMMIT": + mm := CommitActivitySummary{} + err = json.Unmarshal(data, &mm) + return mm, err + case "COMMENT": + mm := CommentActivitySummary{} + err = json.Unmarshal(data, &mm) + return mm, err + case "APPROVAL": + mm := ApprovalActivitySummary{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REVIEWER": + mm := ReviewerActivitySummary{} + err = json.Unmarshal(data, &mm) + return mm, err + case "LIFECYCLE": + mm := PullRequestLifecycleActivitySummary{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PullRequestActivitySummary: %s.", m.ActivityType) + return *m, nil + } +} + +// GetId returns Id +func (m pullrequestactivitysummary) GetId() *string { + return m.Id +} + +// GetPrincipal returns Principal +func (m pullrequestactivitysummary) GetPrincipal() *PrincipalDetails { + return m.Principal +} + +// GetPullRequestId returns PullRequestId +func (m pullrequestactivitysummary) GetPullRequestId() *string { + return m.PullRequestId +} + +// GetTimeOccurred returns TimeOccurred +func (m pullrequestactivitysummary) GetTimeOccurred() *common.SDKTime { + return m.TimeOccurred +} + +func (m pullrequestactivitysummary) 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 pullrequestactivitysummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PullRequestActivitySummaryActivityTypeEnum Enum with underlying type: string +type PullRequestActivitySummaryActivityTypeEnum string + +// Set of constants representing the allowable values for PullRequestActivitySummaryActivityTypeEnum +const ( + PullRequestActivitySummaryActivityTypeLifecycle PullRequestActivitySummaryActivityTypeEnum = "LIFECYCLE" + PullRequestActivitySummaryActivityTypeApproval PullRequestActivitySummaryActivityTypeEnum = "APPROVAL" + PullRequestActivitySummaryActivityTypeCommit PullRequestActivitySummaryActivityTypeEnum = "COMMIT" + PullRequestActivitySummaryActivityTypeReviewer PullRequestActivitySummaryActivityTypeEnum = "REVIEWER" + PullRequestActivitySummaryActivityTypeComment PullRequestActivitySummaryActivityTypeEnum = "COMMENT" +) + +var mappingPullRequestActivitySummaryActivityTypeEnum = map[string]PullRequestActivitySummaryActivityTypeEnum{ + "LIFECYCLE": PullRequestActivitySummaryActivityTypeLifecycle, + "APPROVAL": PullRequestActivitySummaryActivityTypeApproval, + "COMMIT": PullRequestActivitySummaryActivityTypeCommit, + "REVIEWER": PullRequestActivitySummaryActivityTypeReviewer, + "COMMENT": PullRequestActivitySummaryActivityTypeComment, +} + +var mappingPullRequestActivitySummaryActivityTypeEnumLowerCase = map[string]PullRequestActivitySummaryActivityTypeEnum{ + "lifecycle": PullRequestActivitySummaryActivityTypeLifecycle, + "approval": PullRequestActivitySummaryActivityTypeApproval, + "commit": PullRequestActivitySummaryActivityTypeCommit, + "reviewer": PullRequestActivitySummaryActivityTypeReviewer, + "comment": PullRequestActivitySummaryActivityTypeComment, +} + +// GetPullRequestActivitySummaryActivityTypeEnumValues Enumerates the set of values for PullRequestActivitySummaryActivityTypeEnum +func GetPullRequestActivitySummaryActivityTypeEnumValues() []PullRequestActivitySummaryActivityTypeEnum { + values := make([]PullRequestActivitySummaryActivityTypeEnum, 0) + for _, v := range mappingPullRequestActivitySummaryActivityTypeEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestActivitySummaryActivityTypeEnumStringValues Enumerates the set of values in String for PullRequestActivitySummaryActivityTypeEnum +func GetPullRequestActivitySummaryActivityTypeEnumStringValues() []string { + return []string{ + "LIFECYCLE", + "APPROVAL", + "COMMIT", + "REVIEWER", + "COMMENT", + } +} + +// GetMappingPullRequestActivitySummaryActivityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestActivitySummaryActivityTypeEnum(val string) (PullRequestActivitySummaryActivityTypeEnum, bool) { + enum, ok := mappingPullRequestActivitySummaryActivityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/pull_request_attachment.go b/devops/pull_request_attachment.go new file mode 100644 index 0000000000..fc7f23e654 --- /dev/null +++ b/devops/pull_request_attachment.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestAttachment Pull Request attachment created by users. +type PullRequestAttachment struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // OCID of the pull request that this attachment belongs to + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // name to display in description or comment + FileName *string `mandatory:"true" json:"fileName"` + + // Creation timestamp. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + CreatedBy *PrincipalDetails `mandatory:"true" json:"createdBy"` +} + +func (m PullRequestAttachment) 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 PullRequestAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_attachment_collection.go b/devops/pull_request_attachment_collection.go new file mode 100644 index 0000000000..d94f3a21b5 --- /dev/null +++ b/devops/pull_request_attachment_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestAttachmentCollection Result of list pullRequest attachment. +type PullRequestAttachmentCollection struct { + + // List of pullRequest attachment objects. + Items []PullRequestAttachmentSummary `mandatory:"true" json:"items"` +} + +func (m PullRequestAttachmentCollection) 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 PullRequestAttachmentCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_attachment_summary.go b/devops/pull_request_attachment_summary.go new file mode 100644 index 0000000000..207563fae4 --- /dev/null +++ b/devops/pull_request_attachment_summary.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestAttachmentSummary summary of a pullRequest attachment +type PullRequestAttachmentSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // OCID of the pull request that this attachment belongs to + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // name to display in description or comment + FileName *string `mandatory:"true" json:"fileName"` + + // Creation timestamp. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + CreatedBy *PrincipalDetails `mandatory:"true" json:"createdBy"` +} + +func (m PullRequestAttachmentSummary) 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 PullRequestAttachmentSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_author_collection.go b/devops/pull_request_author_collection.go new file mode 100644 index 0000000000..bf602f6362 --- /dev/null +++ b/devops/pull_request_author_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestAuthorCollection Result of listing PR authors. +type PullRequestAuthorCollection struct { + + // List of authors who has ever created PR before. + Items []PullRequestAuthorSummary `mandatory:"true" json:"items"` +} + +func (m PullRequestAuthorCollection) 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 PullRequestAuthorCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_author_summary.go b/devops/pull_request_author_summary.go new file mode 100644 index 0000000000..ca1b1eed0f --- /dev/null +++ b/devops/pull_request_author_summary.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestAuthorSummary Object containing summary of PR author. +type PullRequestAuthorSummary struct { + PrincipalDetails *PrincipalDetails `mandatory:"true" json:"principalDetails"` +} + +func (m PullRequestAuthorSummary) 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 PullRequestAuthorSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_change_summary_metrics.go b/devops/pull_request_change_summary_metrics.go new file mode 100644 index 0000000000..1b0cc1aa05 --- /dev/null +++ b/devops/pull_request_change_summary_metrics.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestChangeSummaryMetrics Response object for obtaining summary metric of Pull Request changed files. +type PullRequestChangeSummaryMetrics struct { + + // The number of lines added in whole difference. + ChangedFilesCount *int `mandatory:"true" json:"changedFilesCount"` + + // The number of lines added in whole difference. + AddedLinesCount *int `mandatory:"true" json:"addedLinesCount"` + + // The number of lines deleted in whole difference. + DeletedLinesCount *int `mandatory:"true" json:"deletedLinesCount"` +} + +func (m PullRequestChangeSummaryMetrics) 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 PullRequestChangeSummaryMetrics) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_collection.go b/devops/pull_request_collection.go new file mode 100644 index 0000000000..91aa569bef --- /dev/null +++ b/devops/pull_request_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestCollection Results of a Pull Request search. Contains both PullRequestSummary items and other information, such as metadata. +type PullRequestCollection struct { + + // List of Pull Requests. + Items []PullRequestSummary `mandatory:"true" json:"items"` +} + +func (m PullRequestCollection) 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 PullRequestCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_comment.go b/devops/pull_request_comment.go new file mode 100644 index 0000000000..1a572f6845 --- /dev/null +++ b/devops/pull_request_comment.go @@ -0,0 +1,216 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestComment User comments created by reviewers during the pull request review. +type PullRequestComment struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // OCID of the pull request that this comment belongs to + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // Content of the Comment. + Data *string `mandatory:"true" json:"data"` + + // Status of the Comment + Status PullRequestCommentStatusEnum `mandatory:"true" json:"status"` + + // Creation timestamp. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + CreatedBy *PrincipalDetails `mandatory:"true" json:"createdBy"` + + // ID of parent Comment + ParentId *string `mandatory:"false" json:"parentId"` + + // File path in the commit + FilePath *string `mandatory:"false" json:"filePath"` + + // Commit SHA + CommitId *string `mandatory:"false" json:"commitId"` + + // File path in the target commit + FileType PullRequestCommentFileTypeEnum `mandatory:"false" json:"fileType,omitempty"` + + // Line number in the file + LineNumber *int `mandatory:"false" json:"lineNumber"` + + Likes *PullRequestCommentLikeCollection `mandatory:"false" json:"likes"` + + // Latest update timestamp. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + UpdatedBy *PrincipalDetails `mandatory:"false" json:"updatedBy"` + + // Shows the status of an inline comments context + ContextStatus PullRequestCommentContextStatusEnum `mandatory:"false" json:"contextStatus,omitempty"` + + // 4 line snippet to be displayed as context for inline comments + CommentContext []DiffLineDetails `mandatory:"false" json:"commentContext"` +} + +func (m PullRequestComment) 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 PullRequestComment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestCommentStatusEnum(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(GetPullRequestCommentStatusEnumStringValues(), ","))) + } + + if _, ok := GetMappingPullRequestCommentFileTypeEnum(string(m.FileType)); !ok && m.FileType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FileType: %s. Supported values are: %s.", m.FileType, strings.Join(GetPullRequestCommentFileTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPullRequestCommentContextStatusEnum(string(m.ContextStatus)); !ok && m.ContextStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ContextStatus: %s. Supported values are: %s.", m.ContextStatus, strings.Join(GetPullRequestCommentContextStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PullRequestCommentFileTypeEnum Enum with underlying type: string +type PullRequestCommentFileTypeEnum string + +// Set of constants representing the allowable values for PullRequestCommentFileTypeEnum +const ( + PullRequestCommentFileTypeSource PullRequestCommentFileTypeEnum = "SOURCE" + PullRequestCommentFileTypeDestination PullRequestCommentFileTypeEnum = "DESTINATION" +) + +var mappingPullRequestCommentFileTypeEnum = map[string]PullRequestCommentFileTypeEnum{ + "SOURCE": PullRequestCommentFileTypeSource, + "DESTINATION": PullRequestCommentFileTypeDestination, +} + +var mappingPullRequestCommentFileTypeEnumLowerCase = map[string]PullRequestCommentFileTypeEnum{ + "source": PullRequestCommentFileTypeSource, + "destination": PullRequestCommentFileTypeDestination, +} + +// GetPullRequestCommentFileTypeEnumValues Enumerates the set of values for PullRequestCommentFileTypeEnum +func GetPullRequestCommentFileTypeEnumValues() []PullRequestCommentFileTypeEnum { + values := make([]PullRequestCommentFileTypeEnum, 0) + for _, v := range mappingPullRequestCommentFileTypeEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestCommentFileTypeEnumStringValues Enumerates the set of values in String for PullRequestCommentFileTypeEnum +func GetPullRequestCommentFileTypeEnumStringValues() []string { + return []string{ + "SOURCE", + "DESTINATION", + } +} + +// GetMappingPullRequestCommentFileTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestCommentFileTypeEnum(val string) (PullRequestCommentFileTypeEnum, bool) { + enum, ok := mappingPullRequestCommentFileTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PullRequestCommentStatusEnum Enum with underlying type: string +type PullRequestCommentStatusEnum string + +// Set of constants representing the allowable values for PullRequestCommentStatusEnum +const ( + PullRequestCommentStatusActive PullRequestCommentStatusEnum = "ACTIVE" + PullRequestCommentStatusOutdated PullRequestCommentStatusEnum = "OUTDATED" +) + +var mappingPullRequestCommentStatusEnum = map[string]PullRequestCommentStatusEnum{ + "ACTIVE": PullRequestCommentStatusActive, + "OUTDATED": PullRequestCommentStatusOutdated, +} + +var mappingPullRequestCommentStatusEnumLowerCase = map[string]PullRequestCommentStatusEnum{ + "active": PullRequestCommentStatusActive, + "outdated": PullRequestCommentStatusOutdated, +} + +// GetPullRequestCommentStatusEnumValues Enumerates the set of values for PullRequestCommentStatusEnum +func GetPullRequestCommentStatusEnumValues() []PullRequestCommentStatusEnum { + values := make([]PullRequestCommentStatusEnum, 0) + for _, v := range mappingPullRequestCommentStatusEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestCommentStatusEnumStringValues Enumerates the set of values in String for PullRequestCommentStatusEnum +func GetPullRequestCommentStatusEnumStringValues() []string { + return []string{ + "ACTIVE", + "OUTDATED", + } +} + +// GetMappingPullRequestCommentStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestCommentStatusEnum(val string) (PullRequestCommentStatusEnum, bool) { + enum, ok := mappingPullRequestCommentStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PullRequestCommentContextStatusEnum Enum with underlying type: string +type PullRequestCommentContextStatusEnum string + +// Set of constants representing the allowable values for PullRequestCommentContextStatusEnum +const ( + PullRequestCommentContextStatusProcessed PullRequestCommentContextStatusEnum = "PROCESSED" + PullRequestCommentContextStatusNeedsProcessing PullRequestCommentContextStatusEnum = "NEEDS_PROCESSING" +) + +var mappingPullRequestCommentContextStatusEnum = map[string]PullRequestCommentContextStatusEnum{ + "PROCESSED": PullRequestCommentContextStatusProcessed, + "NEEDS_PROCESSING": PullRequestCommentContextStatusNeedsProcessing, +} + +var mappingPullRequestCommentContextStatusEnumLowerCase = map[string]PullRequestCommentContextStatusEnum{ + "processed": PullRequestCommentContextStatusProcessed, + "needs_processing": PullRequestCommentContextStatusNeedsProcessing, +} + +// GetPullRequestCommentContextStatusEnumValues Enumerates the set of values for PullRequestCommentContextStatusEnum +func GetPullRequestCommentContextStatusEnumValues() []PullRequestCommentContextStatusEnum { + values := make([]PullRequestCommentContextStatusEnum, 0) + for _, v := range mappingPullRequestCommentContextStatusEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestCommentContextStatusEnumStringValues Enumerates the set of values in String for PullRequestCommentContextStatusEnum +func GetPullRequestCommentContextStatusEnumStringValues() []string { + return []string{ + "PROCESSED", + "NEEDS_PROCESSING", + } +} + +// GetMappingPullRequestCommentContextStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestCommentContextStatusEnum(val string) (PullRequestCommentContextStatusEnum, bool) { + enum, ok := mappingPullRequestCommentContextStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/pull_request_comment_collection.go b/devops/pull_request_comment_collection.go new file mode 100644 index 0000000000..d76b7a754b --- /dev/null +++ b/devops/pull_request_comment_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestCommentCollection Result of list pullRequest comments. +type PullRequestCommentCollection struct { + + // List of pullRequest comment objects. + Items []PullRequestCommentSummary `mandatory:"true" json:"items"` +} + +func (m PullRequestCommentCollection) 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 PullRequestCommentCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_comment_like_collection.go b/devops/pull_request_comment_like_collection.go new file mode 100644 index 0000000000..cde7454e4a --- /dev/null +++ b/devops/pull_request_comment_like_collection.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestCommentLikeCollection Abstract of Pull Request Comment likes. +type PullRequestCommentLikeCollection struct { + + // List of liked users of whom liked the pull request comment (max size is 50). + Users []PrincipalDetails `mandatory:"true" json:"users"` + + // Total like counter + TotalLikes *int `mandatory:"true" json:"totalLikes"` +} + +func (m PullRequestCommentLikeCollection) 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 PullRequestCommentLikeCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_comment_summary.go b/devops/pull_request_comment_summary.go new file mode 100644 index 0000000000..30baa21a09 --- /dev/null +++ b/devops/pull_request_comment_summary.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestCommentSummary summary of a pullRequest comment +type PullRequestCommentSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // OCID of the pull request that this comment belongs to + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // Content of the Comment. + Data *string `mandatory:"true" json:"data"` + + // Status of the Comment + Status PullRequestCommentStatusEnum `mandatory:"true" json:"status"` + + // Creation timestamp. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + CreatedBy *PrincipalDetails `mandatory:"true" json:"createdBy"` + + // ID of parent Comment + ParentId *string `mandatory:"false" json:"parentId"` + + // File path in the commit + FilePath *string `mandatory:"false" json:"filePath"` + + // Commit SHA + CommitId *string `mandatory:"false" json:"commitId"` + + // File path in the target commit + FileType PullRequestCommentFileTypeEnum `mandatory:"false" json:"fileType,omitempty"` + + // Line number in the file + LineNumber *int `mandatory:"false" json:"lineNumber"` + + Likes *PullRequestCommentLikeCollection `mandatory:"false" json:"likes"` + + // Latest update timestamp. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + UpdatedBy *PrincipalDetails `mandatory:"false" json:"updatedBy"` + + // Shows the status of an inline comments context + ContextStatus PullRequestCommentContextStatusEnum `mandatory:"false" json:"contextStatus,omitempty"` + + // 4 line snippet to be displayed as context for inline comments + CommentContext []DiffLineDetails `mandatory:"false" json:"commentContext"` +} + +func (m PullRequestCommentSummary) 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 PullRequestCommentSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestCommentStatusEnum(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(GetPullRequestCommentStatusEnumStringValues(), ","))) + } + + if _, ok := GetMappingPullRequestCommentFileTypeEnum(string(m.FileType)); !ok && m.FileType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FileType: %s. Supported values are: %s.", m.FileType, strings.Join(GetPullRequestCommentFileTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPullRequestCommentContextStatusEnum(string(m.ContextStatus)); !ok && m.ContextStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ContextStatus: %s. Supported values are: %s.", m.ContextStatus, strings.Join(GetPullRequestCommentContextStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_file_change_collection.go b/devops/pull_request_file_change_collection.go new file mode 100644 index 0000000000..b84d8f2474 --- /dev/null +++ b/devops/pull_request_file_change_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestFileChangeCollection Result of Pull Request difference. +type PullRequestFileChangeCollection struct { + + // List of objects describing Pull Request differences for changed files. + Items []PullRequestFileChangeSummary `mandatory:"true" json:"items"` +} + +func (m PullRequestFileChangeCollection) 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 PullRequestFileChangeCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_file_change_summary.go b/devops/pull_request_file_change_summary.go new file mode 100644 index 0000000000..c5d221f375 --- /dev/null +++ b/devops/pull_request_file_change_summary.go @@ -0,0 +1,75 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestFileChangeSummary Entry for description of change on a file. +type PullRequestFileChangeSummary struct { + + // Type of change made to file. + ChangeType *string `mandatory:"true" json:"changeType"` + + // The type of the changed object. + ObjectType *string `mandatory:"false" json:"objectType"` + + // The ID of the commit where the change is coming from. + CommitId *string `mandatory:"false" json:"commitId"` + + // The path on the target to the changed object. + OldPath *string `mandatory:"false" json:"oldPath"` + + // The path on the source to the changed object. + NewPath *string `mandatory:"false" json:"newPath"` + + // The ID of the changed object on the target. + OldId *string `mandatory:"false" json:"oldId"` + + // The ID of the changed object on the source. + NewId *string `mandatory:"false" json:"newId"` + + // The number of lines added in whole difference. + AddedLinesCount *int `mandatory:"false" json:"addedLinesCount"` + + // The number of lines deleted in whole difference. + DeletedLinesCount *int `mandatory:"false" json:"deletedLinesCount"` + + // Indicates whether the changed file contains conflicts. + HasConflicts *bool `mandatory:"false" json:"hasConflicts"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 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. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 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. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m PullRequestFileChangeSummary) 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 PullRequestFileChangeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/pull_request_lifecycle_activity_summary.go b/devops/pull_request_lifecycle_activity_summary.go new file mode 100644 index 0000000000..66c301d426 --- /dev/null +++ b/devops/pull_request_lifecycle_activity_summary.go @@ -0,0 +1,138 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestLifecycleActivitySummary activity describing a pull request state change +type PullRequestLifecycleActivitySummary struct { + + // activity identifier + Id *string `mandatory:"true" json:"id"` + + Principal *PrincipalDetails `mandatory:"true" json:"principal"` + + // pullRequest OCID + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // The time the action was performed. An RFC3339 formatted datetime string + TimeOccurred *common.SDKTime `mandatory:"true" json:"timeOccurred"` + + // The state of a pull request after an action. + State PullRequestLifecycleActivitySummaryStateEnum `mandatory:"true" json:"state"` +} + +// GetId returns Id +func (m PullRequestLifecycleActivitySummary) GetId() *string { + return m.Id +} + +// GetPrincipal returns Principal +func (m PullRequestLifecycleActivitySummary) GetPrincipal() *PrincipalDetails { + return m.Principal +} + +// GetPullRequestId returns PullRequestId +func (m PullRequestLifecycleActivitySummary) GetPullRequestId() *string { + return m.PullRequestId +} + +// GetTimeOccurred returns TimeOccurred +func (m PullRequestLifecycleActivitySummary) GetTimeOccurred() *common.SDKTime { + return m.TimeOccurred +} + +func (m PullRequestLifecycleActivitySummary) 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 PullRequestLifecycleActivitySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestLifecycleActivitySummaryStateEnum(string(m.State)); !ok && m.State != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for State: %s. Supported values are: %s.", m.State, strings.Join(GetPullRequestLifecycleActivitySummaryStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PullRequestLifecycleActivitySummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypePullRequestLifecycleActivitySummary PullRequestLifecycleActivitySummary + s := struct { + DiscriminatorParam string `json:"activityType"` + MarshalTypePullRequestLifecycleActivitySummary + }{ + "LIFECYCLE", + (MarshalTypePullRequestLifecycleActivitySummary)(m), + } + + return json.Marshal(&s) +} + +// PullRequestLifecycleActivitySummaryStateEnum Enum with underlying type: string +type PullRequestLifecycleActivitySummaryStateEnum string + +// Set of constants representing the allowable values for PullRequestLifecycleActivitySummaryStateEnum +const ( + PullRequestLifecycleActivitySummaryStateOpened PullRequestLifecycleActivitySummaryStateEnum = "OPENED" + PullRequestLifecycleActivitySummaryStateClosed PullRequestLifecycleActivitySummaryStateEnum = "CLOSED" + PullRequestLifecycleActivitySummaryStateMerged PullRequestLifecycleActivitySummaryStateEnum = "MERGED" + PullRequestLifecycleActivitySummaryStateReopened PullRequestLifecycleActivitySummaryStateEnum = "REOPENED" +) + +var mappingPullRequestLifecycleActivitySummaryStateEnum = map[string]PullRequestLifecycleActivitySummaryStateEnum{ + "OPENED": PullRequestLifecycleActivitySummaryStateOpened, + "CLOSED": PullRequestLifecycleActivitySummaryStateClosed, + "MERGED": PullRequestLifecycleActivitySummaryStateMerged, + "REOPENED": PullRequestLifecycleActivitySummaryStateReopened, +} + +var mappingPullRequestLifecycleActivitySummaryStateEnumLowerCase = map[string]PullRequestLifecycleActivitySummaryStateEnum{ + "opened": PullRequestLifecycleActivitySummaryStateOpened, + "closed": PullRequestLifecycleActivitySummaryStateClosed, + "merged": PullRequestLifecycleActivitySummaryStateMerged, + "reopened": PullRequestLifecycleActivitySummaryStateReopened, +} + +// GetPullRequestLifecycleActivitySummaryStateEnumValues Enumerates the set of values for PullRequestLifecycleActivitySummaryStateEnum +func GetPullRequestLifecycleActivitySummaryStateEnumValues() []PullRequestLifecycleActivitySummaryStateEnum { + values := make([]PullRequestLifecycleActivitySummaryStateEnum, 0) + for _, v := range mappingPullRequestLifecycleActivitySummaryStateEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestLifecycleActivitySummaryStateEnumStringValues Enumerates the set of values in String for PullRequestLifecycleActivitySummaryStateEnum +func GetPullRequestLifecycleActivitySummaryStateEnumStringValues() []string { + return []string{ + "OPENED", + "CLOSED", + "MERGED", + "REOPENED", + } +} + +// GetMappingPullRequestLifecycleActivitySummaryStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestLifecycleActivitySummaryStateEnum(val string) (PullRequestLifecycleActivitySummaryStateEnum, bool) { + enum, ok := mappingPullRequestLifecycleActivitySummaryStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/pull_request_notification_preference.go b/devops/pull_request_notification_preference.go new file mode 100644 index 0000000000..19ab6efae1 --- /dev/null +++ b/devops/pull_request_notification_preference.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestNotificationPreference The notification preference of the pull request. +type PullRequestNotificationPreference struct { + + // The ocid of pull request resource + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // The ocid of user. + UserId *string `mandatory:"true" json:"userId"` + + // The override value of pull request notification preference. + NotificationPreference PullRequestNotificationPreferenceNotificationPreferenceEnum `mandatory:"true" json:"notificationPreference"` +} + +func (m PullRequestNotificationPreference) 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 PullRequestNotificationPreference) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestNotificationPreferenceNotificationPreferenceEnum(string(m.NotificationPreference)); !ok && m.NotificationPreference != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NotificationPreference: %s. Supported values are: %s.", m.NotificationPreference, strings.Join(GetPullRequestNotificationPreferenceNotificationPreferenceEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PullRequestNotificationPreferenceNotificationPreferenceEnum Enum with underlying type: string +type PullRequestNotificationPreferenceNotificationPreferenceEnum string + +// Set of constants representing the allowable values for PullRequestNotificationPreferenceNotificationPreferenceEnum +const ( + PullRequestNotificationPreferenceNotificationPreferenceWatch PullRequestNotificationPreferenceNotificationPreferenceEnum = "WATCH" + PullRequestNotificationPreferenceNotificationPreferenceIgnore PullRequestNotificationPreferenceNotificationPreferenceEnum = "IGNORE" + PullRequestNotificationPreferenceNotificationPreferenceMention PullRequestNotificationPreferenceNotificationPreferenceEnum = "MENTION" +) + +var mappingPullRequestNotificationPreferenceNotificationPreferenceEnum = map[string]PullRequestNotificationPreferenceNotificationPreferenceEnum{ + "WATCH": PullRequestNotificationPreferenceNotificationPreferenceWatch, + "IGNORE": PullRequestNotificationPreferenceNotificationPreferenceIgnore, + "MENTION": PullRequestNotificationPreferenceNotificationPreferenceMention, +} + +var mappingPullRequestNotificationPreferenceNotificationPreferenceEnumLowerCase = map[string]PullRequestNotificationPreferenceNotificationPreferenceEnum{ + "watch": PullRequestNotificationPreferenceNotificationPreferenceWatch, + "ignore": PullRequestNotificationPreferenceNotificationPreferenceIgnore, + "mention": PullRequestNotificationPreferenceNotificationPreferenceMention, +} + +// GetPullRequestNotificationPreferenceNotificationPreferenceEnumValues Enumerates the set of values for PullRequestNotificationPreferenceNotificationPreferenceEnum +func GetPullRequestNotificationPreferenceNotificationPreferenceEnumValues() []PullRequestNotificationPreferenceNotificationPreferenceEnum { + values := make([]PullRequestNotificationPreferenceNotificationPreferenceEnum, 0) + for _, v := range mappingPullRequestNotificationPreferenceNotificationPreferenceEnum { + values = append(values, v) + } + return values +} + +// GetPullRequestNotificationPreferenceNotificationPreferenceEnumStringValues Enumerates the set of values in String for PullRequestNotificationPreferenceNotificationPreferenceEnum +func GetPullRequestNotificationPreferenceNotificationPreferenceEnumStringValues() []string { + return []string{ + "WATCH", + "IGNORE", + "MENTION", + } +} + +// GetMappingPullRequestNotificationPreferenceNotificationPreferenceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPullRequestNotificationPreferenceNotificationPreferenceEnum(val string) (PullRequestNotificationPreferenceNotificationPreferenceEnum, bool) { + enum, ok := mappingPullRequestNotificationPreferenceNotificationPreferenceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/pull_request_summary.go b/devops/pull_request_summary.go new file mode 100644 index 0000000000..675aa8f942 --- /dev/null +++ b/devops/pull_request_summary.go @@ -0,0 +1,101 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PullRequestSummary Summary of the Pull Request. +type PullRequestSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Pull Request title, can be renamed + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment Identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // DevOps Repository Identifier + RepositoryId *string `mandatory:"true" json:"repositoryId"` + + // The review branch which contains the changes to be reviewed. + SourceBranch *string `mandatory:"true" json:"sourceBranch"` + + // The destination branch against which the changes are to be reviewed. + DestinationBranch *string `mandatory:"true" json:"destinationBranch"` + + // The time the the Pull Request was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Pull Request. + LifecycleState PullRequestLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The status of the Pull Request. + LifecycleDetails PullRequestLifecycleDetailsEnum `mandatory:"true" json:"lifecycleDetails"` + + // The total number of comments on the pull request. + TotalComments *int `mandatory:"true" json:"totalComments"` + + // The total number of reviewers on the pull request. + TotalReviewers *int `mandatory:"true" json:"totalReviewers"` + + CreatedBy *PrincipalDetails `mandatory:"true" json:"createdBy"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` + + // Details of the pull request. Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + SourceRepositoryId *string `mandatory:"false" json:"sourceRepositoryId"` + + // The source branch commit ID when the Pull Request status was last changed to merged or closed + SourceCommitIdAtTermination *string `mandatory:"false" json:"sourceCommitIdAtTermination"` + + // The merge base commit ID when the Pull Request status was last changed to merged or closed + MergeBaseCommitIdAtTermination *string `mandatory:"false" json:"mergeBaseCommitIdAtTermination"` + + // The time the Pull Request was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` +} + +func (m PullRequestSummary) 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 PullRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestLifecycleStateEnum(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(GetPullRequestLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPullRequestLifecycleDetailsEnum(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(GetPullRequestLifecycleDetailsEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/reopen_pull_request_request_response.go b/devops/reopen_pull_request_request_response.go new file mode 100644 index 0000000000..cabdfa438c --- /dev/null +++ b/devops/reopen_pull_request_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ReopenPullRequestRequest wrapper for the ReopenPullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ReopenPullRequest.go.html to see an example of how to use ReopenPullRequestRequest. +type ReopenPullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ReopenPullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ReopenPullRequestRequest) 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 ReopenPullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ReopenPullRequestRequest) 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 ReopenPullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReopenPullRequestResponse wrapper for the ReopenPullRequest operation +type ReopenPullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response ReopenPullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ReopenPullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/repository.go b/devops/repository.go index 9dc8d6cf8d..0755861bbd 100644 --- a/devops/repository.go +++ b/devops/repository.go @@ -33,6 +33,9 @@ type Repository struct { // Tenancy unique namespace. Namespace *string `mandatory:"false" json:"namespace"` + // The OCID of the parent repository. + ParentRepositoryId *string `mandatory:"false" json:"parentRepositoryId"` + // Unique project name in a namespace. ProjectName *string `mandatory:"false" json:"projectName"` @@ -51,6 +54,7 @@ type Repository struct { // Type of repository: // MIRRORED - Repository created by mirroring an existing repository. // HOSTED - Repository created and hosted using OCI DevOps code repository. + // FORKED - Repository created by forking an existing repository. RepositoryType RepositoryRepositoryTypeEnum `mandatory:"false" json:"repositoryType,omitempty"` MirrorRepositoryConfig *MirrorRepositoryConfig `mandatory:"false" json:"mirrorRepositoryConfig"` @@ -128,16 +132,19 @@ type RepositoryRepositoryTypeEnum string const ( RepositoryRepositoryTypeMirrored RepositoryRepositoryTypeEnum = "MIRRORED" RepositoryRepositoryTypeHosted RepositoryRepositoryTypeEnum = "HOSTED" + RepositoryRepositoryTypeForked RepositoryRepositoryTypeEnum = "FORKED" ) var mappingRepositoryRepositoryTypeEnum = map[string]RepositoryRepositoryTypeEnum{ "MIRRORED": RepositoryRepositoryTypeMirrored, "HOSTED": RepositoryRepositoryTypeHosted, + "FORKED": RepositoryRepositoryTypeForked, } var mappingRepositoryRepositoryTypeEnumLowerCase = map[string]RepositoryRepositoryTypeEnum{ "mirrored": RepositoryRepositoryTypeMirrored, "hosted": RepositoryRepositoryTypeHosted, + "forked": RepositoryRepositoryTypeForked, } // GetRepositoryRepositoryTypeEnumValues Enumerates the set of values for RepositoryRepositoryTypeEnum @@ -154,6 +161,7 @@ func GetRepositoryRepositoryTypeEnumStringValues() []string { return []string{ "MIRRORED", "HOSTED", + "FORKED", } } @@ -171,6 +179,7 @@ const ( RepositoryLifecycleStateActive RepositoryLifecycleStateEnum = "ACTIVE" RepositoryLifecycleStateCreating RepositoryLifecycleStateEnum = "CREATING" RepositoryLifecycleStateDeleted RepositoryLifecycleStateEnum = "DELETED" + RepositoryLifecycleStateFailed RepositoryLifecycleStateEnum = "FAILED" RepositoryLifecycleStateDeleting RepositoryLifecycleStateEnum = "DELETING" ) @@ -178,6 +187,7 @@ var mappingRepositoryLifecycleStateEnum = map[string]RepositoryLifecycleStateEnu "ACTIVE": RepositoryLifecycleStateActive, "CREATING": RepositoryLifecycleStateCreating, "DELETED": RepositoryLifecycleStateDeleted, + "FAILED": RepositoryLifecycleStateFailed, "DELETING": RepositoryLifecycleStateDeleting, } @@ -185,6 +195,7 @@ var mappingRepositoryLifecycleStateEnumLowerCase = map[string]RepositoryLifecycl "active": RepositoryLifecycleStateActive, "creating": RepositoryLifecycleStateCreating, "deleted": RepositoryLifecycleStateDeleted, + "failed": RepositoryLifecycleStateFailed, "deleting": RepositoryLifecycleStateDeleting, } @@ -203,6 +214,7 @@ func GetRepositoryLifecycleStateEnumStringValues() []string { "ACTIVE", "CREATING", "DELETED", + "FAILED", "DELETING", } } diff --git a/devops/repository_analytics_details.go b/devops/repository_analytics_details.go new file mode 100644 index 0000000000..c9fc133287 --- /dev/null +++ b/devops/repository_analytics_details.go @@ -0,0 +1,153 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RepositoryAnalyticsDetails Details of the user configured settings for viewing the metrics. +type RepositoryAnalyticsDetails struct { + + // The name of the metric to be filtered. + RepositoryMetrics []MetricNameEnum `mandatory:"true" json:"repositoryMetrics"` + + // The beginning of the metric data query time range. + StartTime *common.SDKTime `mandatory:"true" json:"startTime"` + + // Email address of the author. + AuthorEmail *string `mandatory:"false" json:"authorEmail"` + + // Metrics aggregated for the defined period. + AggregationDuration RepositoryAnalyticsDetailsAggregationDurationEnum `mandatory:"false" json:"aggregationDuration,omitempty"` + + // The end of the metric data query time range. + EndTime *common.SDKTime `mandatory:"false" json:"endTime"` + + // Attribute by which metric data has to be grouped + GroupBy RepositoryAnalyticsDetailsGroupByEnum `mandatory:"false" json:"groupBy,omitempty"` +} + +func (m RepositoryAnalyticsDetails) 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 RepositoryAnalyticsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range m.RepositoryMetrics { + if _, ok := GetMappingMetricNameEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RepositoryMetrics: %s. Supported values are: %s.", val, strings.Join(GetMetricNameEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingRepositoryAnalyticsDetailsAggregationDurationEnum(string(m.AggregationDuration)); !ok && m.AggregationDuration != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AggregationDuration: %s. Supported values are: %s.", m.AggregationDuration, strings.Join(GetRepositoryAnalyticsDetailsAggregationDurationEnumStringValues(), ","))) + } + if _, ok := GetMappingRepositoryAnalyticsDetailsGroupByEnum(string(m.GroupBy)); !ok && m.GroupBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for GroupBy: %s. Supported values are: %s.", m.GroupBy, strings.Join(GetRepositoryAnalyticsDetailsGroupByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RepositoryAnalyticsDetailsAggregationDurationEnum Enum with underlying type: string +type RepositoryAnalyticsDetailsAggregationDurationEnum string + +// Set of constants representing the allowable values for RepositoryAnalyticsDetailsAggregationDurationEnum +const ( + RepositoryAnalyticsDetailsAggregationDurationDaily RepositoryAnalyticsDetailsAggregationDurationEnum = "DAILY" + RepositoryAnalyticsDetailsAggregationDurationWeekly RepositoryAnalyticsDetailsAggregationDurationEnum = "WEEKLY" + RepositoryAnalyticsDetailsAggregationDurationMonthly RepositoryAnalyticsDetailsAggregationDurationEnum = "MONTHLY" + RepositoryAnalyticsDetailsAggregationDurationYearly RepositoryAnalyticsDetailsAggregationDurationEnum = "YEARLY" +) + +var mappingRepositoryAnalyticsDetailsAggregationDurationEnum = map[string]RepositoryAnalyticsDetailsAggregationDurationEnum{ + "DAILY": RepositoryAnalyticsDetailsAggregationDurationDaily, + "WEEKLY": RepositoryAnalyticsDetailsAggregationDurationWeekly, + "MONTHLY": RepositoryAnalyticsDetailsAggregationDurationMonthly, + "YEARLY": RepositoryAnalyticsDetailsAggregationDurationYearly, +} + +var mappingRepositoryAnalyticsDetailsAggregationDurationEnumLowerCase = map[string]RepositoryAnalyticsDetailsAggregationDurationEnum{ + "daily": RepositoryAnalyticsDetailsAggregationDurationDaily, + "weekly": RepositoryAnalyticsDetailsAggregationDurationWeekly, + "monthly": RepositoryAnalyticsDetailsAggregationDurationMonthly, + "yearly": RepositoryAnalyticsDetailsAggregationDurationYearly, +} + +// GetRepositoryAnalyticsDetailsAggregationDurationEnumValues Enumerates the set of values for RepositoryAnalyticsDetailsAggregationDurationEnum +func GetRepositoryAnalyticsDetailsAggregationDurationEnumValues() []RepositoryAnalyticsDetailsAggregationDurationEnum { + values := make([]RepositoryAnalyticsDetailsAggregationDurationEnum, 0) + for _, v := range mappingRepositoryAnalyticsDetailsAggregationDurationEnum { + values = append(values, v) + } + return values +} + +// GetRepositoryAnalyticsDetailsAggregationDurationEnumStringValues Enumerates the set of values in String for RepositoryAnalyticsDetailsAggregationDurationEnum +func GetRepositoryAnalyticsDetailsAggregationDurationEnumStringValues() []string { + return []string{ + "DAILY", + "WEEKLY", + "MONTHLY", + "YEARLY", + } +} + +// GetMappingRepositoryAnalyticsDetailsAggregationDurationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRepositoryAnalyticsDetailsAggregationDurationEnum(val string) (RepositoryAnalyticsDetailsAggregationDurationEnum, bool) { + enum, ok := mappingRepositoryAnalyticsDetailsAggregationDurationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// RepositoryAnalyticsDetailsGroupByEnum Enum with underlying type: string +type RepositoryAnalyticsDetailsGroupByEnum string + +// Set of constants representing the allowable values for RepositoryAnalyticsDetailsGroupByEnum +const ( + RepositoryAnalyticsDetailsGroupByAuthor RepositoryAnalyticsDetailsGroupByEnum = "AUTHOR" +) + +var mappingRepositoryAnalyticsDetailsGroupByEnum = map[string]RepositoryAnalyticsDetailsGroupByEnum{ + "AUTHOR": RepositoryAnalyticsDetailsGroupByAuthor, +} + +var mappingRepositoryAnalyticsDetailsGroupByEnumLowerCase = map[string]RepositoryAnalyticsDetailsGroupByEnum{ + "author": RepositoryAnalyticsDetailsGroupByAuthor, +} + +// GetRepositoryAnalyticsDetailsGroupByEnumValues Enumerates the set of values for RepositoryAnalyticsDetailsGroupByEnum +func GetRepositoryAnalyticsDetailsGroupByEnumValues() []RepositoryAnalyticsDetailsGroupByEnum { + values := make([]RepositoryAnalyticsDetailsGroupByEnum, 0) + for _, v := range mappingRepositoryAnalyticsDetailsGroupByEnum { + values = append(values, v) + } + return values +} + +// GetRepositoryAnalyticsDetailsGroupByEnumStringValues Enumerates the set of values in String for RepositoryAnalyticsDetailsGroupByEnum +func GetRepositoryAnalyticsDetailsGroupByEnumStringValues() []string { + return []string{ + "AUTHOR", + } +} + +// GetMappingRepositoryAnalyticsDetailsGroupByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRepositoryAnalyticsDetailsGroupByEnum(val string) (RepositoryAnalyticsDetailsGroupByEnum, bool) { + enum, ok := mappingRepositoryAnalyticsDetailsGroupByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/repository_metric_aggregation.go b/devops/repository_metric_aggregation.go new file mode 100644 index 0000000000..d7bea2ec3a --- /dev/null +++ b/devops/repository_metric_aggregation.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RepositoryMetricAggregation The set of aggregated data returned for repository analytics. +type RepositoryMetricAggregation struct { + + // The metric data. + Items []RepositoryMetricSummary `mandatory:"true" json:"items"` +} + +func (m RepositoryMetricAggregation) 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 RepositoryMetricAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/repository_metric_summary.go b/devops/repository_metric_summary.go new file mode 100644 index 0000000000..47093c3f82 --- /dev/null +++ b/devops/repository_metric_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RepositoryMetricSummary The metrics details of a repository resource. +type RepositoryMetricSummary struct { + + // Type of metric + MetricName MetricNameEnum `mandatory:"false" json:"metricName,omitempty"` + + // The duration of the returned aggregated data in seconds. + DurationInSeconds *int64 `mandatory:"false" json:"durationInSeconds"` + + // The qualifiers provided in the definition of the returned metric. + Dimensions map[string]string `mandatory:"false" json:"dimensions"` + + // The start time associated with the value of the metric. + StartTimestampInEpochSeconds *int64 `mandatory:"false" json:"startTimestampInEpochSeconds"` + + // Represents the total number of the metric being calculated. + Count *float64 `mandatory:"false" json:"count"` + + // Represents the total duration in days calculated corresponding to the total no. of PRs. + // This is used only for "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS" and "PULL_REQUEST_REVIEW_DURATION_IN_DAYS" metrics. + Sum *float64 `mandatory:"false" json:"sum"` +} + +func (m RepositoryMetricSummary) 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 RepositoryMetricSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingMetricNameEnum(string(m.MetricName)); !ok && m.MetricName != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MetricName: %s. Supported values are: %s.", m.MetricName, strings.Join(GetMetricNameEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/repository_notification_preference.go b/devops/repository_notification_preference.go new file mode 100644 index 0000000000..d3c600bb87 --- /dev/null +++ b/devops/repository_notification_preference.go @@ -0,0 +1,98 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RepositoryNotificationPreference The notification preference of the repository. +type RepositoryNotificationPreference struct { + + // The ocid of repository resource + RepositoryId *string `mandatory:"true" json:"repositoryId"` + + // The ocid of user. + UserId *string `mandatory:"true" json:"userId"` + + // The override value of repository notification preference. + NotificationPreference RepositoryNotificationPreferenceNotificationPreferenceEnum `mandatory:"true" json:"notificationPreference"` +} + +func (m RepositoryNotificationPreference) 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 RepositoryNotificationPreference) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRepositoryNotificationPreferenceNotificationPreferenceEnum(string(m.NotificationPreference)); !ok && m.NotificationPreference != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NotificationPreference: %s. Supported values are: %s.", m.NotificationPreference, strings.Join(GetRepositoryNotificationPreferenceNotificationPreferenceEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RepositoryNotificationPreferenceNotificationPreferenceEnum Enum with underlying type: string +type RepositoryNotificationPreferenceNotificationPreferenceEnum string + +// Set of constants representing the allowable values for RepositoryNotificationPreferenceNotificationPreferenceEnum +const ( + RepositoryNotificationPreferenceNotificationPreferenceWatch RepositoryNotificationPreferenceNotificationPreferenceEnum = "WATCH" + RepositoryNotificationPreferenceNotificationPreferenceIgnore RepositoryNotificationPreferenceNotificationPreferenceEnum = "IGNORE" + RepositoryNotificationPreferenceNotificationPreferenceMention RepositoryNotificationPreferenceNotificationPreferenceEnum = "MENTION" + RepositoryNotificationPreferenceNotificationPreferenceInherited RepositoryNotificationPreferenceNotificationPreferenceEnum = "INHERITED" +) + +var mappingRepositoryNotificationPreferenceNotificationPreferenceEnum = map[string]RepositoryNotificationPreferenceNotificationPreferenceEnum{ + "WATCH": RepositoryNotificationPreferenceNotificationPreferenceWatch, + "IGNORE": RepositoryNotificationPreferenceNotificationPreferenceIgnore, + "MENTION": RepositoryNotificationPreferenceNotificationPreferenceMention, + "INHERITED": RepositoryNotificationPreferenceNotificationPreferenceInherited, +} + +var mappingRepositoryNotificationPreferenceNotificationPreferenceEnumLowerCase = map[string]RepositoryNotificationPreferenceNotificationPreferenceEnum{ + "watch": RepositoryNotificationPreferenceNotificationPreferenceWatch, + "ignore": RepositoryNotificationPreferenceNotificationPreferenceIgnore, + "mention": RepositoryNotificationPreferenceNotificationPreferenceMention, + "inherited": RepositoryNotificationPreferenceNotificationPreferenceInherited, +} + +// GetRepositoryNotificationPreferenceNotificationPreferenceEnumValues Enumerates the set of values for RepositoryNotificationPreferenceNotificationPreferenceEnum +func GetRepositoryNotificationPreferenceNotificationPreferenceEnumValues() []RepositoryNotificationPreferenceNotificationPreferenceEnum { + values := make([]RepositoryNotificationPreferenceNotificationPreferenceEnum, 0) + for _, v := range mappingRepositoryNotificationPreferenceNotificationPreferenceEnum { + values = append(values, v) + } + return values +} + +// GetRepositoryNotificationPreferenceNotificationPreferenceEnumStringValues Enumerates the set of values in String for RepositoryNotificationPreferenceNotificationPreferenceEnum +func GetRepositoryNotificationPreferenceNotificationPreferenceEnumStringValues() []string { + return []string{ + "WATCH", + "IGNORE", + "MENTION", + "INHERITED", + } +} + +// GetMappingRepositoryNotificationPreferenceNotificationPreferenceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRepositoryNotificationPreferenceNotificationPreferenceEnum(val string) (RepositoryNotificationPreferenceNotificationPreferenceEnum, bool) { + enum, ok := mappingRepositoryNotificationPreferenceNotificationPreferenceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/repository_settings.go b/devops/repository_settings.go new file mode 100644 index 0000000000..5d5d21a5d5 --- /dev/null +++ b/devops/repository_settings.go @@ -0,0 +1,41 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RepositorySettings User configured settings for repository resources +type RepositorySettings struct { + MergeChecks *MergeChecks `mandatory:"true" json:"mergeChecks"` + + MergeSettings *MergeSettings `mandatory:"true" json:"mergeSettings"` + + ApprovalRules *ApprovalRuleCollection `mandatory:"true" json:"approvalRules"` +} + +func (m RepositorySettings) 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 RepositorySettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/repository_summary.go b/devops/repository_summary.go index 27a73a3fec..1278f3c359 100644 --- a/devops/repository_summary.go +++ b/devops/repository_summary.go @@ -30,6 +30,9 @@ type RepositorySummary struct { // Name of the repository. Should be unique within the project. This value is mutable. Name *string `mandatory:"false" json:"name"` + // The OCID of the parent repository. + ParentRepositoryId *string `mandatory:"false" json:"parentRepositoryId"` + // Tenancy unique namespace. Namespace *string `mandatory:"false" json:"namespace"` @@ -45,6 +48,7 @@ type RepositorySummary struct { // Type of repository. Allowed values: // `MIRRORED` // `HOSTED` + // `FORKED` RepositoryType RepositoryRepositoryTypeEnum `mandatory:"false" json:"repositoryType,omitempty"` // SSH URL that you use to git clone, pull and push. diff --git a/devops/review_pull_request_details.go b/devops/review_pull_request_details.go new file mode 100644 index 0000000000..fe73143a4d --- /dev/null +++ b/devops/review_pull_request_details.go @@ -0,0 +1,84 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReviewPullRequestDetails Details to submit pull request review +type ReviewPullRequestDetails struct { + + // The review action taken + Action ReviewPullRequestDetailsActionEnum `mandatory:"true" json:"action"` +} + +func (m ReviewPullRequestDetails) 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 ReviewPullRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingReviewPullRequestDetailsActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetReviewPullRequestDetailsActionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReviewPullRequestDetailsActionEnum Enum with underlying type: string +type ReviewPullRequestDetailsActionEnum string + +// Set of constants representing the allowable values for ReviewPullRequestDetailsActionEnum +const ( + ReviewPullRequestDetailsActionApprove ReviewPullRequestDetailsActionEnum = "APPROVE" + ReviewPullRequestDetailsActionUnapprove ReviewPullRequestDetailsActionEnum = "UNAPPROVE" +) + +var mappingReviewPullRequestDetailsActionEnum = map[string]ReviewPullRequestDetailsActionEnum{ + "APPROVE": ReviewPullRequestDetailsActionApprove, + "UNAPPROVE": ReviewPullRequestDetailsActionUnapprove, +} + +var mappingReviewPullRequestDetailsActionEnumLowerCase = map[string]ReviewPullRequestDetailsActionEnum{ + "approve": ReviewPullRequestDetailsActionApprove, + "unapprove": ReviewPullRequestDetailsActionUnapprove, +} + +// GetReviewPullRequestDetailsActionEnumValues Enumerates the set of values for ReviewPullRequestDetailsActionEnum +func GetReviewPullRequestDetailsActionEnumValues() []ReviewPullRequestDetailsActionEnum { + values := make([]ReviewPullRequestDetailsActionEnum, 0) + for _, v := range mappingReviewPullRequestDetailsActionEnum { + values = append(values, v) + } + return values +} + +// GetReviewPullRequestDetailsActionEnumStringValues Enumerates the set of values in String for ReviewPullRequestDetailsActionEnum +func GetReviewPullRequestDetailsActionEnumStringValues() []string { + return []string{ + "APPROVE", + "UNAPPROVE", + } +} + +// GetMappingReviewPullRequestDetailsActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReviewPullRequestDetailsActionEnum(val string) (ReviewPullRequestDetailsActionEnum, bool) { + enum, ok := mappingReviewPullRequestDetailsActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/review_pull_request_request_response.go b/devops/review_pull_request_request_response.go new file mode 100644 index 0000000000..8e105e4310 --- /dev/null +++ b/devops/review_pull_request_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ReviewPullRequestRequest wrapper for the ReviewPullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ReviewPullRequest.go.html to see an example of how to use ReviewPullRequestRequest. +type ReviewPullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Details to submit a review. + ReviewPullRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ReviewPullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ReviewPullRequestRequest) 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 ReviewPullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ReviewPullRequestRequest) 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 ReviewPullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReviewPullRequestResponse wrapper for the ReviewPullRequest operation +type ReviewPullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response ReviewPullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ReviewPullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/reviewer.go b/devops/reviewer.go new file mode 100644 index 0000000000..91ea495027 --- /dev/null +++ b/devops/reviewer.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Reviewer Reviewer information. +type Reviewer struct { + + // Pull Request reviewer id + PrincipalId *string `mandatory:"true" json:"principalId"` + + // the name of the principal + PrincipalName *string `mandatory:"false" json:"principalName"` + + // the type of principal + PrincipalType ReviewerPrincipalTypeEnum `mandatory:"false" json:"principalType,omitempty"` + + // The state of the principal, it can be active or inactive or suppressed for emails + PrincipalState ReviewerPrincipalStateEnum `mandatory:"false" json:"principalState,omitempty"` + + // The current state of the Review. + Status ReviewerStatusEnum `mandatory:"false" json:"status,omitempty"` +} + +func (m Reviewer) 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 Reviewer) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingReviewerPrincipalTypeEnum(string(m.PrincipalType)); !ok && m.PrincipalType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PrincipalType: %s. Supported values are: %s.", m.PrincipalType, strings.Join(GetReviewerPrincipalTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingReviewerPrincipalStateEnum(string(m.PrincipalState)); !ok && m.PrincipalState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PrincipalState: %s. Supported values are: %s.", m.PrincipalState, strings.Join(GetReviewerPrincipalStateEnumStringValues(), ","))) + } + if _, ok := GetMappingReviewerStatusEnum(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(GetReviewerStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReviewerPrincipalTypeEnum Enum with underlying type: string +type ReviewerPrincipalTypeEnum string + +// Set of constants representing the allowable values for ReviewerPrincipalTypeEnum +const ( + ReviewerPrincipalTypeService ReviewerPrincipalTypeEnum = "SERVICE" + ReviewerPrincipalTypeUser ReviewerPrincipalTypeEnum = "USER" + ReviewerPrincipalTypeInstance ReviewerPrincipalTypeEnum = "INSTANCE" + ReviewerPrincipalTypeResource ReviewerPrincipalTypeEnum = "RESOURCE" +) + +var mappingReviewerPrincipalTypeEnum = map[string]ReviewerPrincipalTypeEnum{ + "SERVICE": ReviewerPrincipalTypeService, + "USER": ReviewerPrincipalTypeUser, + "INSTANCE": ReviewerPrincipalTypeInstance, + "RESOURCE": ReviewerPrincipalTypeResource, +} + +var mappingReviewerPrincipalTypeEnumLowerCase = map[string]ReviewerPrincipalTypeEnum{ + "service": ReviewerPrincipalTypeService, + "user": ReviewerPrincipalTypeUser, + "instance": ReviewerPrincipalTypeInstance, + "resource": ReviewerPrincipalTypeResource, +} + +// GetReviewerPrincipalTypeEnumValues Enumerates the set of values for ReviewerPrincipalTypeEnum +func GetReviewerPrincipalTypeEnumValues() []ReviewerPrincipalTypeEnum { + values := make([]ReviewerPrincipalTypeEnum, 0) + for _, v := range mappingReviewerPrincipalTypeEnum { + values = append(values, v) + } + return values +} + +// GetReviewerPrincipalTypeEnumStringValues Enumerates the set of values in String for ReviewerPrincipalTypeEnum +func GetReviewerPrincipalTypeEnumStringValues() []string { + return []string{ + "SERVICE", + "USER", + "INSTANCE", + "RESOURCE", + } +} + +// GetMappingReviewerPrincipalTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReviewerPrincipalTypeEnum(val string) (ReviewerPrincipalTypeEnum, bool) { + enum, ok := mappingReviewerPrincipalTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ReviewerPrincipalStateEnum Enum with underlying type: string +type ReviewerPrincipalStateEnum string + +// Set of constants representing the allowable values for ReviewerPrincipalStateEnum +const ( + ReviewerPrincipalStateActive ReviewerPrincipalStateEnum = "ACTIVE" + ReviewerPrincipalStateInactive ReviewerPrincipalStateEnum = "INACTIVE" + ReviewerPrincipalStateSuppressed ReviewerPrincipalStateEnum = "SUPPRESSED" +) + +var mappingReviewerPrincipalStateEnum = map[string]ReviewerPrincipalStateEnum{ + "ACTIVE": ReviewerPrincipalStateActive, + "INACTIVE": ReviewerPrincipalStateInactive, + "SUPPRESSED": ReviewerPrincipalStateSuppressed, +} + +var mappingReviewerPrincipalStateEnumLowerCase = map[string]ReviewerPrincipalStateEnum{ + "active": ReviewerPrincipalStateActive, + "inactive": ReviewerPrincipalStateInactive, + "suppressed": ReviewerPrincipalStateSuppressed, +} + +// GetReviewerPrincipalStateEnumValues Enumerates the set of values for ReviewerPrincipalStateEnum +func GetReviewerPrincipalStateEnumValues() []ReviewerPrincipalStateEnum { + values := make([]ReviewerPrincipalStateEnum, 0) + for _, v := range mappingReviewerPrincipalStateEnum { + values = append(values, v) + } + return values +} + +// GetReviewerPrincipalStateEnumStringValues Enumerates the set of values in String for ReviewerPrincipalStateEnum +func GetReviewerPrincipalStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "SUPPRESSED", + } +} + +// GetMappingReviewerPrincipalStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReviewerPrincipalStateEnum(val string) (ReviewerPrincipalStateEnum, bool) { + enum, ok := mappingReviewerPrincipalStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ReviewerStatusEnum Enum with underlying type: string +type ReviewerStatusEnum string + +// Set of constants representing the allowable values for ReviewerStatusEnum +const ( + ReviewerStatusApproved ReviewerStatusEnum = "APPROVED" + ReviewerStatusReviewPending ReviewerStatusEnum = "REVIEW_PENDING" +) + +var mappingReviewerStatusEnum = map[string]ReviewerStatusEnum{ + "APPROVED": ReviewerStatusApproved, + "REVIEW_PENDING": ReviewerStatusReviewPending, +} + +var mappingReviewerStatusEnumLowerCase = map[string]ReviewerStatusEnum{ + "approved": ReviewerStatusApproved, + "review_pending": ReviewerStatusReviewPending, +} + +// GetReviewerStatusEnumValues Enumerates the set of values for ReviewerStatusEnum +func GetReviewerStatusEnumValues() []ReviewerStatusEnum { + values := make([]ReviewerStatusEnum, 0) + for _, v := range mappingReviewerStatusEnum { + values = append(values, v) + } + return values +} + +// GetReviewerStatusEnumStringValues Enumerates the set of values in String for ReviewerStatusEnum +func GetReviewerStatusEnumStringValues() []string { + return []string{ + "APPROVED", + "REVIEW_PENDING", + } +} + +// GetMappingReviewerStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReviewerStatusEnum(val string) (ReviewerStatusEnum, bool) { + enum, ok := mappingReviewerStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/reviewer_activity_summary.go b/devops/reviewer_activity_summary.go new file mode 100644 index 0000000000..3187988e74 --- /dev/null +++ b/devops/reviewer_activity_summary.go @@ -0,0 +1,88 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReviewerActivitySummary activity describing reviewer updates to a pull request +type ReviewerActivitySummary struct { + + // activity identifier + Id *string `mandatory:"true" json:"id"` + + Principal *PrincipalDetails `mandatory:"true" json:"principal"` + + // pullRequest OCID + PullRequestId *string `mandatory:"true" json:"pullRequestId"` + + // The time the action was performed. An RFC3339 formatted datetime string + TimeOccurred *common.SDKTime `mandatory:"true" json:"timeOccurred"` + + // list of reviewers added to a pull request + ReviewersAdded []PrincipalDetails `mandatory:"true" json:"reviewersAdded"` + + // list of reviewers removed from a pull request + ReviewersRemoved []PrincipalDetails `mandatory:"true" json:"reviewersRemoved"` +} + +// GetId returns Id +func (m ReviewerActivitySummary) GetId() *string { + return m.Id +} + +// GetPrincipal returns Principal +func (m ReviewerActivitySummary) GetPrincipal() *PrincipalDetails { + return m.Principal +} + +// GetPullRequestId returns PullRequestId +func (m ReviewerActivitySummary) GetPullRequestId() *string { + return m.PullRequestId +} + +// GetTimeOccurred returns TimeOccurred +func (m ReviewerActivitySummary) GetTimeOccurred() *common.SDKTime { + return m.TimeOccurred +} + +func (m ReviewerActivitySummary) 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 ReviewerActivitySummary) 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 ReviewerActivitySummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeReviewerActivitySummary ReviewerActivitySummary + s := struct { + DiscriminatorParam string `json:"activityType"` + MarshalTypeReviewerActivitySummary + }{ + "REVIEWER", + (MarshalTypeReviewerActivitySummary)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/stage_output.go b/devops/stage_output.go new file mode 100644 index 0000000000..6f19aa308f --- /dev/null +++ b/devops/stage_output.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StageOutput Details of the generated artifact or report. +type StageOutput interface { + + // Name of stage step at which this output is generated. + GetStepName() *string +} + +type stageoutput struct { + JsonData []byte + StepName *string `mandatory:"true" json:"stepName"` + OutputType string `json:"outputType"` +} + +// UnmarshalJSON unmarshals json +func (m *stageoutput) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerstageoutput stageoutput + s := struct { + Model Unmarshalerstageoutput + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.StepName = s.Model.StepName + m.OutputType = s.Model.OutputType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *stageoutput) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.OutputType { + case "TEST_REPORT": + mm := TestReportOutput{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ARTIFACT": + mm := GenericArtifacts{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for StageOutput: %s.", m.OutputType) + return *m, nil + } +} + +// GetStepName returns StepName +func (m stageoutput) GetStepName() *string { + return m.StepName +} + +func (m stageoutput) 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 stageoutput) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StageOutputOutputTypeEnum Enum with underlying type: string +type StageOutputOutputTypeEnum string + +// Set of constants representing the allowable values for StageOutputOutputTypeEnum +const ( + StageOutputOutputTypeArtifact StageOutputOutputTypeEnum = "ARTIFACT" + StageOutputOutputTypeTestReport StageOutputOutputTypeEnum = "TEST_REPORT" +) + +var mappingStageOutputOutputTypeEnum = map[string]StageOutputOutputTypeEnum{ + "ARTIFACT": StageOutputOutputTypeArtifact, + "TEST_REPORT": StageOutputOutputTypeTestReport, +} + +var mappingStageOutputOutputTypeEnumLowerCase = map[string]StageOutputOutputTypeEnum{ + "artifact": StageOutputOutputTypeArtifact, + "test_report": StageOutputOutputTypeTestReport, +} + +// GetStageOutputOutputTypeEnumValues Enumerates the set of values for StageOutputOutputTypeEnum +func GetStageOutputOutputTypeEnumValues() []StageOutputOutputTypeEnum { + values := make([]StageOutputOutputTypeEnum, 0) + for _, v := range mappingStageOutputOutputTypeEnum { + values = append(values, v) + } + return values +} + +// GetStageOutputOutputTypeEnumStringValues Enumerates the set of values in String for StageOutputOutputTypeEnum +func GetStageOutputOutputTypeEnumStringValues() []string { + return []string{ + "ARTIFACT", + "TEST_REPORT", + } +} + +// GetMappingStageOutputOutputTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStageOutputOutputTypeEnum(val string) (StageOutputOutputTypeEnum, bool) { + enum, ok := mappingStageOutputOutputTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/summarize_project_repository_analytics_details.go b/devops/summarize_project_repository_analytics_details.go new file mode 100644 index 0000000000..a54d286214 --- /dev/null +++ b/devops/summarize_project_repository_analytics_details.go @@ -0,0 +1,153 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SummarizeProjectRepositoryAnalyticsDetails Details of the user configured settings for viewing the metrics at project level. +type SummarizeProjectRepositoryAnalyticsDetails struct { + + // The name of the metric to be filtered. + RepositoryMetrics []MetricNameEnum `mandatory:"true" json:"repositoryMetrics"` + + // The beginning of the metric data query time range. + StartTime *common.SDKTime `mandatory:"true" json:"startTime"` + + // Email address of the author. + AuthorEmail *string `mandatory:"false" json:"authorEmail"` + + // Metrics aggregated for the defined period. + AggregationDuration SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum `mandatory:"false" json:"aggregationDuration,omitempty"` + + // The end of the metric data query time range. + EndTime *common.SDKTime `mandatory:"false" json:"endTime"` + + // Attribute by which metric data has to be grouped + GroupBy SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum `mandatory:"false" json:"groupBy,omitempty"` +} + +func (m SummarizeProjectRepositoryAnalyticsDetails) 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 SummarizeProjectRepositoryAnalyticsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range m.RepositoryMetrics { + if _, ok := GetMappingMetricNameEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RepositoryMetrics: %s. Supported values are: %s.", val, strings.Join(GetMetricNameEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum(string(m.AggregationDuration)); !ok && m.AggregationDuration != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AggregationDuration: %s. Supported values are: %s.", m.AggregationDuration, strings.Join(GetSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeProjectRepositoryAnalyticsDetailsGroupByEnum(string(m.GroupBy)); !ok && m.GroupBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for GroupBy: %s. Supported values are: %s.", m.GroupBy, strings.Join(GetSummarizeProjectRepositoryAnalyticsDetailsGroupByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum Enum with underlying type: string +type SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum string + +// Set of constants representing the allowable values for SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum +const ( + SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationDaily SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum = "DAILY" + SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationWeekly SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum = "WEEKLY" + SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationMonthly SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum = "MONTHLY" + SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationYearly SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum = "YEARLY" +) + +var mappingSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum = map[string]SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum{ + "DAILY": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationDaily, + "WEEKLY": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationWeekly, + "MONTHLY": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationMonthly, + "YEARLY": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationYearly, +} + +var mappingSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnumLowerCase = map[string]SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum{ + "daily": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationDaily, + "weekly": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationWeekly, + "monthly": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationMonthly, + "yearly": SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationYearly, +} + +// GetSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnumValues Enumerates the set of values for SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum +func GetSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnumValues() []SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum { + values := make([]SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum, 0) + for _, v := range mappingSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnumStringValues Enumerates the set of values in String for SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum +func GetSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnumStringValues() []string { + return []string{ + "DAILY", + "WEEKLY", + "MONTHLY", + "YEARLY", + } +} + +// GetMappingSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum(val string) (SummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnum, bool) { + enum, ok := mappingSummarizeProjectRepositoryAnalyticsDetailsAggregationDurationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum Enum with underlying type: string +type SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum string + +// Set of constants representing the allowable values for SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum +const ( + SummarizeProjectRepositoryAnalyticsDetailsGroupByAuthor SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum = "AUTHOR" +) + +var mappingSummarizeProjectRepositoryAnalyticsDetailsGroupByEnum = map[string]SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum{ + "AUTHOR": SummarizeProjectRepositoryAnalyticsDetailsGroupByAuthor, +} + +var mappingSummarizeProjectRepositoryAnalyticsDetailsGroupByEnumLowerCase = map[string]SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum{ + "author": SummarizeProjectRepositoryAnalyticsDetailsGroupByAuthor, +} + +// GetSummarizeProjectRepositoryAnalyticsDetailsGroupByEnumValues Enumerates the set of values for SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum +func GetSummarizeProjectRepositoryAnalyticsDetailsGroupByEnumValues() []SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum { + values := make([]SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum, 0) + for _, v := range mappingSummarizeProjectRepositoryAnalyticsDetailsGroupByEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeProjectRepositoryAnalyticsDetailsGroupByEnumStringValues Enumerates the set of values in String for SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum +func GetSummarizeProjectRepositoryAnalyticsDetailsGroupByEnumStringValues() []string { + return []string{ + "AUTHOR", + } +} + +// GetMappingSummarizeProjectRepositoryAnalyticsDetailsGroupByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeProjectRepositoryAnalyticsDetailsGroupByEnum(val string) (SummarizeProjectRepositoryAnalyticsDetailsGroupByEnum, bool) { + enum, ok := mappingSummarizeProjectRepositoryAnalyticsDetailsGroupByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/summarize_project_repository_analytics_request_response.go b/devops/summarize_project_repository_analytics_request_response.go new file mode 100644 index 0000000000..faff6a8222 --- /dev/null +++ b/devops/summarize_project_repository_analytics_request_response.go @@ -0,0 +1,101 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeProjectRepositoryAnalyticsRequest wrapper for the SummarizeProjectRepositoryAnalytics operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/SummarizeProjectRepositoryAnalytics.go.html to see an example of how to use SummarizeProjectRepositoryAnalyticsRequest. +type SummarizeProjectRepositoryAnalyticsRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // Details to fetch the repository analytics. + SummarizeProjectRepositoryAnalyticsDetails `contributesTo:"body"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SummarizeProjectRepositoryAnalyticsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeProjectRepositoryAnalyticsRequest) 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 SummarizeProjectRepositoryAnalyticsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeProjectRepositoryAnalyticsRequest) 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 SummarizeProjectRepositoryAnalyticsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeProjectRepositoryAnalyticsResponse wrapper for the SummarizeProjectRepositoryAnalytics operation +type SummarizeProjectRepositoryAnalyticsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RepositoryMetricAggregation instances + RepositoryMetricAggregation `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 SummarizeProjectRepositoryAnalyticsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeProjectRepositoryAnalyticsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/summarize_repository_analytics_details.go b/devops/summarize_repository_analytics_details.go new file mode 100644 index 0000000000..e4057196af --- /dev/null +++ b/devops/summarize_repository_analytics_details.go @@ -0,0 +1,153 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SummarizeRepositoryAnalyticsDetails Details of the user configured settings for viewing the metrics at repository level. +type SummarizeRepositoryAnalyticsDetails struct { + + // The name of the metric to be filtered. + RepositoryMetrics []MetricNameEnum `mandatory:"true" json:"repositoryMetrics"` + + // The beginning of the metric data query time range. + StartTime *common.SDKTime `mandatory:"true" json:"startTime"` + + // Email address of the author. + AuthorEmail *string `mandatory:"false" json:"authorEmail"` + + // Metrics aggregated for the defined period. + AggregationDuration SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum `mandatory:"false" json:"aggregationDuration,omitempty"` + + // The end of the metric data query time range. + EndTime *common.SDKTime `mandatory:"false" json:"endTime"` + + // Attribute by which metric data has to be grouped + GroupBy SummarizeRepositoryAnalyticsDetailsGroupByEnum `mandatory:"false" json:"groupBy,omitempty"` +} + +func (m SummarizeRepositoryAnalyticsDetails) 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 SummarizeRepositoryAnalyticsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range m.RepositoryMetrics { + if _, ok := GetMappingMetricNameEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RepositoryMetrics: %s. Supported values are: %s.", val, strings.Join(GetMetricNameEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSummarizeRepositoryAnalyticsDetailsAggregationDurationEnum(string(m.AggregationDuration)); !ok && m.AggregationDuration != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AggregationDuration: %s. Supported values are: %s.", m.AggregationDuration, strings.Join(GetSummarizeRepositoryAnalyticsDetailsAggregationDurationEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeRepositoryAnalyticsDetailsGroupByEnum(string(m.GroupBy)); !ok && m.GroupBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for GroupBy: %s. Supported values are: %s.", m.GroupBy, strings.Join(GetSummarizeRepositoryAnalyticsDetailsGroupByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum Enum with underlying type: string +type SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum string + +// Set of constants representing the allowable values for SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum +const ( + SummarizeRepositoryAnalyticsDetailsAggregationDurationDaily SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum = "DAILY" + SummarizeRepositoryAnalyticsDetailsAggregationDurationWeekly SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum = "WEEKLY" + SummarizeRepositoryAnalyticsDetailsAggregationDurationMonthly SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum = "MONTHLY" + SummarizeRepositoryAnalyticsDetailsAggregationDurationYearly SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum = "YEARLY" +) + +var mappingSummarizeRepositoryAnalyticsDetailsAggregationDurationEnum = map[string]SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum{ + "DAILY": SummarizeRepositoryAnalyticsDetailsAggregationDurationDaily, + "WEEKLY": SummarizeRepositoryAnalyticsDetailsAggregationDurationWeekly, + "MONTHLY": SummarizeRepositoryAnalyticsDetailsAggregationDurationMonthly, + "YEARLY": SummarizeRepositoryAnalyticsDetailsAggregationDurationYearly, +} + +var mappingSummarizeRepositoryAnalyticsDetailsAggregationDurationEnumLowerCase = map[string]SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum{ + "daily": SummarizeRepositoryAnalyticsDetailsAggregationDurationDaily, + "weekly": SummarizeRepositoryAnalyticsDetailsAggregationDurationWeekly, + "monthly": SummarizeRepositoryAnalyticsDetailsAggregationDurationMonthly, + "yearly": SummarizeRepositoryAnalyticsDetailsAggregationDurationYearly, +} + +// GetSummarizeRepositoryAnalyticsDetailsAggregationDurationEnumValues Enumerates the set of values for SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum +func GetSummarizeRepositoryAnalyticsDetailsAggregationDurationEnumValues() []SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum { + values := make([]SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum, 0) + for _, v := range mappingSummarizeRepositoryAnalyticsDetailsAggregationDurationEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeRepositoryAnalyticsDetailsAggregationDurationEnumStringValues Enumerates the set of values in String for SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum +func GetSummarizeRepositoryAnalyticsDetailsAggregationDurationEnumStringValues() []string { + return []string{ + "DAILY", + "WEEKLY", + "MONTHLY", + "YEARLY", + } +} + +// GetMappingSummarizeRepositoryAnalyticsDetailsAggregationDurationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeRepositoryAnalyticsDetailsAggregationDurationEnum(val string) (SummarizeRepositoryAnalyticsDetailsAggregationDurationEnum, bool) { + enum, ok := mappingSummarizeRepositoryAnalyticsDetailsAggregationDurationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeRepositoryAnalyticsDetailsGroupByEnum Enum with underlying type: string +type SummarizeRepositoryAnalyticsDetailsGroupByEnum string + +// Set of constants representing the allowable values for SummarizeRepositoryAnalyticsDetailsGroupByEnum +const ( + SummarizeRepositoryAnalyticsDetailsGroupByAuthor SummarizeRepositoryAnalyticsDetailsGroupByEnum = "AUTHOR" +) + +var mappingSummarizeRepositoryAnalyticsDetailsGroupByEnum = map[string]SummarizeRepositoryAnalyticsDetailsGroupByEnum{ + "AUTHOR": SummarizeRepositoryAnalyticsDetailsGroupByAuthor, +} + +var mappingSummarizeRepositoryAnalyticsDetailsGroupByEnumLowerCase = map[string]SummarizeRepositoryAnalyticsDetailsGroupByEnum{ + "author": SummarizeRepositoryAnalyticsDetailsGroupByAuthor, +} + +// GetSummarizeRepositoryAnalyticsDetailsGroupByEnumValues Enumerates the set of values for SummarizeRepositoryAnalyticsDetailsGroupByEnum +func GetSummarizeRepositoryAnalyticsDetailsGroupByEnumValues() []SummarizeRepositoryAnalyticsDetailsGroupByEnum { + values := make([]SummarizeRepositoryAnalyticsDetailsGroupByEnum, 0) + for _, v := range mappingSummarizeRepositoryAnalyticsDetailsGroupByEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeRepositoryAnalyticsDetailsGroupByEnumStringValues Enumerates the set of values in String for SummarizeRepositoryAnalyticsDetailsGroupByEnum +func GetSummarizeRepositoryAnalyticsDetailsGroupByEnumStringValues() []string { + return []string{ + "AUTHOR", + } +} + +// GetMappingSummarizeRepositoryAnalyticsDetailsGroupByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeRepositoryAnalyticsDetailsGroupByEnum(val string) (SummarizeRepositoryAnalyticsDetailsGroupByEnum, bool) { + enum, ok := mappingSummarizeRepositoryAnalyticsDetailsGroupByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/summarize_repository_analytics_request_response.go b/devops/summarize_repository_analytics_request_response.go new file mode 100644 index 0000000000..52073af904 --- /dev/null +++ b/devops/summarize_repository_analytics_request_response.go @@ -0,0 +1,101 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeRepositoryAnalyticsRequest wrapper for the SummarizeRepositoryAnalytics operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/SummarizeRepositoryAnalytics.go.html to see an example of how to use SummarizeRepositoryAnalyticsRequest. +type SummarizeRepositoryAnalyticsRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Details to fetch the repository analytics. + SummarizeRepositoryAnalyticsDetails `contributesTo:"body"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SummarizeRepositoryAnalyticsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeRepositoryAnalyticsRequest) 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 SummarizeRepositoryAnalyticsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeRepositoryAnalyticsRequest) 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 SummarizeRepositoryAnalyticsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeRepositoryAnalyticsResponse wrapper for the SummarizeRepositoryAnalytics operation +type SummarizeRepositoryAnalyticsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RepositoryMetricAggregation instances + RepositoryMetricAggregation `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 SummarizeRepositoryAnalyticsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeRepositoryAnalyticsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/sync_repository_details.go b/devops/sync_repository_details.go new file mode 100644 index 0000000000..3da8b53e90 --- /dev/null +++ b/devops/sync_repository_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SyncRepositoryDetails Details required for syncing a repository with its upstream. +type SyncRepositoryDetails struct { + + // The branch in the upstream repository we want to sync from. + SourceBranch *string `mandatory:"true" json:"sourceBranch"` + + // The branch in the repository we want to be updated with changes from the upstream. + DestinationBranch *string `mandatory:"true" json:"destinationBranch"` +} + +func (m SyncRepositoryDetails) 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 SyncRepositoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/sync_repository_request_response.go b/devops/sync_repository_request_response.go new file mode 100644 index 0000000000..33252f6101 --- /dev/null +++ b/devops/sync_repository_request_response.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. + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SyncRepositoryRequest wrapper for the SyncRepository operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/SyncRepository.go.html to see an example of how to use SyncRepositoryRequest. +type SyncRepositoryRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // If fetch and merge is passed in, the changes from the upstream will be fetched and merged into the destination branch. + // If discard is passed in, the changes in the fork will be overwritten with the changes brought in from the upstream. + SyncMergeStrategy SyncRepositorySyncMergeStrategyEnum `mandatory:"true" contributesTo:"query" name:"syncMergeStrategy" omitEmpty:"true"` + + // Details required for syncing a repository with its upstream. + SyncRepositoryDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier 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 SyncRepositoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SyncRepositoryRequest) 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 SyncRepositoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SyncRepositoryRequest) 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 SyncRepositoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSyncRepositorySyncMergeStrategyEnum(string(request.SyncMergeStrategy)); !ok && request.SyncMergeStrategy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SyncMergeStrategy: %s. Supported values are: %s.", request.SyncMergeStrategy, strings.Join(GetSyncRepositorySyncMergeStrategyEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SyncRepositoryResponse wrapper for the SyncRepository operation +type SyncRepositoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response SyncRepositoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SyncRepositoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SyncRepositorySyncMergeStrategyEnum Enum with underlying type: string +type SyncRepositorySyncMergeStrategyEnum string + +// Set of constants representing the allowable values for SyncRepositorySyncMergeStrategyEnum +const ( + SyncRepositorySyncMergeStrategyFetchAndMerge SyncRepositorySyncMergeStrategyEnum = "FETCH_AND_MERGE" + SyncRepositorySyncMergeStrategyDiscard SyncRepositorySyncMergeStrategyEnum = "DISCARD" +) + +var mappingSyncRepositorySyncMergeStrategyEnum = map[string]SyncRepositorySyncMergeStrategyEnum{ + "FETCH_AND_MERGE": SyncRepositorySyncMergeStrategyFetchAndMerge, + "DISCARD": SyncRepositorySyncMergeStrategyDiscard, +} + +var mappingSyncRepositorySyncMergeStrategyEnumLowerCase = map[string]SyncRepositorySyncMergeStrategyEnum{ + "fetch_and_merge": SyncRepositorySyncMergeStrategyFetchAndMerge, + "discard": SyncRepositorySyncMergeStrategyDiscard, +} + +// GetSyncRepositorySyncMergeStrategyEnumValues Enumerates the set of values for SyncRepositorySyncMergeStrategyEnum +func GetSyncRepositorySyncMergeStrategyEnumValues() []SyncRepositorySyncMergeStrategyEnum { + values := make([]SyncRepositorySyncMergeStrategyEnum, 0) + for _, v := range mappingSyncRepositorySyncMergeStrategyEnum { + values = append(values, v) + } + return values +} + +// GetSyncRepositorySyncMergeStrategyEnumStringValues Enumerates the set of values in String for SyncRepositorySyncMergeStrategyEnum +func GetSyncRepositorySyncMergeStrategyEnumStringValues() []string { + return []string{ + "FETCH_AND_MERGE", + "DISCARD", + } +} + +// GetMappingSyncRepositorySyncMergeStrategyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSyncRepositorySyncMergeStrategyEnum(val string) (SyncRepositorySyncMergeStrategyEnum, bool) { + enum, ok := mappingSyncRepositorySyncMergeStrategyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/devops/test_report_output.go b/devops/test_report_output.go new file mode 100644 index 0000000000..dd327e3a9d --- /dev/null +++ b/devops/test_report_output.go @@ -0,0 +1,62 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TestReportOutput Details of test report generated via pipeline run +type TestReportOutput struct { + + // Name of stage step at which this output is generated. + StepName *string `mandatory:"true" json:"stepName"` + + // The OCID of the test report. + Id *string `mandatory:"true" json:"id"` +} + +// GetStepName returns StepName +func (m TestReportOutput) GetStepName() *string { + return m.StepName +} + +func (m TestReportOutput) 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 TestReportOutput) 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 TestReportOutput) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTestReportOutput TestReportOutput + s := struct { + DiscriminatorParam string `json:"outputType"` + MarshalTypeTestReportOutput + }{ + "TEST_REPORT", + (MarshalTypeTestReportOutput)(m), + } + + return json.Marshal(&s) +} diff --git a/devops/unlike_pull_request_comment_request_response.go b/devops/unlike_pull_request_comment_request_response.go new file mode 100644 index 0000000000..4bfeacd9f2 --- /dev/null +++ b/devops/unlike_pull_request_comment_request_response.go @@ -0,0 +1,98 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UnlikePullRequestCommentRequest wrapper for the UnlikePullRequestComment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UnlikePullRequestComment.go.html to see an example of how to use UnlikePullRequestCommentRequest. +type UnlikePullRequestCommentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest Comment identifier + CommentId *string `mandatory:"true" contributesTo:"path" name:"commentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UnlikePullRequestCommentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UnlikePullRequestCommentRequest) 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 UnlikePullRequestCommentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UnlikePullRequestCommentRequest) 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 UnlikePullRequestCommentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnlikePullRequestCommentResponse wrapper for the UnlikePullRequestComment operation +type UnlikePullRequestCommentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestComment instance + PullRequestComment `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UnlikePullRequestCommentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UnlikePullRequestCommentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/unsubscribe_pull_request_request_response.go b/devops/unsubscribe_pull_request_request_response.go new file mode 100644 index 0000000000..82efade4a9 --- /dev/null +++ b/devops/unsubscribe_pull_request_request_response.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. + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// UnsubscribePullRequestRequest wrapper for the UnsubscribePullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UnsubscribePullRequest.go.html to see an example of how to use UnsubscribePullRequestRequest. +type UnsubscribePullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // The unsubscription token. + Token *string `mandatory:"true" contributesTo:"query" name:"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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UnsubscribePullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UnsubscribePullRequestRequest) 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 UnsubscribePullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UnsubscribePullRequestRequest) 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 UnsubscribePullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnsubscribePullRequestResponse wrapper for the UnsubscribePullRequest operation +type UnsubscribePullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Relative URL of the newly created resource. + ContentLocation *string `presentIn:"header" name:"content-location"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UnsubscribePullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UnsubscribePullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_approval_rule_details.go b/devops/update_approval_rule_details.go new file mode 100644 index 0000000000..bf3da3bd13 --- /dev/null +++ b/devops/update_approval_rule_details.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateApprovalRuleDetails A rule which must be satisfied for matching pull requests before the pull request can be merged +type UpdateApprovalRuleDetails struct { + + // Name which is used to uniquely identify an approval rule. + Name *string `mandatory:"true" json:"name"` + + // Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + MinApprovalsCount *int `mandatory:"true" json:"minApprovalsCount"` + + // Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + DestinationBranch *string `mandatory:"false" json:"destinationBranch"` + + // List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + Reviewers []UpdateReviewerDetails `mandatory:"false" json:"reviewers"` +} + +func (m UpdateApprovalRuleDetails) 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 UpdateApprovalRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_approval_rule_details_collection.go b/devops/update_approval_rule_details_collection.go new file mode 100644 index 0000000000..4164de5d5b --- /dev/null +++ b/devops/update_approval_rule_details_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateApprovalRuleDetailsCollection List of approval rules which must be statisfied before pull requests which match the rules can be merged +type UpdateApprovalRuleDetailsCollection struct { + + // List of approval rules. + Items []UpdateApprovalRuleDetails `mandatory:"true" json:"items"` +} + +func (m UpdateApprovalRuleDetailsCollection) 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 UpdateApprovalRuleDetailsCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_project_notification_preference_details.go b/devops/update_project_notification_preference_details.go new file mode 100644 index 0000000000..3679ed9f4e --- /dev/null +++ b/devops/update_project_notification_preference_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateProjectNotificationPreferenceDetails Information to update notification preference settings on project resource +type UpdateProjectNotificationPreferenceDetails struct { + + // The override value of project notification preference. + NotificationPreference ProjectNotificationPreferenceNotificationPreferenceEnum `mandatory:"true" json:"notificationPreference"` +} + +func (m UpdateProjectNotificationPreferenceDetails) 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 UpdateProjectNotificationPreferenceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingProjectNotificationPreferenceNotificationPreferenceEnum(string(m.NotificationPreference)); !ok && m.NotificationPreference != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NotificationPreference: %s. Supported values are: %s.", m.NotificationPreference, strings.Join(GetProjectNotificationPreferenceNotificationPreferenceEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_project_notification_preference_request_response.go b/devops/update_project_notification_preference_request_response.go new file mode 100644 index 0000000000..4e77442d48 --- /dev/null +++ b/devops/update_project_notification_preference_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateProjectNotificationPreferenceRequest wrapper for the UpdateProjectNotificationPreference operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateProjectNotificationPreference.go.html to see an example of how to use UpdateProjectNotificationPreferenceRequest. +type UpdateProjectNotificationPreferenceRequest struct { + + // The information to be updated. + UpdateProjectNotificationPreferenceDetails `contributesTo:"body"` + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // Unique principal identifier. + PrincipalId *string `mandatory:"true" contributesTo:"path" name:"principalId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateProjectNotificationPreferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateProjectNotificationPreferenceRequest) 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 UpdateProjectNotificationPreferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateProjectNotificationPreferenceRequest) 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 UpdateProjectNotificationPreferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateProjectNotificationPreferenceResponse wrapper for the UpdateProjectNotificationPreference operation +type UpdateProjectNotificationPreferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ProjectNotificationPreference instance + ProjectNotificationPreference `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateProjectNotificationPreferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateProjectNotificationPreferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_project_repository_settings_details.go b/devops/update_project_repository_settings_details.go new file mode 100644 index 0000000000..4b9352d83e --- /dev/null +++ b/devops/update_project_repository_settings_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateProjectRepositorySettingsDetails Information to update custom project repository settings. +type UpdateProjectRepositorySettingsDetails struct { + MergeSettings *MergeSettings `mandatory:"false" json:"mergeSettings"` + + ApprovalRules *UpdateApprovalRuleDetailsCollection `mandatory:"false" json:"approvalRules"` +} + +func (m UpdateProjectRepositorySettingsDetails) 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 UpdateProjectRepositorySettingsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_project_repository_settings_request_response.go b/devops/update_project_repository_settings_request_response.go new file mode 100644 index 0000000000..c1490e1308 --- /dev/null +++ b/devops/update_project_repository_settings_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateProjectRepositorySettingsRequest wrapper for the UpdateProjectRepositorySettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateProjectRepositorySettings.go.html to see an example of how to use UpdateProjectRepositorySettingsRequest. +type UpdateProjectRepositorySettingsRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // Details to update the repository settings for a project. + UpdateProjectRepositorySettingsDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateProjectRepositorySettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateProjectRepositorySettingsRequest) 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 UpdateProjectRepositorySettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateProjectRepositorySettingsRequest) 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 UpdateProjectRepositorySettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateProjectRepositorySettingsResponse wrapper for the UpdateProjectRepositorySettings operation +type UpdateProjectRepositorySettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ProjectRepositorySettings instance + ProjectRepositorySettings `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateProjectRepositorySettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateProjectRepositorySettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_pull_request_comment_details.go b/devops/update_pull_request_comment_details.go new file mode 100644 index 0000000000..d897573fb4 --- /dev/null +++ b/devops/update_pull_request_comment_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePullRequestCommentDetails The new comment content to be updated. +type UpdatePullRequestCommentDetails struct { + + // Pull Request comment content + Data *string `mandatory:"false" json:"data"` +} + +func (m UpdatePullRequestCommentDetails) 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 UpdatePullRequestCommentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_pull_request_comment_request_response.go b/devops/update_pull_request_comment_request_response.go new file mode 100644 index 0000000000..77bf7777f6 --- /dev/null +++ b/devops/update_pull_request_comment_request_response.go @@ -0,0 +1,101 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePullRequestCommentRequest wrapper for the UpdatePullRequestComment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdatePullRequestComment.go.html to see an example of how to use UpdatePullRequestCommentRequest. +type UpdatePullRequestCommentRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // unique PullRequest Comment identifier + CommentId *string `mandatory:"true" contributesTo:"path" name:"commentId"` + + // The new comment content to be updated. + UpdatePullRequestCommentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePullRequestCommentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePullRequestCommentRequest) 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 UpdatePullRequestCommentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePullRequestCommentRequest) 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 UpdatePullRequestCommentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePullRequestCommentResponse wrapper for the UpdatePullRequestComment operation +type UpdatePullRequestCommentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestComment instance + PullRequestComment `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePullRequestCommentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePullRequestCommentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_pull_request_details.go b/devops/update_pull_request_details.go new file mode 100644 index 0000000000..78784a11c6 --- /dev/null +++ b/devops/update_pull_request_details.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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePullRequestDetails The information to be updated. +type UpdatePullRequestDetails struct { + + // Pull Request title + DisplayName *string `mandatory:"false" json:"displayName"` + + // Details of the pull request. Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The destination branch against which the changes are to be reviewed. Example: "main" + DestinationBranch *string `mandatory:"false" json:"destinationBranch"` + + // Reviewers for this Review. + Reviewers []UpdateReviewerDetails `mandatory:"false" json:"reviewers"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). 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. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdatePullRequestDetails) 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 UpdatePullRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_pull_request_notification_preference_details.go b/devops/update_pull_request_notification_preference_details.go new file mode 100644 index 0000000000..5ac9a968f2 --- /dev/null +++ b/devops/update_pull_request_notification_preference_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePullRequestNotificationPreferenceDetails Information to update notification preference settings on pull request resource +type UpdatePullRequestNotificationPreferenceDetails struct { + + // The override value of pull request notification preference. + NotificationPreference PullRequestNotificationPreferenceNotificationPreferenceEnum `mandatory:"true" json:"notificationPreference"` +} + +func (m UpdatePullRequestNotificationPreferenceDetails) 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 UpdatePullRequestNotificationPreferenceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPullRequestNotificationPreferenceNotificationPreferenceEnum(string(m.NotificationPreference)); !ok && m.NotificationPreference != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NotificationPreference: %s. Supported values are: %s.", m.NotificationPreference, strings.Join(GetPullRequestNotificationPreferenceNotificationPreferenceEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_pull_request_notification_preference_request_response.go b/devops/update_pull_request_notification_preference_request_response.go new file mode 100644 index 0000000000..6d7fd0233a --- /dev/null +++ b/devops/update_pull_request_notification_preference_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePullRequestNotificationPreferenceRequest wrapper for the UpdatePullRequestNotificationPreference operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdatePullRequestNotificationPreference.go.html to see an example of how to use UpdatePullRequestNotificationPreferenceRequest. +type UpdatePullRequestNotificationPreferenceRequest struct { + + // The information to be updated. + UpdatePullRequestNotificationPreferenceDetails `contributesTo:"body"` + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // Unique principal identifier. + PrincipalId *string `mandatory:"true" contributesTo:"path" name:"principalId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePullRequestNotificationPreferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePullRequestNotificationPreferenceRequest) 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 UpdatePullRequestNotificationPreferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePullRequestNotificationPreferenceRequest) 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 UpdatePullRequestNotificationPreferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePullRequestNotificationPreferenceResponse wrapper for the UpdatePullRequestNotificationPreference operation +type UpdatePullRequestNotificationPreferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequestNotificationPreference instance + PullRequestNotificationPreference `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePullRequestNotificationPreferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePullRequestNotificationPreferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_pull_request_request_response.go b/devops/update_pull_request_request_response.go new file mode 100644 index 0000000000..4c9838fa31 --- /dev/null +++ b/devops/update_pull_request_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePullRequestRequest wrapper for the UpdatePullRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdatePullRequest.go.html to see an example of how to use UpdatePullRequestRequest. +type UpdatePullRequestRequest struct { + + // unique PullRequest identifier + PullRequestId *string `mandatory:"true" contributesTo:"path" name:"pullRequestId"` + + // The information to be updated. + UpdatePullRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePullRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePullRequestRequest) 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 UpdatePullRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePullRequestRequest) 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 UpdatePullRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePullRequestResponse wrapper for the UpdatePullRequest operation +type UpdatePullRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PullRequest instance + PullRequest `presentIn:"body"` + + // Relative URL of the newly created resource. + ContentLocation *string `presentIn:"header" name:"content-location"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // 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"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePullRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePullRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_repository_details.go b/devops/update_repository_details.go index 76b01a5e2d..0c5b2cd484 100644 --- a/devops/update_repository_details.go +++ b/devops/update_repository_details.go @@ -30,6 +30,7 @@ type UpdateRepositoryDetails struct { // Type of repository. Allowed values: // `MIRRORED` // `HOSTED` + // `FORKED` RepositoryType RepositoryRepositoryTypeEnum `mandatory:"false" json:"repositoryType,omitempty"` MirrorRepositoryConfig *MirrorRepositoryConfig `mandatory:"false" json:"mirrorRepositoryConfig"` diff --git a/devops/update_repository_notification_preference_details.go b/devops/update_repository_notification_preference_details.go new file mode 100644 index 0000000000..03b23bcfed --- /dev/null +++ b/devops/update_repository_notification_preference_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRepositoryNotificationPreferenceDetails Information to update notification preference settings on repository resource +type UpdateRepositoryNotificationPreferenceDetails struct { + + // The override value of repository notification preference. + NotificationPreference RepositoryNotificationPreferenceNotificationPreferenceEnum `mandatory:"true" json:"notificationPreference"` +} + +func (m UpdateRepositoryNotificationPreferenceDetails) 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 UpdateRepositoryNotificationPreferenceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRepositoryNotificationPreferenceNotificationPreferenceEnum(string(m.NotificationPreference)); !ok && m.NotificationPreference != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NotificationPreference: %s. Supported values are: %s.", m.NotificationPreference, strings.Join(GetRepositoryNotificationPreferenceNotificationPreferenceEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_repository_notification_preference_request_response.go b/devops/update_repository_notification_preference_request_response.go new file mode 100644 index 0000000000..1e7ad664db --- /dev/null +++ b/devops/update_repository_notification_preference_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateRepositoryNotificationPreferenceRequest wrapper for the UpdateRepositoryNotificationPreference operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateRepositoryNotificationPreference.go.html to see an example of how to use UpdateRepositoryNotificationPreferenceRequest. +type UpdateRepositoryNotificationPreferenceRequest struct { + + // The information to be updated. + UpdateRepositoryNotificationPreferenceDetails `contributesTo:"body"` + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Unique principal identifier. + PrincipalId *string `mandatory:"true" contributesTo:"path" name:"principalId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRepositoryNotificationPreferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRepositoryNotificationPreferenceRequest) 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 UpdateRepositoryNotificationPreferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRepositoryNotificationPreferenceRequest) 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 UpdateRepositoryNotificationPreferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateRepositoryNotificationPreferenceResponse wrapper for the UpdateRepositoryNotificationPreference operation +type UpdateRepositoryNotificationPreferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RepositoryNotificationPreference instance + RepositoryNotificationPreference `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateRepositoryNotificationPreferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRepositoryNotificationPreferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_repository_settings_details.go b/devops/update_repository_settings_details.go new file mode 100644 index 0000000000..7a36fb56d4 --- /dev/null +++ b/devops/update_repository_settings_details.go @@ -0,0 +1,41 @@ +// 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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRepositorySettingsDetails Information to update custom repository settings +type UpdateRepositorySettingsDetails struct { + MergeChecks *MergeChecks `mandatory:"false" json:"mergeChecks"` + + MergeSettings *MergeSettings `mandatory:"false" json:"mergeSettings"` + + ApprovalRules *UpdateApprovalRuleDetailsCollection `mandatory:"false" json:"approvalRules"` +} + +func (m UpdateRepositorySettingsDetails) 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 UpdateRepositorySettingsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/update_repository_settings_request_response.go b/devops/update_repository_settings_request_response.go new file mode 100644 index 0000000000..de888ff31f --- /dev/null +++ b/devops/update_repository_settings_request_response.go @@ -0,0 +1,104 @@ +// 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 devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateRepositorySettingsRequest wrapper for the UpdateRepositorySettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/UpdateRepositorySettings.go.html to see an example of how to use UpdateRepositorySettingsRequest. +type UpdateRepositorySettingsRequest struct { + + // Unique repository identifier. + RepositoryId *string `mandatory:"true" contributesTo:"path" name:"repositoryId"` + + // Details to update settings for a repository. + UpdateRepositorySettingsDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRepositorySettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRepositorySettingsRequest) 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 UpdateRepositorySettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRepositorySettingsRequest) 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 UpdateRepositorySettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateRepositorySettingsResponse wrapper for the UpdateRepositorySettings operation +type UpdateRepositorySettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RepositorySettings instance + RepositorySettings `presentIn:"body"` + + // Relative URL of the newly created resource. + Location *string `presentIn:"header" name:"location"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateRepositorySettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRepositorySettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/update_reviewer_details.go b/devops/update_reviewer_details.go new file mode 100644 index 0000000000..61c42d5b71 --- /dev/null +++ b/devops/update_reviewer_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateReviewerDetails The reviewer to be updated. +type UpdateReviewerDetails struct { + + // Pull Request reviewer id + PrincipalId *string `mandatory:"true" json:"principalId"` +} + +func (m UpdateReviewerDetails) 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 UpdateReviewerDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/devops/validate_merge_pull_request_details.go b/devops/validate_merge_pull_request_details.go new file mode 100644 index 0000000000..0e12aa8395 --- /dev/null +++ b/devops/validate_merge_pull_request_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. + +// DevOps API +// +// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm). +// + +package devops + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ValidateMergePullRequestDetails The information about the merge validation. +type ValidateMergePullRequestDetails struct { +} + +func (m ValidateMergePullRequestDetails) 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 ValidateMergePullRequestDetails) 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 ValidateMergePullRequestDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeValidateMergePullRequestDetails ValidateMergePullRequestDetails + s := struct { + DiscriminatorParam string `json:"actionType"` + MarshalTypeValidateMergePullRequestDetails + }{ + "VALIDATE", + (MarshalTypeValidateMergePullRequestDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/emwarehouse/emwarehouse_client.go b/emwarehouse/emwarehouse_client.go index 4002b94926..e826a8d322 100644 --- a/emwarehouse/emwarehouse_client.go +++ b/emwarehouse/emwarehouse_client.go @@ -139,7 +139,7 @@ func (client EmWarehouseClient) cancelWorkRequest(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/WorkRequest/CancelWorkRequest" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "CancelWorkRequest", apiReferenceLink) return response, err } @@ -201,7 +201,7 @@ func (client EmWarehouseClient) changeEmWarehouseCompartment(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/EmWarehouse/ChangeEmWarehouseCompartment" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "ChangeEmWarehouseCompartment", apiReferenceLink) return response, err } @@ -263,7 +263,7 @@ func (client EmWarehouseClient) createEmWarehouse(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/EmWarehouse/CreateEmWarehouse" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "CreateEmWarehouse", apiReferenceLink) return response, err } @@ -320,7 +320,7 @@ func (client EmWarehouseClient) deleteEmWarehouse(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/EmWarehouse/DeleteEmWarehouse" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "DeleteEmWarehouse", apiReferenceLink) return response, err } @@ -377,7 +377,7 @@ func (client EmWarehouseClient) getEmWarehouse(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/EmWarehouse/GetEmWarehouse" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "GetEmWarehouse", apiReferenceLink) return response, err } @@ -434,7 +434,7 @@ func (client EmWarehouseClient) getEmWarehouseResourceUsage(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/ResourceUsage/GetEmWarehouseResourceUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "GetEmWarehouseResourceUsage", apiReferenceLink) return response, err } @@ -491,7 +491,7 @@ func (client EmWarehouseClient) getWorkRequest(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/WorkRequest/GetWorkRequest" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "GetWorkRequest", apiReferenceLink) return response, err } @@ -548,7 +548,7 @@ func (client EmWarehouseClient) listEmWarehouses(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/EmWarehouseCollection/ListEmWarehouses" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "ListEmWarehouses", apiReferenceLink) return response, err } @@ -605,7 +605,7 @@ func (client EmWarehouseClient) listEtlRuns(ctx context.Context, request common. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/EtlRunCollection/ListEtlRuns" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "ListEtlRuns", apiReferenceLink) return response, err } @@ -662,7 +662,7 @@ func (client EmWarehouseClient) listWorkRequestErrors(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/WorkRequestError/ListWorkRequestErrors" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -719,7 +719,7 @@ func (client EmWarehouseClient) listWorkRequestLogs(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/WorkRequestLogEntry/ListWorkRequestLogs" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -776,7 +776,7 @@ func (client EmWarehouseClient) listWorkRequests(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/WorkRequest/ListWorkRequests" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "ListWorkRequests", apiReferenceLink) return response, err } @@ -833,7 +833,7 @@ func (client EmWarehouseClient) updateEmWarehouse(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/em-warehouse/20180828/EmWarehouse/UpdateEmWarehouse" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "EmWarehouse", "UpdateEmWarehouse", apiReferenceLink) return response, err } diff --git a/jms/action_type.go b/jms/action_type.go index 1c44475d54..4e9838e63d 100644 --- a/jms/action_type.go +++ b/jms/action_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/add_fleet_installation_sites_details.go b/jms/add_fleet_installation_sites_details.go index aa30a61532..a0af55b535 100644 --- a/jms/add_fleet_installation_sites_details.go +++ b/jms/add_fleet_installation_sites_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/add_fleet_installation_sites_request_response.go b/jms/add_fleet_installation_sites_request_response.go index 89a0c50a2b..5ef3237f6c 100644 --- a/jms/add_fleet_installation_sites_request_response.go +++ b/jms/add_fleet_installation_sites_request_response.go @@ -94,7 +94,7 @@ type AddFleetInstallationSitesResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/advanced_usage_tracking.go b/jms/advanced_usage_tracking.go index 7231a3e5d0..58e070d718 100644 --- a/jms/advanced_usage_tracking.go +++ b/jms/advanced_usage_tracking.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/agent.go b/jms/agent.go index b6d8c0e3dc..704b3f32a1 100644 --- a/jms/agent.go +++ b/jms/agent.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/agent_installer_collection.go b/jms/agent_installer_collection.go new file mode 100644 index 0000000000..980a715cff --- /dev/null +++ b/jms/agent_installer_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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AgentInstallerCollection Collection of the agent installer summary. +type AgentInstallerCollection struct { + + // A list of the agent installer summaries. + Items []AgentInstallerSummary `mandatory:"true" json:"items"` +} + +func (m AgentInstallerCollection) 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 AgentInstallerCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/agent_installer_sort_by.go b/jms/agent_installer_sort_by.go new file mode 100644 index 0000000000..0099781a52 --- /dev/null +++ b/jms/agent_installer_sort_by.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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "strings" +) + +// AgentInstallerSortByEnum Enum with underlying type: string +type AgentInstallerSortByEnum string + +// Set of constants representing the allowable values for AgentInstallerSortByEnum +const ( + AgentInstallerSortByAgentInstallerId AgentInstallerSortByEnum = "agentInstallerId" + AgentInstallerSortByOsFamily AgentInstallerSortByEnum = "osFamily" + AgentInstallerSortByPlatformArchitecture AgentInstallerSortByEnum = "platformArchitecture" +) + +var mappingAgentInstallerSortByEnum = map[string]AgentInstallerSortByEnum{ + "agentInstallerId": AgentInstallerSortByAgentInstallerId, + "osFamily": AgentInstallerSortByOsFamily, + "platformArchitecture": AgentInstallerSortByPlatformArchitecture, +} + +var mappingAgentInstallerSortByEnumLowerCase = map[string]AgentInstallerSortByEnum{ + "agentinstallerid": AgentInstallerSortByAgentInstallerId, + "osfamily": AgentInstallerSortByOsFamily, + "platformarchitecture": AgentInstallerSortByPlatformArchitecture, +} + +// GetAgentInstallerSortByEnumValues Enumerates the set of values for AgentInstallerSortByEnum +func GetAgentInstallerSortByEnumValues() []AgentInstallerSortByEnum { + values := make([]AgentInstallerSortByEnum, 0) + for _, v := range mappingAgentInstallerSortByEnum { + values = append(values, v) + } + return values +} + +// GetAgentInstallerSortByEnumStringValues Enumerates the set of values in String for AgentInstallerSortByEnum +func GetAgentInstallerSortByEnumStringValues() []string { + return []string{ + "agentInstallerId", + "osFamily", + "platformArchitecture", + } +} + +// GetMappingAgentInstallerSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAgentInstallerSortByEnum(val string) (AgentInstallerSortByEnum, bool) { + enum, ok := mappingAgentInstallerSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/agent_installer_summary.go b/jms/agent_installer_summary.go new file mode 100644 index 0000000000..91ff3f73f0 --- /dev/null +++ b/jms/agent_installer_summary.go @@ -0,0 +1,75 @@ +// 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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AgentInstallerSummary Supported agent installer downloads. +type AgentInstallerSummary struct { + + // Unique identifier for the agent installer. + AgentInstallerId *int64 `mandatory:"true" json:"agentInstallerId"` + + // Description of the agent installer artifact. The description typically includes the OS, architecture, and agent installer type. + AgentInstallerDescription *string `mandatory:"true" json:"agentInstallerDescription"` + + // Approximate compressed file size in bytes. + ApproximateFileSizeInBytes *int64 `mandatory:"true" json:"approximateFileSizeInBytes"` + + // SHA256 checksum of the agent installer. + Sha256 *string `mandatory:"true" json:"sha256"` + + // The target operating system family for the agent installer. + OsFamily OsFamilyEnum `mandatory:"true" json:"osFamily"` + + // The target operating system architecture for the installer. + PlatformArchitecture PlatformArchitectureTypeEnum `mandatory:"true" json:"platformArchitecture"` + + // The package type (typically the file extension) of the agent software included in the installer. + PackageType PackageTypeEnum `mandatory:"true" json:"packageType"` + + // Agent image version. + AgentVersion *string `mandatory:"true" json:"agentVersion"` + + // Java version. + JavaVersion *string `mandatory:"true" json:"javaVersion"` + + // Agent installer version. + AgentInstallerVersion *string `mandatory:"true" json:"agentInstallerVersion"` +} + +func (m AgentInstallerSummary) 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 AgentInstallerSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOsFamilyEnum(string(m.OsFamily)); !ok && m.OsFamily != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsFamily: %s. Supported values are: %s.", m.OsFamily, strings.Join(GetOsFamilyEnumStringValues(), ","))) + } + if _, ok := GetMappingPlatformArchitectureTypeEnum(string(m.PlatformArchitecture)); !ok && m.PlatformArchitecture != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PlatformArchitecture: %s. Supported values are: %s.", m.PlatformArchitecture, strings.Join(GetPlatformArchitectureTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPackageTypeEnum(string(m.PackageType)); !ok && m.PackageType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PackageType: %s. Supported values are: %s.", m.PackageType, strings.Join(GetPackageTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/agent_type.go b/jms/agent_type.go index 6ded1bbcf5..3ae279ab89 100644 --- a/jms/agent_type.go +++ b/jms/agent_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/algorithms.go b/jms/algorithms.go index 3766469016..b775cdb64f 100644 --- a/jms/algorithms.go +++ b/jms/algorithms.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/announcement_collection.go b/jms/announcement_collection.go index 7b58f67b88..59cd018ab8 100644 --- a/jms/announcement_collection.go +++ b/jms/announcement_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/announcement_sort_by.go b/jms/announcement_sort_by.go index dbd2efe967..e674063cf8 100644 --- a/jms/announcement_sort_by.go +++ b/jms/announcement_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/announcement_summary.go b/jms/announcement_summary.go index 4fc33dc30e..80b02edbc5 100644 --- a/jms/announcement_summary.go +++ b/jms/announcement_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/application_execution_type.go b/jms/application_execution_type.go index 2f66fd3ca7..a2e5c43ad2 100644 --- a/jms/application_execution_type.go +++ b/jms/application_execution_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/application_installation_sort_by.go b/jms/application_installation_sort_by.go index 4d8d692a27..0bf367b922 100644 --- a/jms/application_installation_sort_by.go +++ b/jms/application_installation_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -26,6 +26,7 @@ const ( ApplicationInstallationSortByApproximateJreCount ApplicationInstallationSortByEnum = "approximateJreCount" ApplicationInstallationSortByApproximateInstallationCount ApplicationInstallationSortByEnum = "approximateInstallationCount" ApplicationInstallationSortByApproximateManagedInstanceCount ApplicationInstallationSortByEnum = "approximateManagedInstanceCount" + ApplicationInstallationSortByApproximateLibraryCount ApplicationInstallationSortByEnum = "approximateLibraryCount" ) var mappingApplicationInstallationSortByEnum = map[string]ApplicationInstallationSortByEnum{ @@ -37,6 +38,7 @@ var mappingApplicationInstallationSortByEnum = map[string]ApplicationInstallatio "approximateJreCount": ApplicationInstallationSortByApproximateJreCount, "approximateInstallationCount": ApplicationInstallationSortByApproximateInstallationCount, "approximateManagedInstanceCount": ApplicationInstallationSortByApproximateManagedInstanceCount, + "approximateLibraryCount": ApplicationInstallationSortByApproximateLibraryCount, } var mappingApplicationInstallationSortByEnumLowerCase = map[string]ApplicationInstallationSortByEnum{ @@ -48,6 +50,7 @@ var mappingApplicationInstallationSortByEnumLowerCase = map[string]ApplicationIn "approximatejrecount": ApplicationInstallationSortByApproximateJreCount, "approximateinstallationcount": ApplicationInstallationSortByApproximateInstallationCount, "approximatemanagedinstancecount": ApplicationInstallationSortByApproximateManagedInstanceCount, + "approximatelibrarycount": ApplicationInstallationSortByApproximateLibraryCount, } // GetApplicationInstallationSortByEnumValues Enumerates the set of values for ApplicationInstallationSortByEnum @@ -70,6 +73,7 @@ func GetApplicationInstallationSortByEnumStringValues() []string { "approximateJreCount", "approximateInstallationCount", "approximateManagedInstanceCount", + "approximateLibraryCount", } } diff --git a/jms/application_installation_usage_summary.go b/jms/application_installation_usage_summary.go index bf314d0699..86aec98e4b 100644 --- a/jms/application_installation_usage_summary.go +++ b/jms/application_installation_usage_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -51,6 +51,12 @@ type ApplicationInstallationUsageSummary struct { // The approximate count of managed instances reporting this application. ApproximateManagedInstanceCount *int `mandatory:"false" json:"approximateManagedInstanceCount"` + // The approximate count of libraries in this application. + ApproximateLibraryCount *int `mandatory:"false" json:"approximateLibraryCount"` + + // Comma separated list of user names that invoked application installations. + ApplicationInvokedBy *string `mandatory:"false" json:"applicationInvokedBy"` + // Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` diff --git a/jms/application_installation_usage_summary_collection.go b/jms/application_installation_usage_summary_collection.go index 9139082160..7142b12287 100644 --- a/jms/application_installation_usage_summary_collection.go +++ b/jms/application_installation_usage_summary_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/application_sort_by.go b/jms/application_sort_by.go index a0a4bfc83b..c88b146ccf 100644 --- a/jms/application_sort_by.go +++ b/jms/application_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -24,6 +24,7 @@ const ( ApplicationSortByApproximateJreCount ApplicationSortByEnum = "approximateJreCount" ApplicationSortByApproximateInstallationCount ApplicationSortByEnum = "approximateInstallationCount" ApplicationSortByApproximateManagedInstanceCount ApplicationSortByEnum = "approximateManagedInstanceCount" + ApplicationSortByApproximateLibraryCount ApplicationSortByEnum = "approximateLibraryCount" ApplicationSortByOsName ApplicationSortByEnum = "osName" ) @@ -34,6 +35,7 @@ var mappingApplicationSortByEnum = map[string]ApplicationSortByEnum{ "approximateJreCount": ApplicationSortByApproximateJreCount, "approximateInstallationCount": ApplicationSortByApproximateInstallationCount, "approximateManagedInstanceCount": ApplicationSortByApproximateManagedInstanceCount, + "approximateLibraryCount": ApplicationSortByApproximateLibraryCount, "osName": ApplicationSortByOsName, } @@ -44,6 +46,7 @@ var mappingApplicationSortByEnumLowerCase = map[string]ApplicationSortByEnum{ "approximatejrecount": ApplicationSortByApproximateJreCount, "approximateinstallationcount": ApplicationSortByApproximateInstallationCount, "approximatemanagedinstancecount": ApplicationSortByApproximateManagedInstanceCount, + "approximatelibrarycount": ApplicationSortByApproximateLibraryCount, "osname": ApplicationSortByOsName, } @@ -65,6 +68,7 @@ func GetApplicationSortByEnumStringValues() []string { "approximateJreCount", "approximateInstallationCount", "approximateManagedInstanceCount", + "approximateLibraryCount", "osName", } } diff --git a/jms/application_usage.go b/jms/application_usage.go index 8e1ff99e99..256c4bf4b1 100644 --- a/jms/application_usage.go +++ b/jms/application_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -20,13 +20,13 @@ import ( // An application is independent of the Java Runtime or its installation. type ApplicationUsage struct { - // An internal identifier for the application that is unique to a Fleet. + // An internal identifier for the application that is unique to a fleet. ApplicationId *string `mandatory:"true" json:"applicationId"` // The name of the application. DisplayName *string `mandatory:"true" json:"displayName"` - // The type of the application, denoted by how the application was started. + // The type of the application denoted by how the application was started. ApplicationType *string `mandatory:"true" json:"applicationType"` // The operating systems running this application. @@ -41,6 +41,9 @@ type ApplicationUsage struct { // The approximate count of managed instances reporting this application. ApproximateManagedInstanceCount *int `mandatory:"false" json:"approximateManagedInstanceCount"` + // The approximate count of libraries in this application. + ApproximateLibraryCount *int `mandatory:"false" json:"approximateLibraryCount"` + // Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` diff --git a/jms/application_usage_collection.go b/jms/application_usage_collection.go index 636ba74902..62dec272c6 100644 --- a/jms/application_usage_collection.go +++ b/jms/application_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/application_work_item_details.go b/jms/application_work_item_details.go index 011ed8e0a7..8a9524ff77 100644 --- a/jms/application_work_item_details.go +++ b/jms/application_work_item_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/artifact_content_type.go b/jms/artifact_content_type.go index 82d96d14df..426bf33349 100644 --- a/jms/artifact_content_type.go +++ b/jms/artifact_content_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/basic_work_item_details.go b/jms/basic_work_item_details.go index 68282ce97f..84cde6cc98 100644 --- a/jms/basic_work_item_details.go +++ b/jms/basic_work_item_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/blocklist.go b/jms/blocklist.go index 48e8dd0baf..383064b9f5 100644 --- a/jms/blocklist.go +++ b/jms/blocklist.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/blocklist_collection.go b/jms/blocklist_collection.go index cbd9f3e71f..743330a69f 100644 --- a/jms/blocklist_collection.go +++ b/jms/blocklist_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/blocklist_entry.go b/jms/blocklist_entry.go index 29b8080d4f..3a8796ad81 100644 --- a/jms/blocklist_entry.go +++ b/jms/blocklist_entry.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/blocklist_sort_by.go b/jms/blocklist_sort_by.go index c2951473bd..33ca5f46dc 100644 --- a/jms/blocklist_sort_by.go +++ b/jms/blocklist_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/blocklist_target.go b/jms/blocklist_target.go index 7c58995359..693116df05 100644 --- a/jms/blocklist_target.go +++ b/jms/blocklist_target.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/cancel_work_request_request_response.go b/jms/cancel_work_request_request_response.go index aef3ce9ad5..202749c7dc 100644 --- a/jms/cancel_work_request_request_response.go +++ b/jms/cancel_work_request_request_response.go @@ -80,7 +80,7 @@ type CancelWorkRequestResponse struct { RawResponse *http.Response // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/change_fleet_compartment_details.go b/jms/change_fleet_compartment_details.go index 58990e96c9..d97e91d7f3 100644 --- a/jms/change_fleet_compartment_details.go +++ b/jms/change_fleet_compartment_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/change_fleet_compartment_request_response.go b/jms/change_fleet_compartment_request_response.go index 294301ccc9..aacdb9a84d 100644 --- a/jms/change_fleet_compartment_request_response.go +++ b/jms/change_fleet_compartment_request_response.go @@ -94,7 +94,7 @@ type ChangeFleetCompartmentResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/create_blocklist_details.go b/jms/create_blocklist_details.go index 40355300b4..d4ad8cd60b 100644 --- a/jms/create_blocklist_details.go +++ b/jms/create_blocklist_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/create_blocklist_request_response.go b/jms/create_blocklist_request_response.go index 58d994d1e4..43e109a32f 100644 --- a/jms/create_blocklist_request_response.go +++ b/jms/create_blocklist_request_response.go @@ -86,7 +86,7 @@ type CreateBlocklistResponse struct { Blocklist `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For optimistic concurrency control. See `if-match`. diff --git a/jms/create_drs_file_details.go b/jms/create_drs_file_details.go index 14126863a4..ef1e807b6f 100644 --- a/jms/create_drs_file_details.go +++ b/jms/create_drs_file_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/create_drs_file_request_response.go b/jms/create_drs_file_request_response.go index 6fe378e9e0..fcb87db7c5 100644 --- a/jms/create_drs_file_request_response.go +++ b/jms/create_drs_file_request_response.go @@ -94,7 +94,7 @@ type CreateDrsFileResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/create_fleet_details.go b/jms/create_fleet_details.go index 3fd6fed21d..240ca7896f 100644 --- a/jms/create_fleet_details.go +++ b/jms/create_fleet_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/create_fleet_request_response.go b/jms/create_fleet_request_response.go index 8ea9de810a..d5c328352d 100644 --- a/jms/create_fleet_request_response.go +++ b/jms/create_fleet_request_response.go @@ -84,7 +84,7 @@ type CreateFleetResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/create_jms_plugin_details.go b/jms/create_jms_plugin_details.go new file mode 100644 index 0000000000..387e9f22a2 --- /dev/null +++ b/jms/create_jms_plugin_details.go @@ -0,0 +1,53 @@ +// 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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateJmsPluginDetails The details for creating a JmsPlugin. +type CreateJmsPluginDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + AgentId *string `mandatory:"true" json:"agentId"` + + // The OMA/OCA agent's compartment OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + FleetId *string `mandatory:"false" json:"fleetId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateJmsPluginDetails) 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 CreateJmsPluginDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/create_jms_plugin_request_response.go b/jms/create_jms_plugin_request_response.go new file mode 100644 index 0000000000..d3bda01738 --- /dev/null +++ b/jms/create_jms_plugin_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 jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateJmsPluginRequest wrapper for the CreateJmsPlugin operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/CreateJmsPlugin.go.html to see an example of how to use CreateJmsPluginRequest. +type CreateJmsPluginRequest struct { + + // Details for the new JmsPlugin. + CreateJmsPluginDetails `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 CreateJmsPluginRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateJmsPluginRequest) 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 CreateJmsPluginRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateJmsPluginRequest) 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 CreateJmsPluginRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateJmsPluginResponse wrapper for the CreateJmsPlugin operation +type CreateJmsPluginResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JmsPlugin instance + JmsPlugin `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateJmsPluginResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateJmsPluginResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/crypto_analysis_result.go b/jms/crypto_analysis_result.go index 871dfd445d..d830d51d68 100644 --- a/jms/crypto_analysis_result.go +++ b/jms/crypto_analysis_result.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -70,6 +70,12 @@ type CryptoAnalysisResult struct { // The time the result is compiled. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time the JFR recording has started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the JFR recording has finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` } func (m CryptoAnalysisResult) String() string { diff --git a/jms/crypto_analysis_result_collection.go b/jms/crypto_analysis_result_collection.go index 978188edb5..61b1177b5b 100644 --- a/jms/crypto_analysis_result_collection.go +++ b/jms/crypto_analysis_result_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/crypto_analysis_result_mode.go b/jms/crypto_analysis_result_mode.go index 49153cd5f2..6f2ad32ee2 100644 --- a/jms/crypto_analysis_result_mode.go +++ b/jms/crypto_analysis_result_mode.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/crypto_analysis_result_sort_by.go b/jms/crypto_analysis_result_sort_by.go index ad1bbf4d12..d89ed3aeb7 100644 --- a/jms/crypto_analysis_result_sort_by.go +++ b/jms/crypto_analysis_result_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/crypto_analysis_result_summary.go b/jms/crypto_analysis_result_summary.go index 6e5075caa3..4623cb3e41 100644 --- a/jms/crypto_analysis_result_summary.go +++ b/jms/crypto_analysis_result_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -70,6 +70,12 @@ type CryptoAnalysisResultSummary struct { // The time the result is compiled. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time the JFR recording has started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the JFR recording has finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` } func (m CryptoAnalysisResultSummary) String() string { diff --git a/jms/crypto_event_analysis.go b/jms/crypto_event_analysis.go index 6c46eae98d..0bd4e62187 100644 --- a/jms/crypto_event_analysis.go +++ b/jms/crypto_event_analysis.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/custom_log.go b/jms/custom_log.go index 26aae57fa4..5fe223ac8d 100644 --- a/jms/custom_log.go +++ b/jms/custom_log.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/delete_blocklist_request_response.go b/jms/delete_blocklist_request_response.go index fba2c768bf..b377bdd96a 100644 --- a/jms/delete_blocklist_request_response.go +++ b/jms/delete_blocklist_request_response.go @@ -83,7 +83,7 @@ type DeleteBlocklistResponse struct { RawResponse *http.Response // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/delete_crypto_analysis_result_request_response.go b/jms/delete_crypto_analysis_result_request_response.go index 7ff3d266ba..03e645e354 100644 --- a/jms/delete_crypto_analysis_result_request_response.go +++ b/jms/delete_crypto_analysis_result_request_response.go @@ -87,7 +87,7 @@ type DeleteCryptoAnalysisResultResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/delete_drs_file_request_response.go b/jms/delete_drs_file_request_response.go index eef3c06cfe..4f5a57fcac 100644 --- a/jms/delete_drs_file_request_response.go +++ b/jms/delete_drs_file_request_response.go @@ -87,7 +87,7 @@ type DeleteDrsFileResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/delete_fleet_request_response.go b/jms/delete_fleet_request_response.go index c6a5ba6ec6..a2d9117a32 100644 --- a/jms/delete_fleet_request_response.go +++ b/jms/delete_fleet_request_response.go @@ -84,7 +84,7 @@ type DeleteFleetResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/delete_java_migration_analysis_result_request_response.go b/jms/delete_java_migration_analysis_result_request_response.go index 5f60cd7115..4a197f8d27 100644 --- a/jms/delete_java_migration_analysis_result_request_response.go +++ b/jms/delete_java_migration_analysis_result_request_response.go @@ -87,7 +87,7 @@ type DeleteJavaMigrationAnalysisResultResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/delete_jms_plugin_request_response.go b/jms/delete_jms_plugin_request_response.go new file mode 100644 index 0000000000..6a02a8c636 --- /dev/null +++ b/jms/delete_jms_plugin_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 jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteJmsPluginRequest wrapper for the DeleteJmsPlugin operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/DeleteJmsPlugin.go.html to see an example of how to use DeleteJmsPluginRequest. +type DeleteJmsPluginRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + JmsPluginId *string `mandatory:"true" contributesTo:"path" name:"jmsPluginId"` + + // 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 DeleteJmsPluginRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteJmsPluginRequest) 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 DeleteJmsPluginRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteJmsPluginRequest) 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 DeleteJmsPluginRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteJmsPluginResponse wrapper for the DeleteJmsPlugin operation +type DeleteJmsPluginResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteJmsPluginResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteJmsPluginResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/delete_performance_tuning_analysis_result_request_response.go b/jms/delete_performance_tuning_analysis_result_request_response.go index 6676f04113..5281230df7 100644 --- a/jms/delete_performance_tuning_analysis_result_request_response.go +++ b/jms/delete_performance_tuning_analysis_result_request_response.go @@ -87,7 +87,7 @@ type DeletePerformanceTuningAnalysisResultResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/deployed_application_installation_sort_by.go b/jms/deployed_application_installation_sort_by.go index 4c0dffa998..b07eb6ae9a 100644 --- a/jms/deployed_application_installation_sort_by.go +++ b/jms/deployed_application_installation_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -18,33 +18,39 @@ type DeployedApplicationInstallationSortByEnum string // Set of constants representing the allowable values for DeployedApplicationInstallationSortByEnum const ( - DeployedApplicationInstallationSortByApplicationName DeployedApplicationInstallationSortByEnum = "applicationName" - DeployedApplicationInstallationSortByApplicationType DeployedApplicationInstallationSortByEnum = "applicationType" - DeployedApplicationInstallationSortByApplicationSourcePath DeployedApplicationInstallationSortByEnum = "applicationSourcePath" - DeployedApplicationInstallationSortByIsClustered DeployedApplicationInstallationSortByEnum = "isClustered" - DeployedApplicationInstallationSortByJavaServerInstanceCount DeployedApplicationInstallationSortByEnum = "javaServerInstanceCount" - DeployedApplicationInstallationSortByTimeFirstSeen DeployedApplicationInstallationSortByEnum = "timeFirstSeen" - DeployedApplicationInstallationSortByTimeLastSeen DeployedApplicationInstallationSortByEnum = "timeLastSeen" + DeployedApplicationInstallationSortByApplicationName DeployedApplicationInstallationSortByEnum = "applicationName" + DeployedApplicationInstallationSortByApplicationType DeployedApplicationInstallationSortByEnum = "applicationType" + DeployedApplicationInstallationSortByApplicationSourcePath DeployedApplicationInstallationSortByEnum = "applicationSourcePath" + DeployedApplicationInstallationSortByIsClustered DeployedApplicationInstallationSortByEnum = "isClustered" + DeployedApplicationInstallationSortByJavaServerInstanceCount DeployedApplicationInstallationSortByEnum = "javaServerInstanceCount" + DeployedApplicationInstallationSortByApproximateJavaServerInstanceCount DeployedApplicationInstallationSortByEnum = "approximateJavaServerInstanceCount" + DeployedApplicationInstallationSortByApproximateLibraryCount DeployedApplicationInstallationSortByEnum = "approximateLibraryCount" + DeployedApplicationInstallationSortByTimeFirstSeen DeployedApplicationInstallationSortByEnum = "timeFirstSeen" + DeployedApplicationInstallationSortByTimeLastSeen DeployedApplicationInstallationSortByEnum = "timeLastSeen" ) var mappingDeployedApplicationInstallationSortByEnum = map[string]DeployedApplicationInstallationSortByEnum{ - "applicationName": DeployedApplicationInstallationSortByApplicationName, - "applicationType": DeployedApplicationInstallationSortByApplicationType, - "applicationSourcePath": DeployedApplicationInstallationSortByApplicationSourcePath, - "isClustered": DeployedApplicationInstallationSortByIsClustered, - "javaServerInstanceCount": DeployedApplicationInstallationSortByJavaServerInstanceCount, - "timeFirstSeen": DeployedApplicationInstallationSortByTimeFirstSeen, - "timeLastSeen": DeployedApplicationInstallationSortByTimeLastSeen, + "applicationName": DeployedApplicationInstallationSortByApplicationName, + "applicationType": DeployedApplicationInstallationSortByApplicationType, + "applicationSourcePath": DeployedApplicationInstallationSortByApplicationSourcePath, + "isClustered": DeployedApplicationInstallationSortByIsClustered, + "javaServerInstanceCount": DeployedApplicationInstallationSortByJavaServerInstanceCount, + "approximateJavaServerInstanceCount": DeployedApplicationInstallationSortByApproximateJavaServerInstanceCount, + "approximateLibraryCount": DeployedApplicationInstallationSortByApproximateLibraryCount, + "timeFirstSeen": DeployedApplicationInstallationSortByTimeFirstSeen, + "timeLastSeen": DeployedApplicationInstallationSortByTimeLastSeen, } var mappingDeployedApplicationInstallationSortByEnumLowerCase = map[string]DeployedApplicationInstallationSortByEnum{ - "applicationname": DeployedApplicationInstallationSortByApplicationName, - "applicationtype": DeployedApplicationInstallationSortByApplicationType, - "applicationsourcepath": DeployedApplicationInstallationSortByApplicationSourcePath, - "isclustered": DeployedApplicationInstallationSortByIsClustered, - "javaserverinstancecount": DeployedApplicationInstallationSortByJavaServerInstanceCount, - "timefirstseen": DeployedApplicationInstallationSortByTimeFirstSeen, - "timelastseen": DeployedApplicationInstallationSortByTimeLastSeen, + "applicationname": DeployedApplicationInstallationSortByApplicationName, + "applicationtype": DeployedApplicationInstallationSortByApplicationType, + "applicationsourcepath": DeployedApplicationInstallationSortByApplicationSourcePath, + "isclustered": DeployedApplicationInstallationSortByIsClustered, + "javaserverinstancecount": DeployedApplicationInstallationSortByJavaServerInstanceCount, + "approximatejavaserverinstancecount": DeployedApplicationInstallationSortByApproximateJavaServerInstanceCount, + "approximatelibrarycount": DeployedApplicationInstallationSortByApproximateLibraryCount, + "timefirstseen": DeployedApplicationInstallationSortByTimeFirstSeen, + "timelastseen": DeployedApplicationInstallationSortByTimeLastSeen, } // GetDeployedApplicationInstallationSortByEnumValues Enumerates the set of values for DeployedApplicationInstallationSortByEnum @@ -64,6 +70,8 @@ func GetDeployedApplicationInstallationSortByEnumStringValues() []string { "applicationSourcePath", "isClustered", "javaServerInstanceCount", + "approximateJavaServerInstanceCount", + "approximateLibraryCount", "timeFirstSeen", "timeLastSeen", } diff --git a/jms/deployed_application_installation_usage_summary.go b/jms/deployed_application_installation_usage_summary.go index 1926398abb..d62fd1dff5 100644 --- a/jms/deployed_application_installation_usage_summary.go +++ b/jms/deployed_application_installation_usage_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -15,7 +15,7 @@ import ( "strings" ) -// DeployedApplicationInstallationUsageSummary Summarize usage information about an application deployed on Java servers including installation information during a specified time period. The main difference between DeployedApplicationInstallationUsageSummary and DeployedApplicationUsage is the presence of the applicationSourcePath. DeployedApplicationUsage provides only an aggregated view to the deployed applications without installation information. It therefore doesn’t distinguish between applications with the identical deployment information deployed to different paths. DeployedApplicationInstallationUsageSummary contains installation information, and it’s therefore possible to target actions. +// DeployedApplicationInstallationUsageSummary Summarize usage information about an application deployed on Java servers including installation information during a specified time period. The main difference between DeployedApplicationInstallationUsageSummary and DeployedApplicationUsage is the presence of the applicationSourcePath. DeployedApplicationUsage provides only an aggregated view to the deployed applications without installation information. DeployedApplicationUsage does not distinguish between applications with the identical deployment information deployed to different paths. DeployedApplicationInstallationUsageSummary contains installation information used to select target actions. type DeployedApplicationInstallationUsageSummary struct { // The internal identifier of the deployed application installation. @@ -43,6 +43,9 @@ type DeployedApplicationInstallationUsageSummary struct { // The approximate count of Java Server instances running the deployed application installations. ApproximateJavaServerInstanceCount *int `mandatory:"false" json:"approximateJavaServerInstanceCount"` + // The approximate count of libraries in the deployed application. + ApproximateLibraryCount *int `mandatory:"false" json:"approximateLibraryCount"` + // Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` diff --git a/jms/deployed_application_installation_usage_summary_collection.go b/jms/deployed_application_installation_usage_summary_collection.go index 5498c6d0c0..6bca9ad5ee 100644 --- a/jms/deployed_application_installation_usage_summary_collection.go +++ b/jms/deployed_application_installation_usage_summary_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/deployed_application_migration_analyses_target.go b/jms/deployed_application_migration_analyses_target.go new file mode 100644 index 0000000000..50145926d7 --- /dev/null +++ b/jms/deployed_application_migration_analyses_target.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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeployedApplicationMigrationAnalysesTarget The target describes the input data for deployed Java migration analyses. +// A target contains a managed instance, deployed application installation Key, sourceJdkVersion, targetJdkVersion and optional excludePackagePrefixes. +type DeployedApplicationMigrationAnalysesTarget struct { + + // The OCID of the managed instance that hosts the application for which the Java migration analyses was performed. + ManagedInstanceId *string `mandatory:"true" json:"managedInstanceId"` + + // The unique key that identifies the deployed application's installation path that is to be used for the Java migration analyses. + DeployedApplicationInstallationKey *string `mandatory:"true" json:"deployedApplicationInstallationKey"` + + // The JDK version the application is currently running on. + SourceJdkVersion *string `mandatory:"true" json:"sourceJdkVersion"` + + // The JDK version against which the migration analyses was performed to identify effort required to move from source JDK. + TargetJdkVersion *string `mandatory:"true" json:"targetJdkVersion"` + + // Excludes the packages that starts with the prefix from the migration analyses result. + ExcludePackagePrefixes []string `mandatory:"false" json:"excludePackagePrefixes"` +} + +func (m DeployedApplicationMigrationAnalysesTarget) 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 DeployedApplicationMigrationAnalysesTarget) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/deployed_application_sort_by.go b/jms/deployed_application_sort_by.go index 100e9d6a02..6475d79ab7 100644 --- a/jms/deployed_application_sort_by.go +++ b/jms/deployed_application_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -18,30 +18,36 @@ type DeployedApplicationSortByEnum string // Set of constants representing the allowable values for DeployedApplicationSortByEnum const ( - DeployedApplicationSortByApplicationName DeployedApplicationSortByEnum = "applicationName" - DeployedApplicationSortByApplicationType DeployedApplicationSortByEnum = "applicationType" - DeployedApplicationSortByIsClustered DeployedApplicationSortByEnum = "isClustered" - DeployedApplicationSortByJavaServerInstanceCount DeployedApplicationSortByEnum = "javaServerInstanceCount" - DeployedApplicationSortByTimeFirstSeen DeployedApplicationSortByEnum = "timeFirstSeen" - DeployedApplicationSortByTimeLastSeen DeployedApplicationSortByEnum = "timeLastSeen" + DeployedApplicationSortByApplicationName DeployedApplicationSortByEnum = "applicationName" + DeployedApplicationSortByApplicationType DeployedApplicationSortByEnum = "applicationType" + DeployedApplicationSortByIsClustered DeployedApplicationSortByEnum = "isClustered" + DeployedApplicationSortByJavaServerInstanceCount DeployedApplicationSortByEnum = "javaServerInstanceCount" + DeployedApplicationSortByApproximateJavaServerInstanceCount DeployedApplicationSortByEnum = "approximateJavaServerInstanceCount" + DeployedApplicationSortByApproximateLibraryCount DeployedApplicationSortByEnum = "approximateLibraryCount" + DeployedApplicationSortByTimeFirstSeen DeployedApplicationSortByEnum = "timeFirstSeen" + DeployedApplicationSortByTimeLastSeen DeployedApplicationSortByEnum = "timeLastSeen" ) var mappingDeployedApplicationSortByEnum = map[string]DeployedApplicationSortByEnum{ - "applicationName": DeployedApplicationSortByApplicationName, - "applicationType": DeployedApplicationSortByApplicationType, - "isClustered": DeployedApplicationSortByIsClustered, - "javaServerInstanceCount": DeployedApplicationSortByJavaServerInstanceCount, - "timeFirstSeen": DeployedApplicationSortByTimeFirstSeen, - "timeLastSeen": DeployedApplicationSortByTimeLastSeen, + "applicationName": DeployedApplicationSortByApplicationName, + "applicationType": DeployedApplicationSortByApplicationType, + "isClustered": DeployedApplicationSortByIsClustered, + "javaServerInstanceCount": DeployedApplicationSortByJavaServerInstanceCount, + "approximateJavaServerInstanceCount": DeployedApplicationSortByApproximateJavaServerInstanceCount, + "approximateLibraryCount": DeployedApplicationSortByApproximateLibraryCount, + "timeFirstSeen": DeployedApplicationSortByTimeFirstSeen, + "timeLastSeen": DeployedApplicationSortByTimeLastSeen, } var mappingDeployedApplicationSortByEnumLowerCase = map[string]DeployedApplicationSortByEnum{ - "applicationname": DeployedApplicationSortByApplicationName, - "applicationtype": DeployedApplicationSortByApplicationType, - "isclustered": DeployedApplicationSortByIsClustered, - "javaserverinstancecount": DeployedApplicationSortByJavaServerInstanceCount, - "timefirstseen": DeployedApplicationSortByTimeFirstSeen, - "timelastseen": DeployedApplicationSortByTimeLastSeen, + "applicationname": DeployedApplicationSortByApplicationName, + "applicationtype": DeployedApplicationSortByApplicationType, + "isclustered": DeployedApplicationSortByIsClustered, + "javaserverinstancecount": DeployedApplicationSortByJavaServerInstanceCount, + "approximatejavaserverinstancecount": DeployedApplicationSortByApproximateJavaServerInstanceCount, + "approximatelibrarycount": DeployedApplicationSortByApproximateLibraryCount, + "timefirstseen": DeployedApplicationSortByTimeFirstSeen, + "timelastseen": DeployedApplicationSortByTimeLastSeen, } // GetDeployedApplicationSortByEnumValues Enumerates the set of values for DeployedApplicationSortByEnum @@ -60,6 +66,8 @@ func GetDeployedApplicationSortByEnumStringValues() []string { "applicationType", "isClustered", "javaServerInstanceCount", + "approximateJavaServerInstanceCount", + "approximateLibraryCount", "timeFirstSeen", "timeLastSeen", } diff --git a/jms/deployed_application_usage.go b/jms/deployed_application_usage.go index 72dbc2ca30..701d434e7b 100644 --- a/jms/deployed_application_usage.go +++ b/jms/deployed_application_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -36,6 +36,9 @@ type DeployedApplicationUsage struct { // The approximate count of Java Server instances running the deployed application. ApproximateJavaServerInstanceCount *int `mandatory:"false" json:"approximateJavaServerInstanceCount"` + // The approximate count of libraries in the deployed application. + ApproximateLibraryCount *int `mandatory:"false" json:"approximateLibraryCount"` + // Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` diff --git a/jms/deployed_application_usage_collection.go b/jms/deployed_application_usage_collection.go index 8fbe33ffcb..77f4fd7fa6 100644 --- a/jms/deployed_application_usage_collection.go +++ b/jms/deployed_application_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/deployed_application_work_item_details.go b/jms/deployed_application_work_item_details.go new file mode 100644 index 0000000000..0b12c363b7 --- /dev/null +++ b/jms/deployed_application_work_item_details.go @@ -0,0 +1,74 @@ +// 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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeployedApplicationWorkItemDetails The work item details for deployed application related information. +type DeployedApplicationWorkItemDetails struct { + + // The unique key of the deployed application. + DeployedApplicationKey *string `mandatory:"true" json:"deployedApplicationKey"` + + // The deployed application name. + DeployedApplicationName *string `mandatory:"true" json:"deployedApplicationName"` + + // The unique key of the deployed application installation. + DeployedApplicationInstallationKey *string `mandatory:"false" json:"deployedApplicationInstallationKey"` + + // The full path on which deployed application installation was detected. + DeployedApplicationInstallationPath *string `mandatory:"false" json:"deployedApplicationInstallationPath"` + + // The work item type. + WorkItemType WorkItemTypeEnum `mandatory:"false" json:"workItemType,omitempty"` +} + +// GetWorkItemType returns WorkItemType +func (m DeployedApplicationWorkItemDetails) GetWorkItemType() WorkItemTypeEnum { + return m.WorkItemType +} + +func (m DeployedApplicationWorkItemDetails) 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 DeployedApplicationWorkItemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkItemTypeEnum(string(m.WorkItemType)); !ok && m.WorkItemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for WorkItemType: %s. Supported values are: %s.", m.WorkItemType, strings.Join(GetWorkItemTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DeployedApplicationWorkItemDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDeployedApplicationWorkItemDetails DeployedApplicationWorkItemDetails + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeDeployedApplicationWorkItemDetails + }{ + "DEPLOYED_APPLICATION", + (MarshalTypeDeployedApplicationWorkItemDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/jms/disable_drs_details.go b/jms/disable_drs_details.go index d8f54b0825..57b6c61b3e 100644 --- a/jms/disable_drs_details.go +++ b/jms/disable_drs_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/disable_drs_request_response.go b/jms/disable_drs_request_response.go index 32a8f598ef..1330d29a64 100644 --- a/jms/disable_drs_request_response.go +++ b/jms/disable_drs_request_response.go @@ -94,7 +94,7 @@ type DisableDrsResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/drs_file.go b/jms/drs_file.go index b1911cdb45..3c3f8e7c3b 100644 --- a/jms/drs_file.go +++ b/jms/drs_file.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/drs_file_collection.go b/jms/drs_file_collection.go index efa3c04d07..6fc4574796 100644 --- a/jms/drs_file_collection.go +++ b/jms/drs_file_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/drs_file_sort_by.go b/jms/drs_file_sort_by.go index d68b99a293..0f1aa83ad1 100644 --- a/jms/drs_file_sort_by.go +++ b/jms/drs_file_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/drs_file_status.go b/jms/drs_file_status.go index 4c2ccea06c..0cd263fcca 100644 --- a/jms/drs_file_status.go +++ b/jms/drs_file_status.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/drs_file_summary.go b/jms/drs_file_summary.go index 0480fa9715..ab4470f4ef 100644 --- a/jms/drs_file_summary.go +++ b/jms/drs_file_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/drs_target.go b/jms/drs_target.go index 7a891d8e2e..b51858a28b 100644 --- a/jms/drs_target.go +++ b/jms/drs_target.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/enable_drs_details.go b/jms/enable_drs_details.go index 06d1dea526..bad02724d9 100644 --- a/jms/enable_drs_details.go +++ b/jms/enable_drs_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/enable_drs_request_response.go b/jms/enable_drs_request_response.go index 4e04d37302..89bd1eea55 100644 --- a/jms/enable_drs_request_response.go +++ b/jms/enable_drs_request_response.go @@ -94,7 +94,7 @@ type EnableDrsResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/existing_installation_site_id.go b/jms/existing_installation_site_id.go index 9863ff2fff..fc6404ad64 100644 --- a/jms/existing_installation_site_id.go +++ b/jms/existing_installation_site_id.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/export_duration.go b/jms/export_duration.go index f9cce7af98..8849a8b09b 100644 --- a/jms/export_duration.go +++ b/jms/export_duration.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/export_frequency.go b/jms/export_frequency.go index 5e4ca5efbb..5f63de2d6a 100644 --- a/jms/export_frequency.go +++ b/jms/export_frequency.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/export_resources.go b/jms/export_resources.go index 00cda99969..de2060d758 100644 --- a/jms/export_resources.go +++ b/jms/export_resources.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/export_run_status.go b/jms/export_run_status.go index 9886846280..b4dc319b11 100644 --- a/jms/export_run_status.go +++ b/jms/export_run_status.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/export_setting.go b/jms/export_setting.go index 956f568d7d..7fe0c220c3 100644 --- a/jms/export_setting.go +++ b/jms/export_setting.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -15,7 +15,7 @@ import ( "strings" ) -// ExportSetting An export settings for JMS fleets. +// ExportSetting Export settings of a fleet. type ExportSetting struct { // ExportSetting flag to store enabled or disabled status. @@ -42,7 +42,7 @@ type ExportSetting struct { // The namespace of the bucket where data will be exported. TargetBucketNamespace *string `mandatory:"false" json:"targetBucketNamespace"` - // The namespace of the bucket where data will be exported. + // The id of the region of the target bucket. TargetBucketRegion *string `mandatory:"false" json:"targetBucketRegion"` // Schedule at which data will be exported. diff --git a/jms/export_status.go b/jms/export_status.go index 83c3581526..c6131a587c 100644 --- a/jms/export_status.go +++ b/jms/export_status.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/fleet.go b/jms/fleet.go index a645a7bfed..94a599a7ca 100644 --- a/jms/fleet.go +++ b/jms/fleet.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/fleet_advanced_feature_configuration.go b/jms/fleet_advanced_feature_configuration.go index 0e41505340..f8b39bb21a 100644 --- a/jms/fleet_advanced_feature_configuration.go +++ b/jms/fleet_advanced_feature_configuration.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/fleet_agent_configuration.go b/jms/fleet_agent_configuration.go index dcb6df2fbb..80ce328a03 100644 --- a/jms/fleet_agent_configuration.go +++ b/jms/fleet_agent_configuration.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -38,6 +38,12 @@ type FleetAgentConfiguration struct { // Agent polling interval in minutes AgentPollingIntervalInMinutes *int `mandatory:"false" json:"agentPollingIntervalInMinutes"` + + // Collect JMS agent metrics on all managed instances in the fleet. + IsCollectingManagedInstanceMetricsEnabled *bool `mandatory:"false" json:"isCollectingManagedInstanceMetricsEnabled"` + + // Collect username for application invocations for all managed instances in the fleet. + IsCollectingUsernamesEnabled *bool `mandatory:"false" json:"isCollectingUsernamesEnabled"` } func (m FleetAgentConfiguration) String() string { diff --git a/jms/fleet_agent_os_configuration.go b/jms/fleet_agent_os_configuration.go index 0cb1dd2c58..e545e2d883 100644 --- a/jms/fleet_agent_os_configuration.go +++ b/jms/fleet_agent_os_configuration.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/fleet_collection.go b/jms/fleet_collection.go index 114da1814f..67eb83eb77 100644 --- a/jms/fleet_collection.go +++ b/jms/fleet_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/fleet_diagnosis_collection.go b/jms/fleet_diagnosis_collection.go index c152173e46..58a5ad4bef 100644 --- a/jms/fleet_diagnosis_collection.go +++ b/jms/fleet_diagnosis_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/fleet_diagnosis_summary.go b/jms/fleet_diagnosis_summary.go index 94f4c32989..175e0a108a 100644 --- a/jms/fleet_diagnosis_summary.go +++ b/jms/fleet_diagnosis_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/fleet_summary.go b/jms/fleet_summary.go index d8bf3cb0fa..92e9e782c0 100644 --- a/jms/fleet_summary.go +++ b/jms/fleet_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/generate_agent_deploy_script_details.go b/jms/generate_agent_deploy_script_details.go index 7e4270d52a..d5c4f46379 100644 --- a/jms/generate_agent_deploy_script_details.go +++ b/jms/generate_agent_deploy_script_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/generate_agent_deploy_script_request_response.go b/jms/generate_agent_deploy_script_request_response.go index 941bcc9d81..e657d3480f 100644 --- a/jms/generate_agent_deploy_script_request_response.go +++ b/jms/generate_agent_deploy_script_request_response.go @@ -80,7 +80,7 @@ type GenerateAgentDeployScriptResponse struct { Content io.ReadCloser `presentIn:"body" encoding:"binary"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // The content size of the body in bytes. diff --git a/jms/generate_agent_installer_configuration_details.go b/jms/generate_agent_installer_configuration_details.go new file mode 100644 index 0000000000..9573f8e3e9 --- /dev/null +++ b/jms/generate_agent_installer_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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenerateAgentInstallerConfigurationDetails Attributes to generate agent installer parameters for a fleet. +type GenerateAgentInstallerConfigurationDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the install key for which to generate the configuration file. + InstallKeyId *string `mandatory:"true" json:"installKeyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet for which to generate the configuration file. + FleetId *string `mandatory:"true" json:"fleetId"` +} + +func (m GenerateAgentInstallerConfigurationDetails) 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 GenerateAgentInstallerConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/generate_agent_installer_configuration_request_response.go b/jms/generate_agent_installer_configuration_request_response.go new file mode 100644 index 0000000000..9f5f76a595 --- /dev/null +++ b/jms/generate_agent_installer_configuration_request_response.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. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GenerateAgentInstallerConfigurationRequest wrapper for the GenerateAgentInstallerConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GenerateAgentInstallerConfiguration.go.html to see an example of how to use GenerateAgentInstallerConfigurationRequest. +type GenerateAgentInstallerConfigurationRequest struct { + + // Details that are used to generate the installer configuration for a fleet. + GenerateAgentInstallerConfigurationDetails `contributesTo:"body"` + + // 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 GenerateAgentInstallerConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GenerateAgentInstallerConfigurationRequest) 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 GenerateAgentInstallerConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GenerateAgentInstallerConfigurationRequest) 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 GenerateAgentInstallerConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GenerateAgentInstallerConfigurationResponse wrapper for the GenerateAgentInstallerConfiguration operation +type GenerateAgentInstallerConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The content size of the body in bytes. + ContentLength *int64 `presentIn:"header" name:"content-length"` + + // The content type of the body. + ContentType *string `presentIn:"header" name:"content-type"` +} + +func (response GenerateAgentInstallerConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GenerateAgentInstallerConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/generate_load_pipeline_script_details.go b/jms/generate_load_pipeline_script_details.go new file mode 100644 index 0000000000..f269ad3337 --- /dev/null +++ b/jms/generate_load_pipeline_script_details.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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenerateLoadPipelineScriptDetails Attributes to generate load pipeline script. +type GenerateLoadPipelineScriptDetails struct { + + // The name of the bucket where data will be exported. + TargetBucketName *string `mandatory:"true" json:"targetBucketName"` + + // The namespace of the bucket where data will be exported. + TargetBucketNamespace *string `mandatory:"true" json:"targetBucketNamespace"` + + // The id of the region of the target bucket. + TargetBucketRegion *string `mandatory:"true" json:"targetBucketRegion"` + + // The time internal in minutes between consecutive executions of scheduled pipeline job. + IntervalMinutes *int `mandatory:"false" json:"intervalMinutes"` +} + +func (m GenerateLoadPipelineScriptDetails) 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 GenerateLoadPipelineScriptDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/generate_load_pipeline_script_request_response.go b/jms/generate_load_pipeline_script_request_response.go new file mode 100644 index 0000000000..e52e2b4825 --- /dev/null +++ b/jms/generate_load_pipeline_script_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 jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GenerateLoadPipelineScriptRequest wrapper for the GenerateLoadPipelineScript operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GenerateLoadPipelineScript.go.html to see an example of how to use GenerateLoadPipelineScriptRequest. +type GenerateLoadPipelineScriptRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // Attributes to generate the load pipeline script. + GenerateLoadPipelineScriptDetails `contributesTo:"body"` + + // 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 GenerateLoadPipelineScriptRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GenerateLoadPipelineScriptRequest) 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 GenerateLoadPipelineScriptRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GenerateLoadPipelineScriptRequest) 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 GenerateLoadPipelineScriptRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GenerateLoadPipelineScriptResponse wrapper for the GenerateLoadPipelineScript operation +type GenerateLoadPipelineScriptResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The content size of the body in bytes. + ContentLength *int64 `presentIn:"header" name:"content-length"` + + // The content type of the body. + ContentType *string `presentIn:"header" name:"content-type"` +} + +func (response GenerateLoadPipelineScriptResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GenerateLoadPipelineScriptResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/get_crypto_analysis_result_request_response.go b/jms/get_crypto_analysis_result_request_response.go index ec17ab6845..818edd0839 100644 --- a/jms/get_crypto_analysis_result_request_response.go +++ b/jms/get_crypto_analysis_result_request_response.go @@ -82,7 +82,7 @@ type GetCryptoAnalysisResultResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_drs_file_request_response.go b/jms/get_drs_file_request_response.go index bde3dac80b..4a1a8cdacd 100644 --- a/jms/get_drs_file_request_response.go +++ b/jms/get_drs_file_request_response.go @@ -85,7 +85,7 @@ type GetDrsFileResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_export_setting_request_response.go b/jms/get_export_setting_request_response.go index 7c526962ad..7e308d6b66 100644 --- a/jms/get_export_setting_request_response.go +++ b/jms/get_export_setting_request_response.go @@ -79,7 +79,7 @@ type GetExportSettingResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_export_status_request_response.go b/jms/get_export_status_request_response.go index 97ce549860..4765cb3558 100644 --- a/jms/get_export_status_request_response.go +++ b/jms/get_export_status_request_response.go @@ -79,7 +79,7 @@ type GetExportStatusResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_fleet_advanced_feature_configuration_request_response.go b/jms/get_fleet_advanced_feature_configuration_request_response.go index 981d429eb4..a1a9ca1238 100644 --- a/jms/get_fleet_advanced_feature_configuration_request_response.go +++ b/jms/get_fleet_advanced_feature_configuration_request_response.go @@ -83,7 +83,7 @@ type GetFleetAdvancedFeatureConfigurationResponse struct { FleetAdvancedFeatureConfiguration `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For optimistic concurrency control. See `if-match`. diff --git a/jms/get_fleet_agent_configuration_request_response.go b/jms/get_fleet_agent_configuration_request_response.go index 50f6062e0c..bdb1bb2100 100644 --- a/jms/get_fleet_agent_configuration_request_response.go +++ b/jms/get_fleet_agent_configuration_request_response.go @@ -79,7 +79,7 @@ type GetFleetAgentConfigurationResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_fleet_request_response.go b/jms/get_fleet_request_response.go index 611ebb5f0e..96322ba279 100644 --- a/jms/get_fleet_request_response.go +++ b/jms/get_fleet_request_response.go @@ -79,7 +79,7 @@ type GetFleetResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_java_family_request_response.go b/jms/get_java_family_request_response.go index 049dd6501c..446ae77193 100644 --- a/jms/get_java_family_request_response.go +++ b/jms/get_java_family_request_response.go @@ -76,7 +76,7 @@ type GetJavaFamilyResponse struct { JavaFamily `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_java_migration_analysis_result_request_response.go b/jms/get_java_migration_analysis_result_request_response.go index 6e78075a10..9f35c886a5 100644 --- a/jms/get_java_migration_analysis_result_request_response.go +++ b/jms/get_java_migration_analysis_result_request_response.go @@ -82,7 +82,7 @@ type GetJavaMigrationAnalysisResultResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_java_release_request_response.go b/jms/get_java_release_request_response.go index 957d6d18ab..67c69a2695 100644 --- a/jms/get_java_release_request_response.go +++ b/jms/get_java_release_request_response.go @@ -76,7 +76,7 @@ type GetJavaReleaseResponse struct { JavaRelease `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_jms_plugin_request_response.go b/jms/get_jms_plugin_request_response.go new file mode 100644 index 0000000000..e37d5e4a9b --- /dev/null +++ b/jms/get_jms_plugin_request_response.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. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetJmsPluginRequest wrapper for the GetJmsPlugin operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetJmsPlugin.go.html to see an example of how to use GetJmsPluginRequest. +type GetJmsPluginRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + JmsPluginId *string `mandatory:"true" contributesTo:"path" name:"jmsPluginId"` + + // 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 GetJmsPluginRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetJmsPluginRequest) 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 GetJmsPluginRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetJmsPluginRequest) 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 GetJmsPluginRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetJmsPluginResponse wrapper for the GetJmsPlugin operation +type GetJmsPluginResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JmsPlugin instance + JmsPlugin `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // A decimal number representing the number of seconds the client should wait before polling this endpoint again. + RetryAfter *float32 `presentIn:"header" name:"retry-after"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response GetJmsPluginResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetJmsPluginResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/get_performance_tuning_analysis_result_request_response.go b/jms/get_performance_tuning_analysis_result_request_response.go index 29252089c9..1c6d1ed12b 100644 --- a/jms/get_performance_tuning_analysis_result_request_response.go +++ b/jms/get_performance_tuning_analysis_result_request_response.go @@ -82,7 +82,7 @@ type GetPerformanceTuningAnalysisResultResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/get_work_request_request_response.go b/jms/get_work_request_request_response.go index 0f46289c14..90cf8ead9d 100644 --- a/jms/get_work_request_request_response.go +++ b/jms/get_work_request_request_response.go @@ -76,7 +76,7 @@ type GetWorkRequestResponse struct { WorkRequest `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // A decimal number representing the number of seconds the client should wait before polling this endpoint again. diff --git a/jms/global_logging_level.go b/jms/global_logging_level.go index 070313f2ff..e76e1a3d7e 100644 --- a/jms/global_logging_level.go +++ b/jms/global_logging_level.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/installation_site.go b/jms/installation_site.go index dd70a7f13a..4806a77098 100644 --- a/jms/installation_site.go +++ b/jms/installation_site.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/installation_site_collection.go b/jms/installation_site_collection.go index 96650de332..f2cb1f13ee 100644 --- a/jms/installation_site_collection.go +++ b/jms/installation_site_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/installation_site_sort_by.go b/jms/installation_site_sort_by.go index 695fd22f1a..646bfce838 100644 --- a/jms/installation_site_sort_by.go +++ b/jms/installation_site_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/installation_site_summary.go b/jms/installation_site_summary.go index 9ce6101996..140a42c11f 100644 --- a/jms/installation_site_summary.go +++ b/jms/installation_site_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/installation_sort_by.go b/jms/installation_sort_by.go index 69b4b97b90..8fbc3572b7 100644 --- a/jms/installation_sort_by.go +++ b/jms/installation_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/installation_usage.go b/jms/installation_usage.go index ee0be9e391..566818b27d 100644 --- a/jms/installation_usage.go +++ b/jms/installation_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/installation_usage_collection.go b/jms/installation_usage_collection.go index c23925aa20..8e47a3348f 100644 --- a/jms/installation_usage_collection.go +++ b/jms/installation_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_artifact.go b/jms/java_artifact.go index 430a0952ea..faa83d996b 100644 --- a/jms/java_artifact.go +++ b/jms/java_artifact.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -44,7 +44,7 @@ type JavaArtifact struct { // The endpoint that returns a short-lived artifact download URL in the response payload. // This download url can then be used for downloading the artifact. - // See this API (https://docs.oracle.com/en-us/iaas/api/#/en/jms/20230601/JavaArtifact/GenerateArtifactDownloadUrl) for more details. + // See this API (https://docs.oracle.com/en-us/iaas/api/#/en/jms-java-download/20230601/DownloadUrl/GenerateArtifactDownloadUrl) for more details. DownloadUrl *string `mandatory:"true" json:"downloadUrl"` // The endpoint for downloading this artifact from command line, automatically in scripts and dockerfiles. diff --git a/jms/java_family.go b/jms/java_family.go index 2c52f939b3..5b72355c6c 100644 --- a/jms/java_family.go +++ b/jms/java_family.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -41,6 +41,9 @@ type JavaFamily struct { // Refer Java Support Roadmap (https://www.oracle.com/java/technologies/java-se-support-roadmap.html) for more details. IsSupportedVersion *bool `mandatory:"true" json:"isSupportedVersion"` + // The date on which the Java release family was first made available (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + ReleaseDate *common.SDKTime `mandatory:"false" json:"releaseDate"` + // List of artifacts for the latest Java release version in this family. // The script URLs in the response can be used from a command line, or in scripts and dockerfiles to always get the artifacts corresponding to the latest update release version. LatestReleaseArtifacts []JavaArtifact `mandatory:"false" json:"latestReleaseArtifacts"` diff --git a/jms/java_family_collection.go b/jms/java_family_collection.go index 7cdac3ce36..b82442e038 100644 --- a/jms/java_family_collection.go +++ b/jms/java_family_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_family_sort_by.go b/jms/java_family_sort_by.go index 47df0f3f9e..bfd73ae480 100644 --- a/jms/java_family_sort_by.go +++ b/jms/java_family_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_family_summary.go b/jms/java_family_summary.go index e9197c78a0..b481e9985e 100644 --- a/jms/java_family_summary.go +++ b/jms/java_family_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -40,6 +40,9 @@ type JavaFamilySummary struct { // Whether or not this Java release family is under active support. // Refer Java Support Roadmap (https://www.oracle.com/java/technologies/java-se-support-roadmap.html) for more details. IsSupportedVersion *bool `mandatory:"true" json:"isSupportedVersion"` + + // The date on which the Java release family was first made available (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + ReleaseDate *common.SDKTime `mandatory:"false" json:"releaseDate"` } func (m JavaFamilySummary) String() string { diff --git a/jms/java_license.go b/jms/java_license.go index 0829846cdb..3c43547cae 100644 --- a/jms/java_license.go +++ b/jms/java_license.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_migration_analysis.go b/jms/java_migration_analysis.go index 56d6030a5a..0a2e7b347e 100644 --- a/jms/java_migration_analysis.go +++ b/jms/java_migration_analysis.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_migration_analysis_result.go b/jms/java_migration_analysis_result.go index 7528de79ff..01dd75bf8d 100644 --- a/jms/java_migration_analysis_result.go +++ b/jms/java_migration_analysis_result.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_migration_analysis_result_collection.go b/jms/java_migration_analysis_result_collection.go index b7514ec618..0c7e90fb92 100644 --- a/jms/java_migration_analysis_result_collection.go +++ b/jms/java_migration_analysis_result_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_migration_analysis_result_sort_by.go b/jms/java_migration_analysis_result_sort_by.go index ae8f075a37..60d79d39fa 100644 --- a/jms/java_migration_analysis_result_sort_by.go +++ b/jms/java_migration_analysis_result_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_migration_analysis_result_summary.go b/jms/java_migration_analysis_result_summary.go index 17f3ae2eed..feb519d5aa 100644 --- a/jms/java_migration_analysis_result_summary.go +++ b/jms/java_migration_analysis_result_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_migration_analysis_target.go b/jms/java_migration_analysis_target.go index 494e75fb78..18a10eaaf9 100644 --- a/jms/java_migration_analysis_target.go +++ b/jms/java_migration_analysis_target.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -16,7 +16,7 @@ import ( ) // JavaMigrationAnalysisTarget The target describes the input data for Java migration analysis. -// A target contains a managed instance, application Installation Key, sourceJdkVersion, and targetJdkVersion. +// A target contains a managed instance, application Installation Key, sourceJdkVersion, targetJdkVersion and optional excludePackagePrefixes. type JavaMigrationAnalysisTarget struct { // The OCID of the managed instance that hosts the application for which the Java migration analysis was performed. @@ -30,6 +30,9 @@ type JavaMigrationAnalysisTarget struct { // The JDK version against which the migration analysis was performed to identify effort required to move from source JDK. TargetJdkVersion *string `mandatory:"true" json:"targetJdkVersion"` + + // Excludes the packages that starts with the prefix from the migration analysis result. + ExcludePackagePrefixes []string `mandatory:"false" json:"excludePackagePrefixes"` } func (m JavaMigrationAnalysisTarget) String() string { diff --git a/jms/java_release.go b/jms/java_release.go index 10d9940154..c9cffe43fe 100644 --- a/jms/java_release.go +++ b/jms/java_release.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_release_collection.go b/jms/java_release_collection.go index af5afb7a11..4986593620 100644 --- a/jms/java_release_collection.go +++ b/jms/java_release_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_release_sort_by.go b/jms/java_release_sort_by.go index aa04eec18a..80b340b900 100644 --- a/jms/java_release_sort_by.go +++ b/jms/java_release_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_release_summary.go b/jms/java_release_summary.go index a00abf345b..9e2ac46d18 100644 --- a/jms/java_release_summary.go +++ b/jms/java_release_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_runtime_id.go b/jms/java_runtime_id.go index 35532a2e97..0710d9d6d8 100644 --- a/jms/java_runtime_id.go +++ b/jms/java_runtime_id.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_server_instance_sort_by.go b/jms/java_server_instance_sort_by.go index 78c6060bd6..44a7e79ca8 100644 --- a/jms/java_server_instance_sort_by.go +++ b/jms/java_server_instance_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_server_instance_usage.go b/jms/java_server_instance_usage.go index c7c5c6ca45..4f33c62623 100644 --- a/jms/java_server_instance_usage.go +++ b/jms/java_server_instance_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -33,6 +33,9 @@ type JavaServerInstanceUsage struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the related managed instance. ManagedInstanceId *string `mandatory:"true" json:"managedInstanceId"` + // The port of the Java Server instance. + ServerInstancePort *int `mandatory:"false" json:"serverInstancePort"` + // The name of the Java Server. ServerName *string `mandatory:"false" json:"serverName"` diff --git a/jms/java_server_instance_usage_collection.go b/jms/java_server_instance_usage_collection.go index 40ceb3c112..b3508d1c19 100644 --- a/jms/java_server_instance_usage_collection.go +++ b/jms/java_server_instance_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_server_sort_by.go b/jms/java_server_sort_by.go index 1a7fe05673..2f34a06747 100644 --- a/jms/java_server_sort_by.go +++ b/jms/java_server_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_server_usage.go b/jms/java_server_usage.go index bad4677f7e..0163b59f92 100644 --- a/jms/java_server_usage.go +++ b/jms/java_server_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/java_server_usage_collection.go b/jms/java_server_usage_collection.go index da00f652f1..31e5665371 100644 --- a/jms/java_server_usage_collection.go +++ b/jms/java_server_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/jfr_attachment_target.go b/jms/jfr_attachment_target.go index 281186ae2d..b32669ec86 100644 --- a/jms/jfr_attachment_target.go +++ b/jms/jfr_attachment_target.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/jfr_recording.go b/jms/jfr_recording.go index e505f1593c..bc73e6f305 100644 --- a/jms/jfr_recording.go +++ b/jms/jfr_recording.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/jms_javamanagementservice_client.go b/jms/jms_javamanagementservice_client.go index f4b1425750..9136974651 100644 --- a/jms/jms_javamanagementservice_client.go +++ b/jms/jms_javamanagementservice_client.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -145,7 +145,7 @@ func (client JavaManagementServiceClient) addFleetInstallationSites(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/AddFleetInstallationSites" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "AddFleetInstallationSites", apiReferenceLink) return response, err } @@ -203,7 +203,7 @@ func (client JavaManagementServiceClient) cancelWorkRequest(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/CancelWorkRequest" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "CancelWorkRequest", apiReferenceLink) return response, err } @@ -266,7 +266,7 @@ func (client JavaManagementServiceClient) changeFleetCompartment(ctx context.Con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ChangeFleetCompartment" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ChangeFleetCompartment", apiReferenceLink) return response, err } @@ -329,7 +329,7 @@ func (client JavaManagementServiceClient) createBlocklist(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/CreateBlocklist" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "CreateBlocklist", apiReferenceLink) return response, err } @@ -338,7 +338,7 @@ func (client JavaManagementServiceClient) createBlocklist(ctx context.Context, r return response, err } -// CreateDrsFile Request to perform validaition of the DRS file and create the file to the Object Storage. +// CreateDrsFile Request to perform validation of the DRS file and create the file to the Object Storage. // // # See also // @@ -392,7 +392,7 @@ func (client JavaManagementServiceClient) createDrsFile(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateDrsFile" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "CreateDrsFile", apiReferenceLink) return response, err } @@ -460,7 +460,7 @@ func (client JavaManagementServiceClient) createFleet(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateFleet" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "CreateFleet", apiReferenceLink) return response, err } @@ -469,6 +469,71 @@ func (client JavaManagementServiceClient) createFleet(ctx context.Context, reque return response, err } +// CreateJmsPlugin Registers an agent's JmsPlugin, optionally attaching to an existing fleet of the tenancy. +// JmsPlugins registered fleet-less are created with lifecycle state INACTIVE. +// For the operation to be authorized, the agent must exist, and the authorized user requires JMS_PLUGIN_CREATE permission for the agent's compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/CreateJmsPlugin.go.html to see an example of how to use CreateJmsPlugin API. +// A default retry strategy applies to this operation CreateJmsPlugin() +func (client JavaManagementServiceClient) CreateJmsPlugin(ctx context.Context, request CreateJmsPluginRequest) (response CreateJmsPluginResponse, 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.createJmsPlugin, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateJmsPluginResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateJmsPluginResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateJmsPluginResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateJmsPluginResponse") + } + return +} + +// createJmsPlugin implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) createJmsPlugin(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/jmsPlugins", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateJmsPluginResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "CreateJmsPlugin", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteBlocklist Deletes the blocklist record specified by an identifier. // // # See also @@ -518,7 +583,7 @@ func (client JavaManagementServiceClient) deleteBlocklist(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/DeleteBlocklist" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteBlocklist", apiReferenceLink) return response, err } @@ -576,7 +641,7 @@ func (client JavaManagementServiceClient) deleteCryptoAnalysisResult(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/DeleteCryptoAnalysisResult" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteCryptoAnalysisResult", apiReferenceLink) return response, err } @@ -634,7 +699,7 @@ func (client JavaManagementServiceClient) deleteDrsFile(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/DeleteDrsFile" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteDrsFile", apiReferenceLink) return response, err } @@ -692,7 +757,7 @@ func (client JavaManagementServiceClient) deleteFleet(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DeleteFleet" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteFleet", apiReferenceLink) return response, err } @@ -750,7 +815,7 @@ func (client JavaManagementServiceClient) deleteJavaMigrationAnalysisResult(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/DeleteJavaMigrationAnalysisResult" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteJavaMigrationAnalysisResult", apiReferenceLink) return response, err } @@ -759,6 +824,65 @@ func (client JavaManagementServiceClient) deleteJavaMigrationAnalysisResult(ctx return response, err } +// DeleteJmsPlugin Deletes a JmsPlugin. The JmsPlugin may be visible for some time with state DELETED. +// Deleted plugins will not be able to communicate with the JMS service. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/DeleteJmsPlugin.go.html to see an example of how to use DeleteJmsPlugin API. +// A default retry strategy applies to this operation DeleteJmsPlugin() +func (client JavaManagementServiceClient) DeleteJmsPlugin(ctx context.Context, request DeleteJmsPluginRequest) (response DeleteJmsPluginResponse, 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.deleteJmsPlugin, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteJmsPluginResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteJmsPluginResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteJmsPluginResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteJmsPluginResponse") + } + return +} + +// deleteJmsPlugin implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) deleteJmsPlugin(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/jmsPlugins/{jmsPluginId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteJmsPluginResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteJmsPlugin", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeletePerformanceTuningAnalysisResult Deletes only the metadata of the Performance Tuning Analysis result, but the file remains in the object storage. // // # See also @@ -808,7 +932,7 @@ func (client JavaManagementServiceClient) deletePerformanceTuningAnalysisResult( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/DeletePerformanceTuningAnalysisResult" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "DeletePerformanceTuningAnalysisResult", apiReferenceLink) return response, err } @@ -871,7 +995,7 @@ func (client JavaManagementServiceClient) disableDrs(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DisableDrs" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "DisableDrs", apiReferenceLink) return response, err } @@ -934,7 +1058,7 @@ func (client JavaManagementServiceClient) enableDrs(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/EnableDrs" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "EnableDrs", apiReferenceLink) return response, err } @@ -991,7 +1115,7 @@ func (client JavaManagementServiceClient) generateAgentDeployScript(ctx context. httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GenerateAgentDeployScript" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GenerateAgentDeployScript", apiReferenceLink) return response, err } @@ -1000,6 +1124,120 @@ func (client JavaManagementServiceClient) generateAgentDeployScript(ctx context. return response, err } +// GenerateAgentInstallerConfiguration Generates the agent installer configuration using the information provided. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GenerateAgentInstallerConfiguration.go.html to see an example of how to use GenerateAgentInstallerConfiguration API. +// A default retry strategy applies to this operation GenerateAgentInstallerConfiguration() +func (client JavaManagementServiceClient) GenerateAgentInstallerConfiguration(ctx context.Context, request GenerateAgentInstallerConfigurationRequest) (response GenerateAgentInstallerConfigurationResponse, 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.generateAgentInstallerConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GenerateAgentInstallerConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GenerateAgentInstallerConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GenerateAgentInstallerConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GenerateAgentInstallerConfigurationResponse") + } + return +} + +// generateAgentInstallerConfiguration implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) generateAgentInstallerConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/agentInstallers/actions/generateAgentInstallerConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GenerateAgentInstallerConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "GenerateAgentInstallerConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GenerateLoadPipelineScript Generates Load Pipeline Script +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GenerateLoadPipelineScript.go.html to see an example of how to use GenerateLoadPipelineScript API. +// A default retry strategy applies to this operation GenerateLoadPipelineScript() +func (client JavaManagementServiceClient) GenerateLoadPipelineScript(ctx context.Context, request GenerateLoadPipelineScriptRequest) (response GenerateLoadPipelineScriptResponse, 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.generateLoadPipelineScript, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GenerateLoadPipelineScriptResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GenerateLoadPipelineScriptResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GenerateLoadPipelineScriptResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GenerateLoadPipelineScriptResponse") + } + return +} + +// generateLoadPipelineScript implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) generateLoadPipelineScript(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets/{fleetId}/actions/generateLoadPipelineScript", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GenerateLoadPipelineScriptResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "GenerateLoadPipelineScript", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetCryptoAnalysisResult Retrieve the metadata for the result of a Crypto event analysis. // // # See also @@ -1049,7 +1287,7 @@ func (client JavaManagementServiceClient) getCryptoAnalysisResult(ctx context.Co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/GetCryptoAnalysisResult" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetCryptoAnalysisResult", apiReferenceLink) return response, err } @@ -1107,7 +1345,7 @@ func (client JavaManagementServiceClient) getDrsFile(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/GetDrsFile" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetDrsFile", apiReferenceLink) return response, err } @@ -1116,7 +1354,7 @@ func (client JavaManagementServiceClient) getDrsFile(ctx context.Context, reques return response, err } -// GetExportSetting Returns export setting for the specified Fleet. +// GetExportSetting Returns export setting for the specified fleet. // // # See also // @@ -1165,7 +1403,7 @@ func (client JavaManagementServiceClient) getExportSetting(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/GetExportSetting" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetExportSetting", apiReferenceLink) return response, err } @@ -1174,7 +1412,7 @@ func (client JavaManagementServiceClient) getExportSetting(ctx context.Context, return response, err } -// GetExportStatus Returns last export status for the specified Fleet. +// GetExportStatus Returns last export status for the specified fleet. // // # See also // @@ -1223,7 +1461,7 @@ func (client JavaManagementServiceClient) getExportStatus(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportStatus/GetExportStatus" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetExportStatus", apiReferenceLink) return response, err } @@ -1281,7 +1519,7 @@ func (client JavaManagementServiceClient) getFleet(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GetFleet" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetFleet", apiReferenceLink) return response, err } @@ -1339,7 +1577,7 @@ func (client JavaManagementServiceClient) getFleetAdvancedFeatureConfiguration(c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/GetFleetAdvancedFeatureConfiguration" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetFleetAdvancedFeatureConfiguration", apiReferenceLink) return response, err } @@ -1397,7 +1635,7 @@ func (client JavaManagementServiceClient) getFleetAgentConfiguration(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/GetFleetAgentConfiguration" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetFleetAgentConfiguration", apiReferenceLink) return response, err } @@ -1455,7 +1693,7 @@ func (client JavaManagementServiceClient) getJavaFamily(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/GetJavaFamily" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetJavaFamily", apiReferenceLink) return response, err } @@ -1513,7 +1751,7 @@ func (client JavaManagementServiceClient) getJavaMigrationAnalysisResult(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/GetJavaMigrationAnalysisResult" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetJavaMigrationAnalysisResult", apiReferenceLink) return response, err } @@ -1571,7 +1809,7 @@ func (client JavaManagementServiceClient) getJavaRelease(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/GetJavaRelease" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetJavaRelease", apiReferenceLink) return response, err } @@ -1580,6 +1818,64 @@ func (client JavaManagementServiceClient) getJavaRelease(ctx context.Context, re return response, err } +// GetJmsPlugin Returns the JmsPlugin. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetJmsPlugin.go.html to see an example of how to use GetJmsPlugin API. +// A default retry strategy applies to this operation GetJmsPlugin() +func (client JavaManagementServiceClient) GetJmsPlugin(ctx context.Context, request GetJmsPluginRequest) (response GetJmsPluginResponse, 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.getJmsPlugin, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetJmsPluginResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetJmsPluginResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetJmsPluginResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetJmsPluginResponse") + } + return +} + +// getJmsPlugin implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) getJmsPlugin(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/jmsPlugins/{jmsPluginId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetJmsPluginResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "GetJmsPlugin", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetPerformanceTuningAnalysisResult Retrieve metadata of the Performance Tuning Analysis result. // // # See also @@ -1629,7 +1925,7 @@ func (client JavaManagementServiceClient) getPerformanceTuningAnalysisResult(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/GetPerformanceTuningAnalysisResult" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetPerformanceTuningAnalysisResult", apiReferenceLink) return response, err } @@ -1687,7 +1983,7 @@ func (client JavaManagementServiceClient) getWorkRequest(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/GetWorkRequest" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "GetWorkRequest", apiReferenceLink) return response, err } @@ -1696,6 +1992,64 @@ func (client JavaManagementServiceClient) getWorkRequest(ctx context.Context, re return response, err } +// ListAgentInstallers Returns a list of the agent installer information. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/ListAgentInstallers.go.html to see an example of how to use ListAgentInstallers API. +// A default retry strategy applies to this operation ListAgentInstallers() +func (client JavaManagementServiceClient) ListAgentInstallers(ctx context.Context, request ListAgentInstallersRequest) (response ListAgentInstallersResponse, 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.listAgentInstallers, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAgentInstallersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAgentInstallersResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAgentInstallersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAgentInstallersResponse") + } + return +} + +// listAgentInstallers implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) listAgentInstallers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/agentInstallers", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListAgentInstallersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "ListAgentInstallers", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListAnnouncements Return a list of AnnouncementSummary items // // # See also @@ -1745,7 +2099,7 @@ func (client JavaManagementServiceClient) listAnnouncements(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/AnnouncementCollection/ListAnnouncements" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListAnnouncements", apiReferenceLink) return response, err } @@ -1803,7 +2157,7 @@ func (client JavaManagementServiceClient) listBlocklists(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/ListBlocklists" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListBlocklists", apiReferenceLink) return response, err } @@ -1861,7 +2215,7 @@ func (client JavaManagementServiceClient) listCryptoAnalysisResults(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/ListCryptoAnalysisResults" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListCryptoAnalysisResults", apiReferenceLink) return response, err } @@ -1919,7 +2273,7 @@ func (client JavaManagementServiceClient) listDrsFiles(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFileCollection/ListDrsFiles" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListDrsFiles", apiReferenceLink) return response, err } @@ -1977,7 +2331,7 @@ func (client JavaManagementServiceClient) listFleetDiagnoses(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetDiagnosisSummary/ListFleetDiagnoses" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListFleetDiagnoses", apiReferenceLink) return response, err } @@ -2036,7 +2390,7 @@ func (client JavaManagementServiceClient) listFleets(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ListFleets" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListFleets", apiReferenceLink) return response, err } @@ -2094,7 +2448,7 @@ func (client JavaManagementServiceClient) listInstallationSites(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/ListInstallationSites" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListInstallationSites", apiReferenceLink) return response, err } @@ -2153,7 +2507,7 @@ func (client JavaManagementServiceClient) listJavaFamilies(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/ListJavaFamilies" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJavaFamilies", apiReferenceLink) return response, err } @@ -2211,7 +2565,7 @@ func (client JavaManagementServiceClient) listJavaMigrationAnalysisResults(ctx c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/ListJavaMigrationAnalysisResults" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJavaMigrationAnalysisResults", apiReferenceLink) return response, err } @@ -2269,7 +2623,7 @@ func (client JavaManagementServiceClient) listJavaReleases(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/ListJavaReleases" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJavaReleases", apiReferenceLink) return response, err } @@ -2278,6 +2632,64 @@ func (client JavaManagementServiceClient) listJavaReleases(ctx context.Context, return response, err } +// ListJmsPlugins Lists the JmsPlugins. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/ListJmsPlugins.go.html to see an example of how to use ListJmsPlugins API. +// A default retry strategy applies to this operation ListJmsPlugins() +func (client JavaManagementServiceClient) ListJmsPlugins(ctx context.Context, request ListJmsPluginsRequest) (response ListJmsPluginsResponse, 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.listJmsPlugins, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListJmsPluginsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListJmsPluginsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListJmsPluginsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListJmsPluginsResponse") + } + return +} + +// listJmsPlugins implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) listJmsPlugins(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/jmsPlugins", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListJmsPluginsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "ListJmsPlugins", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListJreUsage List Java Runtime usage in a specified host filtered by query parameters. // // # See also @@ -2327,7 +2739,7 @@ func (client JavaManagementServiceClient) listJreUsage(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/ListJreUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJreUsage", apiReferenceLink) return response, err } @@ -2385,7 +2797,7 @@ func (client JavaManagementServiceClient) listPerformanceTuningAnalysisResults(c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/ListPerformanceTuningAnalysisResults" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListPerformanceTuningAnalysisResults", apiReferenceLink) return response, err } @@ -2443,7 +2855,7 @@ func (client JavaManagementServiceClient) listWorkItems(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkItemSummary/ListWorkItems" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkItems", apiReferenceLink) return response, err } @@ -2501,7 +2913,7 @@ func (client JavaManagementServiceClient) listWorkRequestErrors(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestError/ListWorkRequestErrors" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -2559,7 +2971,7 @@ func (client JavaManagementServiceClient) listWorkRequestLogs(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestLogEntry/ListWorkRequestLogs" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -2617,7 +3029,7 @@ func (client JavaManagementServiceClient) listWorkRequests(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/ListWorkRequests" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkRequests", apiReferenceLink) return response, err } @@ -2680,7 +3092,7 @@ func (client JavaManagementServiceClient) removeFleetInstallationSites(ctx conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/RemoveFleetInstallationSites" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "RemoveFleetInstallationSites", apiReferenceLink) return response, err } @@ -2738,7 +3150,7 @@ func (client JavaManagementServiceClient) requestCryptoAnalyses(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestCryptoAnalyses" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestCryptoAnalyses", apiReferenceLink) return response, err } @@ -2747,6 +3159,65 @@ func (client JavaManagementServiceClient) requestCryptoAnalyses(ctx context.Cont return response, err } +// RequestDeployedApplicationMigrationAnalyses Request to perform a deployed Java migration analyses. The results of the deployed Java migration analyses will be uploaded to the +// Object Storage bucket that you designate when you enable the Java Migration Analyses feature. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/RequestDeployedApplicationMigrationAnalyses.go.html to see an example of how to use RequestDeployedApplicationMigrationAnalyses API. +// A default retry strategy applies to this operation RequestDeployedApplicationMigrationAnalyses() +func (client JavaManagementServiceClient) RequestDeployedApplicationMigrationAnalyses(ctx context.Context, request RequestDeployedApplicationMigrationAnalysesRequest) (response RequestDeployedApplicationMigrationAnalysesResponse, 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.requestDeployedApplicationMigrationAnalyses, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RequestDeployedApplicationMigrationAnalysesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RequestDeployedApplicationMigrationAnalysesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RequestDeployedApplicationMigrationAnalysesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RequestDeployedApplicationMigrationAnalysesResponse") + } + return +} + +// requestDeployedApplicationMigrationAnalyses implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) requestDeployedApplicationMigrationAnalyses(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets/{fleetId}/actions/requestDeployedApplicationMigrationAnalyses", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RequestDeployedApplicationMigrationAnalysesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "RequestDeployedApplicationMigrationAnalyses", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RequestJavaMigrationAnalyses Request to perform a Java migration analysis. The results of the Java migration analysis will be uploaded to the // Object Storage bucket that you designate when you enable the Java Migration Analysis feature. // @@ -2797,7 +3268,7 @@ func (client JavaManagementServiceClient) requestJavaMigrationAnalyses(ctx conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJavaMigrationAnalyses" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestJavaMigrationAnalyses", apiReferenceLink) return response, err } @@ -2855,7 +3326,7 @@ func (client JavaManagementServiceClient) requestJfrRecordings(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJfrRecordings" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestJfrRecordings", apiReferenceLink) return response, err } @@ -2914,7 +3385,7 @@ func (client JavaManagementServiceClient) requestPerformanceTuningAnalyses(ctx c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestPerformanceTuningAnalyses" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestPerformanceTuningAnalyses", apiReferenceLink) return response, err } @@ -2977,7 +3448,7 @@ func (client JavaManagementServiceClient) scanJavaServerUsage(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/ScanJavaServerUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ScanJavaServerUsage", apiReferenceLink) return response, err } @@ -3040,7 +3511,7 @@ func (client JavaManagementServiceClient) scanLibraryUsage(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/ScanLibraryUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "ScanLibraryUsage", apiReferenceLink) return response, err } @@ -3098,7 +3569,7 @@ func (client JavaManagementServiceClient) summarizeApplicationInstallationUsage( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationInstallationUsageSummary/SummarizeApplicationInstallationUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeApplicationInstallationUsage", apiReferenceLink) return response, err } @@ -3156,7 +3627,7 @@ func (client JavaManagementServiceClient) summarizeApplicationUsage(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationUsage/SummarizeApplicationUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeApplicationUsage", apiReferenceLink) return response, err } @@ -3214,7 +3685,7 @@ func (client JavaManagementServiceClient) summarizeDeployedApplicationInstallati defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationInstallationUsageSummary/SummarizeDeployedApplicationInstallationUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeDeployedApplicationInstallationUsage", apiReferenceLink) return response, err } @@ -3272,7 +3743,7 @@ func (client JavaManagementServiceClient) summarizeDeployedApplicationUsage(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationUsage/SummarizeDeployedApplicationUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeDeployedApplicationUsage", apiReferenceLink) return response, err } @@ -3330,7 +3801,7 @@ func (client JavaManagementServiceClient) summarizeInstallationUsage(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationUsage/SummarizeInstallationUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeInstallationUsage", apiReferenceLink) return response, err } @@ -3388,7 +3859,7 @@ func (client JavaManagementServiceClient) summarizeJavaServerInstanceUsage(ctx c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerInstanceUsage/SummarizeJavaServerInstanceUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeJavaServerInstanceUsage", apiReferenceLink) return response, err } @@ -3446,7 +3917,7 @@ func (client JavaManagementServiceClient) summarizeJavaServerUsage(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/SummarizeJavaServerUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeJavaServerUsage", apiReferenceLink) return response, err } @@ -3504,7 +3975,7 @@ func (client JavaManagementServiceClient) summarizeJreUsage(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/SummarizeJreUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeJreUsage", apiReferenceLink) return response, err } @@ -3562,7 +4033,7 @@ func (client JavaManagementServiceClient) summarizeLibraryUsage(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/SummarizeLibraryUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeLibraryUsage", apiReferenceLink) return response, err } @@ -3620,7 +4091,7 @@ func (client JavaManagementServiceClient) summarizeManagedInstanceUsage(ctx cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ManagedInstanceUsage/SummarizeManagedInstanceUsage" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeManagedInstanceUsage", apiReferenceLink) return response, err } @@ -3678,7 +4149,7 @@ func (client JavaManagementServiceClient) summarizeResourceInventory(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/SummarizeResourceInventory" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeResourceInventory", apiReferenceLink) return response, err } @@ -3687,7 +4158,7 @@ func (client JavaManagementServiceClient) summarizeResourceInventory(ctx context return response, err } -// UpdateDrsFile Request to perform validaition of the DRS file and update the existing file in the Object Storage. +// UpdateDrsFile Request to perform validation of the DRS file and update the existing file in the Object Storage. // // # See also // @@ -3741,7 +4212,7 @@ func (client JavaManagementServiceClient) updateDrsFile(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateDrsFile" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateDrsFile", apiReferenceLink) return response, err } @@ -3750,7 +4221,7 @@ func (client JavaManagementServiceClient) updateDrsFile(ctx context.Context, req return response, err } -// UpdateExportSetting Updates existing export setting for the specified Fleet. +// UpdateExportSetting Updates existing export setting for the specified fleet. // // # See also // @@ -3799,7 +4270,7 @@ func (client JavaManagementServiceClient) updateExportSetting(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/UpdateExportSetting" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateExportSetting", apiReferenceLink) return response, err } @@ -3857,7 +4328,7 @@ func (client JavaManagementServiceClient) updateFleet(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateFleet" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateFleet", apiReferenceLink) return response, err } @@ -3921,7 +4392,7 @@ func (client JavaManagementServiceClient) updateFleetAdvancedFeatureConfiguratio defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/UpdateFleetAdvancedFeatureConfiguration" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateFleetAdvancedFeatureConfiguration", apiReferenceLink) return response, err } @@ -3979,7 +4450,7 @@ func (client JavaManagementServiceClient) updateFleetAgentConfiguration(ctx cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/UpdateFleetAgentConfiguration" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateFleetAgentConfiguration", apiReferenceLink) return response, err } @@ -3987,3 +4458,61 @@ func (client JavaManagementServiceClient) updateFleetAgentConfiguration(ctx cont err = common.UnmarshalResponse(httpResponse, &response) return response, err } + +// UpdateJmsPlugin Updates the Fleet of a JmsPlugin. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/UpdateJmsPlugin.go.html to see an example of how to use UpdateJmsPlugin API. +// A default retry strategy applies to this operation UpdateJmsPlugin() +func (client JavaManagementServiceClient) UpdateJmsPlugin(ctx context.Context, request UpdateJmsPluginRequest) (response UpdateJmsPluginResponse, 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.updateJmsPlugin, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateJmsPluginResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateJmsPluginResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateJmsPluginResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateJmsPluginResponse") + } + return +} + +// updateJmsPlugin implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) updateJmsPlugin(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/jmsPlugins/{jmsPluginId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateJmsPluginResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateJmsPlugin", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/jms/jms_plugin.go b/jms/jms_plugin.go new file mode 100644 index 0000000000..757978d01a --- /dev/null +++ b/jms/jms_plugin.go @@ -0,0 +1,107 @@ +// 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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JmsPlugin Information about a JmsPlugin that has been registered. +type JmsPlugin struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + AgentId *string `mandatory:"true" json:"agentId"` + + // The agent type. + AgentType AgentTypeEnum `mandatory:"true" json:"agentType"` + + // The lifecycle state. + LifecycleState JmsPluginLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The availability status. + AvailabilityStatus JmsPluginAvailabilityStatusEnum `mandatory:"true" json:"availabilityStatus"` + + // The date and time the plugin was registered. + TimeRegistered *common.SDKTime `mandatory:"true" json:"timeRegistered"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + FleetId *string `mandatory:"false" json:"fleetId"` + + // The OMA/OCA agent's compartment OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The hostname of the agent. + Hostname *string `mandatory:"false" json:"hostname"` + + // The operating system family for the plugin. + OsFamily OsFamilyEnum `mandatory:"false" json:"osFamily,omitempty"` + + // The architecture of the operating system of the plugin. + OsArchitecture *string `mandatory:"false" json:"osArchitecture"` + + // The distribution of the operating system of the plugin. + OsDistribution *string `mandatory:"false" json:"osDistribution"` + + // The version of the plugin. + PluginVersion *string `mandatory:"false" json:"pluginVersion"` + + // The date and time the resource was _last_ reported to JMS. + // This is potentially _after_ the specified time period provided by the filters. + // For example, a resource can be last reported to JMS before the start of a specified time period, + // if it is also reported during the time period. + TimeLastSeen *common.SDKTime `mandatory:"false" json:"timeLastSeen"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JmsPlugin) 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 JmsPlugin) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAgentTypeEnum(string(m.AgentType)); !ok && m.AgentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AgentType: %s. Supported values are: %s.", m.AgentType, strings.Join(GetAgentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingJmsPluginLifecycleStateEnum(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(GetJmsPluginLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingJmsPluginAvailabilityStatusEnum(string(m.AvailabilityStatus)); !ok && m.AvailabilityStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AvailabilityStatus: %s. Supported values are: %s.", m.AvailabilityStatus, strings.Join(GetJmsPluginAvailabilityStatusEnumStringValues(), ","))) + } + + if _, ok := GetMappingOsFamilyEnum(string(m.OsFamily)); !ok && m.OsFamily != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsFamily: %s. Supported values are: %s.", m.OsFamily, strings.Join(GetOsFamilyEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/jms_plugin_availability_status.go b/jms/jms_plugin_availability_status.go new file mode 100644 index 0000000000..7d188658bc --- /dev/null +++ b/jms/jms_plugin_availability_status.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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "strings" +) + +// JmsPluginAvailabilityStatusEnum Enum with underlying type: string +type JmsPluginAvailabilityStatusEnum string + +// Set of constants representing the allowable values for JmsPluginAvailabilityStatusEnum +const ( + JmsPluginAvailabilityStatusActive JmsPluginAvailabilityStatusEnum = "ACTIVE" + JmsPluginAvailabilityStatusSilent JmsPluginAvailabilityStatusEnum = "SILENT" + JmsPluginAvailabilityStatusNotAvailable JmsPluginAvailabilityStatusEnum = "NOT_AVAILABLE" +) + +var mappingJmsPluginAvailabilityStatusEnum = map[string]JmsPluginAvailabilityStatusEnum{ + "ACTIVE": JmsPluginAvailabilityStatusActive, + "SILENT": JmsPluginAvailabilityStatusSilent, + "NOT_AVAILABLE": JmsPluginAvailabilityStatusNotAvailable, +} + +var mappingJmsPluginAvailabilityStatusEnumLowerCase = map[string]JmsPluginAvailabilityStatusEnum{ + "active": JmsPluginAvailabilityStatusActive, + "silent": JmsPluginAvailabilityStatusSilent, + "not_available": JmsPluginAvailabilityStatusNotAvailable, +} + +// GetJmsPluginAvailabilityStatusEnumValues Enumerates the set of values for JmsPluginAvailabilityStatusEnum +func GetJmsPluginAvailabilityStatusEnumValues() []JmsPluginAvailabilityStatusEnum { + values := make([]JmsPluginAvailabilityStatusEnum, 0) + for _, v := range mappingJmsPluginAvailabilityStatusEnum { + values = append(values, v) + } + return values +} + +// GetJmsPluginAvailabilityStatusEnumStringValues Enumerates the set of values in String for JmsPluginAvailabilityStatusEnum +func GetJmsPluginAvailabilityStatusEnumStringValues() []string { + return []string{ + "ACTIVE", + "SILENT", + "NOT_AVAILABLE", + } +} + +// GetMappingJmsPluginAvailabilityStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJmsPluginAvailabilityStatusEnum(val string) (JmsPluginAvailabilityStatusEnum, bool) { + enum, ok := mappingJmsPluginAvailabilityStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/jms_plugin_collection.go b/jms/jms_plugin_collection.go new file mode 100644 index 0000000000..82d1fa9580 --- /dev/null +++ b/jms/jms_plugin_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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JmsPluginCollection Results of a JmsPlugin search. Contains JmsPluginSummary items. +type JmsPluginCollection struct { + + // A list of JmsPlugins. + Items []JmsPluginSummary `mandatory:"true" json:"items"` +} + +func (m JmsPluginCollection) 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 JmsPluginCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/jms_plugin_lifecycle_state.go b/jms/jms_plugin_lifecycle_state.go new file mode 100644 index 0000000000..a55b1665f6 --- /dev/null +++ b/jms/jms_plugin_lifecycle_state.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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "strings" +) + +// JmsPluginLifecycleStateEnum Enum with underlying type: string +type JmsPluginLifecycleStateEnum string + +// Set of constants representing the allowable values for JmsPluginLifecycleStateEnum +const ( + JmsPluginLifecycleStateActive JmsPluginLifecycleStateEnum = "ACTIVE" + JmsPluginLifecycleStateInactive JmsPluginLifecycleStateEnum = "INACTIVE" + JmsPluginLifecycleStateNeedsAttention JmsPluginLifecycleStateEnum = "NEEDS_ATTENTION" + JmsPluginLifecycleStateDeleted JmsPluginLifecycleStateEnum = "DELETED" +) + +var mappingJmsPluginLifecycleStateEnum = map[string]JmsPluginLifecycleStateEnum{ + "ACTIVE": JmsPluginLifecycleStateActive, + "INACTIVE": JmsPluginLifecycleStateInactive, + "NEEDS_ATTENTION": JmsPluginLifecycleStateNeedsAttention, + "DELETED": JmsPluginLifecycleStateDeleted, +} + +var mappingJmsPluginLifecycleStateEnumLowerCase = map[string]JmsPluginLifecycleStateEnum{ + "active": JmsPluginLifecycleStateActive, + "inactive": JmsPluginLifecycleStateInactive, + "needs_attention": JmsPluginLifecycleStateNeedsAttention, + "deleted": JmsPluginLifecycleStateDeleted, +} + +// GetJmsPluginLifecycleStateEnumValues Enumerates the set of values for JmsPluginLifecycleStateEnum +func GetJmsPluginLifecycleStateEnumValues() []JmsPluginLifecycleStateEnum { + values := make([]JmsPluginLifecycleStateEnum, 0) + for _, v := range mappingJmsPluginLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetJmsPluginLifecycleStateEnumStringValues Enumerates the set of values in String for JmsPluginLifecycleStateEnum +func GetJmsPluginLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "NEEDS_ATTENTION", + "DELETED", + } +} + +// GetMappingJmsPluginLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJmsPluginLifecycleStateEnum(val string) (JmsPluginLifecycleStateEnum, bool) { + enum, ok := mappingJmsPluginLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/jms_plugin_sort_by.go b/jms/jms_plugin_sort_by.go new file mode 100644 index 0000000000..d5f56abf1e --- /dev/null +++ b/jms/jms_plugin_sort_by.go @@ -0,0 +1,104 @@ +// 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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "strings" +) + +// JmsPluginSortByEnum Enum with underlying type: string +type JmsPluginSortByEnum string + +// Set of constants representing the allowable values for JmsPluginSortByEnum +const ( + JmsPluginSortById JmsPluginSortByEnum = "id" + JmsPluginSortByTimeLastSeen JmsPluginSortByEnum = "timeLastSeen" + JmsPluginSortByTimeRegistered JmsPluginSortByEnum = "timeRegistered" + JmsPluginSortByHostname JmsPluginSortByEnum = "hostname" + JmsPluginSortByAgentId JmsPluginSortByEnum = "agentId" + JmsPluginSortByAgentType JmsPluginSortByEnum = "agentType" + JmsPluginSortByLifecycleState JmsPluginSortByEnum = "lifecycleState" + JmsPluginSortByAvailabilityStatus JmsPluginSortByEnum = "availabilityStatus" + JmsPluginSortByFleetId JmsPluginSortByEnum = "fleetId" + JmsPluginSortByCompartmentId JmsPluginSortByEnum = "compartmentId" + JmsPluginSortByOsFamily JmsPluginSortByEnum = "osFamily" + JmsPluginSortByOsArchitecture JmsPluginSortByEnum = "osArchitecture" + JmsPluginSortByOsDistribution JmsPluginSortByEnum = "osDistribution" + JmsPluginSortByPluginVersion JmsPluginSortByEnum = "pluginVersion" +) + +var mappingJmsPluginSortByEnum = map[string]JmsPluginSortByEnum{ + "id": JmsPluginSortById, + "timeLastSeen": JmsPluginSortByTimeLastSeen, + "timeRegistered": JmsPluginSortByTimeRegistered, + "hostname": JmsPluginSortByHostname, + "agentId": JmsPluginSortByAgentId, + "agentType": JmsPluginSortByAgentType, + "lifecycleState": JmsPluginSortByLifecycleState, + "availabilityStatus": JmsPluginSortByAvailabilityStatus, + "fleetId": JmsPluginSortByFleetId, + "compartmentId": JmsPluginSortByCompartmentId, + "osFamily": JmsPluginSortByOsFamily, + "osArchitecture": JmsPluginSortByOsArchitecture, + "osDistribution": JmsPluginSortByOsDistribution, + "pluginVersion": JmsPluginSortByPluginVersion, +} + +var mappingJmsPluginSortByEnumLowerCase = map[string]JmsPluginSortByEnum{ + "id": JmsPluginSortById, + "timelastseen": JmsPluginSortByTimeLastSeen, + "timeregistered": JmsPluginSortByTimeRegistered, + "hostname": JmsPluginSortByHostname, + "agentid": JmsPluginSortByAgentId, + "agenttype": JmsPluginSortByAgentType, + "lifecyclestate": JmsPluginSortByLifecycleState, + "availabilitystatus": JmsPluginSortByAvailabilityStatus, + "fleetid": JmsPluginSortByFleetId, + "compartmentid": JmsPluginSortByCompartmentId, + "osfamily": JmsPluginSortByOsFamily, + "osarchitecture": JmsPluginSortByOsArchitecture, + "osdistribution": JmsPluginSortByOsDistribution, + "pluginversion": JmsPluginSortByPluginVersion, +} + +// GetJmsPluginSortByEnumValues Enumerates the set of values for JmsPluginSortByEnum +func GetJmsPluginSortByEnumValues() []JmsPluginSortByEnum { + values := make([]JmsPluginSortByEnum, 0) + for _, v := range mappingJmsPluginSortByEnum { + values = append(values, v) + } + return values +} + +// GetJmsPluginSortByEnumStringValues Enumerates the set of values in String for JmsPluginSortByEnum +func GetJmsPluginSortByEnumStringValues() []string { + return []string{ + "id", + "timeLastSeen", + "timeRegistered", + "hostname", + "agentId", + "agentType", + "lifecycleState", + "availabilityStatus", + "fleetId", + "compartmentId", + "osFamily", + "osArchitecture", + "osDistribution", + "pluginVersion", + } +} + +// GetMappingJmsPluginSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJmsPluginSortByEnum(val string) (JmsPluginSortByEnum, bool) { + enum, ok := mappingJmsPluginSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/jms_plugin_summary.go b/jms/jms_plugin_summary.go new file mode 100644 index 0000000000..8abcc248b3 --- /dev/null +++ b/jms/jms_plugin_summary.go @@ -0,0 +1,107 @@ +// 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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JmsPluginSummary Summary of the JmsPlugin. +type JmsPluginSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + AgentId *string `mandatory:"true" json:"agentId"` + + // The agent type. + AgentType AgentTypeEnum `mandatory:"true" json:"agentType"` + + // The lifecycle state. + LifecycleState JmsPluginLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The availability status. + AvailabilityStatus JmsPluginAvailabilityStatusEnum `mandatory:"true" json:"availabilityStatus"` + + // The date and time the plugin was registered. + TimeRegistered *common.SDKTime `mandatory:"true" json:"timeRegistered"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + FleetId *string `mandatory:"false" json:"fleetId"` + + // The OMA/OCA agent's compartment OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The hostname of the agent. + Hostname *string `mandatory:"false" json:"hostname"` + + // The operating system family for the plugin. + OsFamily OsFamilyEnum `mandatory:"false" json:"osFamily,omitempty"` + + // The architecture of the operating system of the plugin. + OsArchitecture *string `mandatory:"false" json:"osArchitecture"` + + // The distribution of the operating system of the plugin. + OsDistribution *string `mandatory:"false" json:"osDistribution"` + + // The version of the plugin. + PluginVersion *string `mandatory:"false" json:"pluginVersion"` + + // The date and time the resource was _last_ reported to JMS. + // This is potentially _after_ the specified time period provided by the filters. + // For example, a resource can be last reported to JMS before the start of a specified time period, + // if it is also reported during the time period. + TimeLastSeen *common.SDKTime `mandatory:"false" json:"timeLastSeen"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JmsPluginSummary) 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 JmsPluginSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAgentTypeEnum(string(m.AgentType)); !ok && m.AgentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AgentType: %s. Supported values are: %s.", m.AgentType, strings.Join(GetAgentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingJmsPluginLifecycleStateEnum(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(GetJmsPluginLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingJmsPluginAvailabilityStatusEnum(string(m.AvailabilityStatus)); !ok && m.AvailabilityStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AvailabilityStatus: %s. Supported values are: %s.", m.AvailabilityStatus, strings.Join(GetJmsPluginAvailabilityStatusEnumStringValues(), ","))) + } + + if _, ok := GetMappingOsFamilyEnum(string(m.OsFamily)); !ok && m.OsFamily != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsFamily: %s. Supported values are: %s.", m.OsFamily, strings.Join(GetOsFamilyEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/jre_security_status.go b/jms/jre_security_status.go index 05b09f22ed..d62cec8193 100644 --- a/jms/jre_security_status.go +++ b/jms/jre_security_status.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/jre_sort_by.go b/jms/jre_sort_by.go index e76799edcd..ead5f0ac1e 100644 --- a/jms/jre_sort_by.go +++ b/jms/jre_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/jre_usage.go b/jms/jre_usage.go index e699d8ac6c..6b653ea7e2 100644 --- a/jms/jre_usage.go +++ b/jms/jre_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/jre_usage_collection.go b/jms/jre_usage_collection.go index 93ba33e4c5..7cbc280628 100644 --- a/jms/jre_usage_collection.go +++ b/jms/jre_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/key_size_algorithm.go b/jms/key_size_algorithm.go index 1fef798eff..21487c70b3 100644 --- a/jms/key_size_algorithm.go +++ b/jms/key_size_algorithm.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/lcm.go b/jms/lcm.go index 455a20e376..5b8c0c1293 100644 --- a/jms/lcm.go +++ b/jms/lcm.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/lcm_work_item_details.go b/jms/lcm_work_item_details.go index a140a9a1b6..6bee2fb5b0 100644 --- a/jms/lcm_work_item_details.go +++ b/jms/lcm_work_item_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/library_sort_by.go b/jms/library_sort_by.go index 43e23afc3a..14da8da97d 100644 --- a/jms/library_sort_by.go +++ b/jms/library_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/library_usage.go b/jms/library_usage.go index 4084b48b0d..dcf6889c23 100644 --- a/jms/library_usage.go +++ b/jms/library_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -30,6 +30,9 @@ type LibraryUsage struct { // The version of the library. LibraryVersion *string `mandatory:"false" json:"libraryVersion"` + // The Common Vulnerabilities and Exposures (CVE) ID. + CveId *string `mandatory:"false" json:"cveId"` + // The Common Vulnerability Scoring System (CVSS) score. CvssScore *float32 `mandatory:"false" json:"cvssScore"` @@ -62,6 +65,9 @@ type LibraryUsage struct { // For example, a resource can be last reported to JMS before the start of a specified time period, // if it is also reported during the time period. TimeLastSeen *common.SDKTime `mandatory:"false" json:"timeLastSeen"` + + // The date and time of the last CVEs refresh was completed. + TimeLastCveRefreshed *common.SDKTime `mandatory:"false" json:"timeLastCveRefreshed"` } func (m LibraryUsage) String() string { diff --git a/jms/library_usage_collection.go b/jms/library_usage_collection.go index b61cb05d21..1304fb88be 100644 --- a/jms/library_usage_collection.go +++ b/jms/library_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/license_type.go b/jms/license_type.go index 55150d8b92..b0a0da99aa 100644 --- a/jms/license_type.go +++ b/jms/license_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/lifecycle_state.go b/jms/lifecycle_state.go index eb7f83936b..fb9918cad6 100644 --- a/jms/lifecycle_state.go +++ b/jms/lifecycle_state.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/list_agent_installers_request_response.go b/jms/list_agent_installers_request_response.go new file mode 100644 index 0000000000..8866659a2e --- /dev/null +++ b/jms/list_agent_installers_request_response.go @@ -0,0 +1,314 @@ +// 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 jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAgentInstallersRequest wrapper for the ListAgentInstallers operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/ListAgentInstallers.go.html to see an example of how to use ListAgentInstallersRequest. +type ListAgentInstallersRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The ID of the Fleet. + FleetId *string `mandatory:"false" contributesTo:"query" name:"fleetId"` + + // The platform architecture for the agent installer. + PlatformArchitecture ListAgentInstallersPlatformArchitectureEnum `mandatory:"false" contributesTo:"query" name:"platformArchitecture" omitEmpty:"true"` + + // The OS family for the agent installer. + OsFamily ListAgentInstallersOsFamilyEnum `mandatory:"false" contributesTo:"query" name:"osFamily" omitEmpty:"true"` + + // 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. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListAgentInstallersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort the agent installer. Only one sort order can be provided. + // Default order for _agentInstallerId_, _osFamily_, _platformArchitecture_ is **ascending**. + // If no value is specified _agentInstallerId_ is default. + SortBy ListAgentInstallersSortByEnum `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 ListAgentInstallersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAgentInstallersRequest) 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 ListAgentInstallersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAgentInstallersRequest) 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 ListAgentInstallersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAgentInstallersPlatformArchitectureEnum(string(request.PlatformArchitecture)); !ok && request.PlatformArchitecture != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PlatformArchitecture: %s. Supported values are: %s.", request.PlatformArchitecture, strings.Join(GetListAgentInstallersPlatformArchitectureEnumStringValues(), ","))) + } + if _, ok := GetMappingListAgentInstallersOsFamilyEnum(string(request.OsFamily)); !ok && request.OsFamily != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsFamily: %s. Supported values are: %s.", request.OsFamily, strings.Join(GetListAgentInstallersOsFamilyEnumStringValues(), ","))) + } + if _, ok := GetMappingListAgentInstallersSortOrderEnum(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(GetListAgentInstallersSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAgentInstallersSortByEnum(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(GetListAgentInstallersSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAgentInstallersResponse wrapper for the ListAgentInstallers operation +type ListAgentInstallersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AgentInstallerCollection instances + AgentInstallerCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination, when this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListAgentInstallersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAgentInstallersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAgentInstallersPlatformArchitectureEnum Enum with underlying type: string +type ListAgentInstallersPlatformArchitectureEnum string + +// Set of constants representing the allowable values for ListAgentInstallersPlatformArchitectureEnum +const ( + ListAgentInstallersPlatformArchitectureX8664 ListAgentInstallersPlatformArchitectureEnum = "X86_64" + ListAgentInstallersPlatformArchitectureX86 ListAgentInstallersPlatformArchitectureEnum = "X86" + ListAgentInstallersPlatformArchitectureAarch64 ListAgentInstallersPlatformArchitectureEnum = "AARCH64" +) + +var mappingListAgentInstallersPlatformArchitectureEnum = map[string]ListAgentInstallersPlatformArchitectureEnum{ + "X86_64": ListAgentInstallersPlatformArchitectureX8664, + "X86": ListAgentInstallersPlatformArchitectureX86, + "AARCH64": ListAgentInstallersPlatformArchitectureAarch64, +} + +var mappingListAgentInstallersPlatformArchitectureEnumLowerCase = map[string]ListAgentInstallersPlatformArchitectureEnum{ + "x86_64": ListAgentInstallersPlatformArchitectureX8664, + "x86": ListAgentInstallersPlatformArchitectureX86, + "aarch64": ListAgentInstallersPlatformArchitectureAarch64, +} + +// GetListAgentInstallersPlatformArchitectureEnumValues Enumerates the set of values for ListAgentInstallersPlatformArchitectureEnum +func GetListAgentInstallersPlatformArchitectureEnumValues() []ListAgentInstallersPlatformArchitectureEnum { + values := make([]ListAgentInstallersPlatformArchitectureEnum, 0) + for _, v := range mappingListAgentInstallersPlatformArchitectureEnum { + values = append(values, v) + } + return values +} + +// GetListAgentInstallersPlatformArchitectureEnumStringValues Enumerates the set of values in String for ListAgentInstallersPlatformArchitectureEnum +func GetListAgentInstallersPlatformArchitectureEnumStringValues() []string { + return []string{ + "X86_64", + "X86", + "AARCH64", + } +} + +// GetMappingListAgentInstallersPlatformArchitectureEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAgentInstallersPlatformArchitectureEnum(val string) (ListAgentInstallersPlatformArchitectureEnum, bool) { + enum, ok := mappingListAgentInstallersPlatformArchitectureEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAgentInstallersOsFamilyEnum Enum with underlying type: string +type ListAgentInstallersOsFamilyEnum string + +// Set of constants representing the allowable values for ListAgentInstallersOsFamilyEnum +const ( + ListAgentInstallersOsFamilyLinux ListAgentInstallersOsFamilyEnum = "LINUX" + ListAgentInstallersOsFamilyWindows ListAgentInstallersOsFamilyEnum = "WINDOWS" + ListAgentInstallersOsFamilyMacos ListAgentInstallersOsFamilyEnum = "MACOS" + ListAgentInstallersOsFamilyUnknown ListAgentInstallersOsFamilyEnum = "UNKNOWN" +) + +var mappingListAgentInstallersOsFamilyEnum = map[string]ListAgentInstallersOsFamilyEnum{ + "LINUX": ListAgentInstallersOsFamilyLinux, + "WINDOWS": ListAgentInstallersOsFamilyWindows, + "MACOS": ListAgentInstallersOsFamilyMacos, + "UNKNOWN": ListAgentInstallersOsFamilyUnknown, +} + +var mappingListAgentInstallersOsFamilyEnumLowerCase = map[string]ListAgentInstallersOsFamilyEnum{ + "linux": ListAgentInstallersOsFamilyLinux, + "windows": ListAgentInstallersOsFamilyWindows, + "macos": ListAgentInstallersOsFamilyMacos, + "unknown": ListAgentInstallersOsFamilyUnknown, +} + +// GetListAgentInstallersOsFamilyEnumValues Enumerates the set of values for ListAgentInstallersOsFamilyEnum +func GetListAgentInstallersOsFamilyEnumValues() []ListAgentInstallersOsFamilyEnum { + values := make([]ListAgentInstallersOsFamilyEnum, 0) + for _, v := range mappingListAgentInstallersOsFamilyEnum { + values = append(values, v) + } + return values +} + +// GetListAgentInstallersOsFamilyEnumStringValues Enumerates the set of values in String for ListAgentInstallersOsFamilyEnum +func GetListAgentInstallersOsFamilyEnumStringValues() []string { + return []string{ + "LINUX", + "WINDOWS", + "MACOS", + "UNKNOWN", + } +} + +// GetMappingListAgentInstallersOsFamilyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAgentInstallersOsFamilyEnum(val string) (ListAgentInstallersOsFamilyEnum, bool) { + enum, ok := mappingListAgentInstallersOsFamilyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAgentInstallersSortOrderEnum Enum with underlying type: string +type ListAgentInstallersSortOrderEnum string + +// Set of constants representing the allowable values for ListAgentInstallersSortOrderEnum +const ( + ListAgentInstallersSortOrderAsc ListAgentInstallersSortOrderEnum = "ASC" + ListAgentInstallersSortOrderDesc ListAgentInstallersSortOrderEnum = "DESC" +) + +var mappingListAgentInstallersSortOrderEnum = map[string]ListAgentInstallersSortOrderEnum{ + "ASC": ListAgentInstallersSortOrderAsc, + "DESC": ListAgentInstallersSortOrderDesc, +} + +var mappingListAgentInstallersSortOrderEnumLowerCase = map[string]ListAgentInstallersSortOrderEnum{ + "asc": ListAgentInstallersSortOrderAsc, + "desc": ListAgentInstallersSortOrderDesc, +} + +// GetListAgentInstallersSortOrderEnumValues Enumerates the set of values for ListAgentInstallersSortOrderEnum +func GetListAgentInstallersSortOrderEnumValues() []ListAgentInstallersSortOrderEnum { + values := make([]ListAgentInstallersSortOrderEnum, 0) + for _, v := range mappingListAgentInstallersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAgentInstallersSortOrderEnumStringValues Enumerates the set of values in String for ListAgentInstallersSortOrderEnum +func GetListAgentInstallersSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAgentInstallersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAgentInstallersSortOrderEnum(val string) (ListAgentInstallersSortOrderEnum, bool) { + enum, ok := mappingListAgentInstallersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAgentInstallersSortByEnum Enum with underlying type: string +type ListAgentInstallersSortByEnum string + +// Set of constants representing the allowable values for ListAgentInstallersSortByEnum +const ( + ListAgentInstallersSortByAgentinstallerid ListAgentInstallersSortByEnum = "agentInstallerId" + ListAgentInstallersSortByOsfamily ListAgentInstallersSortByEnum = "osFamily" + ListAgentInstallersSortByPlatformarchitecture ListAgentInstallersSortByEnum = "platformArchitecture" +) + +var mappingListAgentInstallersSortByEnum = map[string]ListAgentInstallersSortByEnum{ + "agentInstallerId": ListAgentInstallersSortByAgentinstallerid, + "osFamily": ListAgentInstallersSortByOsfamily, + "platformArchitecture": ListAgentInstallersSortByPlatformarchitecture, +} + +var mappingListAgentInstallersSortByEnumLowerCase = map[string]ListAgentInstallersSortByEnum{ + "agentinstallerid": ListAgentInstallersSortByAgentinstallerid, + "osfamily": ListAgentInstallersSortByOsfamily, + "platformarchitecture": ListAgentInstallersSortByPlatformarchitecture, +} + +// GetListAgentInstallersSortByEnumValues Enumerates the set of values for ListAgentInstallersSortByEnum +func GetListAgentInstallersSortByEnumValues() []ListAgentInstallersSortByEnum { + values := make([]ListAgentInstallersSortByEnum, 0) + for _, v := range mappingListAgentInstallersSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAgentInstallersSortByEnumStringValues Enumerates the set of values in String for ListAgentInstallersSortByEnum +func GetListAgentInstallersSortByEnumStringValues() []string { + return []string{ + "agentInstallerId", + "osFamily", + "platformArchitecture", + } +} + +// GetMappingListAgentInstallersSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAgentInstallersSortByEnum(val string) (ListAgentInstallersSortByEnum, bool) { + enum, ok := mappingListAgentInstallersSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/list_announcements_request_response.go b/jms/list_announcements_request_response.go index f72dab5c6e..59d443dd07 100644 --- a/jms/list_announcements_request_response.go +++ b/jms/list_announcements_request_response.go @@ -101,10 +101,10 @@ type ListAnnouncementsResponse struct { AnnouncementCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_blocklists_request_response.go b/jms/list_blocklists_request_response.go index cfca2eb566..413c2cc7cb 100644 --- a/jms/list_blocklists_request_response.go +++ b/jms/list_blocklists_request_response.go @@ -105,10 +105,10 @@ type ListBlocklistsResponse struct { BlocklistCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_crypto_analysis_results_request_response.go b/jms/list_crypto_analysis_results_request_response.go index fe9798dd59..1f310dfc79 100644 --- a/jms/list_crypto_analysis_results_request_response.go +++ b/jms/list_crypto_analysis_results_request_response.go @@ -27,6 +27,27 @@ type ListCryptoAnalysisResultsRequest struct { // The Fleet-unique identifier of the related managed instance. ManagedInstanceId *string `mandatory:"false" contributesTo:"query" name:"managedInstanceId"` + // The host OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + HostName *string `mandatory:"false" contributesTo:"query" name:"hostName"` + + // Non Compliant Finding Count of CryptoAnalysis Report. + NonCompliantFindingCount *int `mandatory:"false" contributesTo:"query" name:"nonCompliantFindingCount"` + + // Non Compliant Finding Count of CryptoAnalysis Report. + NonCompliantFindingCountGreaterThan *int `mandatory:"false" contributesTo:"query" name:"nonCompliantFindingCountGreaterThan"` + + // FindingCount of CryptoAnalysis Report. + FindingCount *int `mandatory:"false" contributesTo:"query" name:"findingCount"` + + // FindingCount of CryptoAnalysis Report. + FindingCountGreaterThan *int `mandatory:"false" contributesTo:"query" name:"findingCountGreaterThan"` + + // The start of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` + + // The end of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnd"` + // The maximum number of items to return. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` @@ -45,12 +66,6 @@ type ListCryptoAnalysisResultsRequest struct { // The client request ID for tracing. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - // The start of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). - TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` - - // The end of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). - TimeEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnd"` - // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -112,10 +127,10 @@ type ListCryptoAnalysisResultsResponse struct { CryptoAnalysisResultCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_drs_files_request_response.go b/jms/list_drs_files_request_response.go index 875357a5bb..f08676c1af 100644 --- a/jms/list_drs_files_request_response.go +++ b/jms/list_drs_files_request_response.go @@ -96,10 +96,10 @@ type ListDrsFilesResponse struct { DrsFileCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_fleet_diagnoses_request_response.go b/jms/list_fleet_diagnoses_request_response.go index 4e4ee542ba..83cacb5ca0 100644 --- a/jms/list_fleet_diagnoses_request_response.go +++ b/jms/list_fleet_diagnoses_request_response.go @@ -82,10 +82,10 @@ type ListFleetDiagnosesResponse struct { FleetDiagnosisCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_fleets_request_response.go b/jms/list_fleets_request_response.go index 518b66a2a4..8267f084a3 100644 --- a/jms/list_fleets_request_response.go +++ b/jms/list_fleets_request_response.go @@ -21,7 +21,7 @@ type ListFleetsRequest struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // The ID of the Fleet. + // The ID. Id *string `mandatory:"false" contributesTo:"query" name:"id"` // The state of the lifecycle. @@ -113,10 +113,10 @@ type ListFleetsResponse struct { FleetCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_installation_sites_request_response.go b/jms/list_installation_sites_request_response.go index b8f619b7b9..efd1634106 100644 --- a/jms/list_installation_sites_request_response.go +++ b/jms/list_installation_sites_request_response.go @@ -139,10 +139,10 @@ type ListInstallationSitesResponse struct { InstallationSiteCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_java_families_request_response.go b/jms/list_java_families_request_response.go index 7f427f3a38..7e1fccb9c3 100644 --- a/jms/list_java_families_request_response.go +++ b/jms/list_java_families_request_response.go @@ -100,10 +100,10 @@ type ListJavaFamiliesResponse struct { JavaFamilyCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_java_migration_analysis_results_request_response.go b/jms/list_java_migration_analysis_results_request_response.go index ba570fa33e..7ef09da187 100644 --- a/jms/list_java_migration_analysis_results_request_response.go +++ b/jms/list_java_migration_analysis_results_request_response.go @@ -24,6 +24,18 @@ type ListJavaMigrationAnalysisResultsRequest struct { // The Fleet-unique identifier of the related managed instance. ManagedInstanceId *string `mandatory:"false" contributesTo:"query" name:"managedInstanceId"` + // The host OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + HostName *string `mandatory:"false" contributesTo:"query" name:"hostName"` + + // The name of the application. + ApplicationName *string `mandatory:"false" contributesTo:"query" name:"applicationName"` + + // The start of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` + + // The end of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnd"` + // The maximum number of items to return. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` @@ -41,12 +53,6 @@ type ListJavaMigrationAnalysisResultsRequest struct { // The client request ID for tracing. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - // The start of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). - TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` - - // The end of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). - TimeEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnd"` - // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -105,10 +111,10 @@ type ListJavaMigrationAnalysisResultsResponse struct { JavaMigrationAnalysisResultCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_java_releases_request_response.go b/jms/list_java_releases_request_response.go index ee67a339f3..696863bf00 100644 --- a/jms/list_java_releases_request_response.go +++ b/jms/list_java_releases_request_response.go @@ -115,10 +115,10 @@ type ListJavaReleasesResponse struct { JavaReleaseCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_jms_plugins_request_response.go b/jms/list_jms_plugins_request_response.go new file mode 100644 index 0000000000..e3f85c1262 --- /dev/null +++ b/jms/list_jms_plugins_request_response.go @@ -0,0 +1,376 @@ +// 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 jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListJmsPluginsRequest wrapper for the ListJmsPlugins operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/ListJmsPlugins.go.html to see an example of how to use ListJmsPluginsRequest. +type ListJmsPluginsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Flag to determine whether the info should be gathered only in the compartment or in the compartment and its subcompartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The ID of the Fleet. + FleetId *string `mandatory:"false" contributesTo:"query" name:"fleetId"` + + // The ManagementAgent (OMA) or Instance (OCA) OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) that identifies the Agent. + AgentId *string `mandatory:"false" contributesTo:"query" name:"agentId"` + + // Filter JmsPlugin with its lifecycle state. + LifecycleState ListJmsPluginsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Filter JmsPlugin with its availability status. + AvailabilityStatus ListJmsPluginsAvailabilityStatusEnum `mandatory:"false" contributesTo:"query" name:"availabilityStatus" omitEmpty:"true"` + + // If present, only plugins with a registration time before this parameter are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeRegisteredLessThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeRegisteredLessThanOrEqualTo"` + + // If present, only plugins with a last seen time before this parameter are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeLastSeenLessThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeLastSeenLessThanOrEqualTo"` + + // 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. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListJmsPluginsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort JmsPlugin. Only one sort order may be provided. + // Default order is **descending**. + // If no value is specified _timeLastSeen_ is default. + SortBy ListJmsPluginsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Filter the list with hostname contains the given value. + HostnameContains *string `mandatory:"false" contributesTo:"query" name:"hostnameContains"` + + // 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 ListJmsPluginsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListJmsPluginsRequest) 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 ListJmsPluginsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListJmsPluginsRequest) 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 ListJmsPluginsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListJmsPluginsLifecycleStateEnum(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(GetListJmsPluginsLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListJmsPluginsAvailabilityStatusEnum(string(request.AvailabilityStatus)); !ok && request.AvailabilityStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AvailabilityStatus: %s. Supported values are: %s.", request.AvailabilityStatus, strings.Join(GetListJmsPluginsAvailabilityStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListJmsPluginsSortOrderEnum(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(GetListJmsPluginsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListJmsPluginsSortByEnum(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(GetListJmsPluginsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListJmsPluginsResponse wrapper for the ListJmsPlugins operation +type ListJmsPluginsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of JmsPluginCollection instances + JmsPluginCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination, when this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListJmsPluginsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListJmsPluginsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListJmsPluginsLifecycleStateEnum Enum with underlying type: string +type ListJmsPluginsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListJmsPluginsLifecycleStateEnum +const ( + ListJmsPluginsLifecycleStateActive ListJmsPluginsLifecycleStateEnum = "ACTIVE" + ListJmsPluginsLifecycleStateInactive ListJmsPluginsLifecycleStateEnum = "INACTIVE" + ListJmsPluginsLifecycleStateNeedsAttention ListJmsPluginsLifecycleStateEnum = "NEEDS_ATTENTION" + ListJmsPluginsLifecycleStateDeleted ListJmsPluginsLifecycleStateEnum = "DELETED" +) + +var mappingListJmsPluginsLifecycleStateEnum = map[string]ListJmsPluginsLifecycleStateEnum{ + "ACTIVE": ListJmsPluginsLifecycleStateActive, + "INACTIVE": ListJmsPluginsLifecycleStateInactive, + "NEEDS_ATTENTION": ListJmsPluginsLifecycleStateNeedsAttention, + "DELETED": ListJmsPluginsLifecycleStateDeleted, +} + +var mappingListJmsPluginsLifecycleStateEnumLowerCase = map[string]ListJmsPluginsLifecycleStateEnum{ + "active": ListJmsPluginsLifecycleStateActive, + "inactive": ListJmsPluginsLifecycleStateInactive, + "needs_attention": ListJmsPluginsLifecycleStateNeedsAttention, + "deleted": ListJmsPluginsLifecycleStateDeleted, +} + +// GetListJmsPluginsLifecycleStateEnumValues Enumerates the set of values for ListJmsPluginsLifecycleStateEnum +func GetListJmsPluginsLifecycleStateEnumValues() []ListJmsPluginsLifecycleStateEnum { + values := make([]ListJmsPluginsLifecycleStateEnum, 0) + for _, v := range mappingListJmsPluginsLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListJmsPluginsLifecycleStateEnumStringValues Enumerates the set of values in String for ListJmsPluginsLifecycleStateEnum +func GetListJmsPluginsLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "NEEDS_ATTENTION", + "DELETED", + } +} + +// GetMappingListJmsPluginsLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJmsPluginsLifecycleStateEnum(val string) (ListJmsPluginsLifecycleStateEnum, bool) { + enum, ok := mappingListJmsPluginsLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJmsPluginsAvailabilityStatusEnum Enum with underlying type: string +type ListJmsPluginsAvailabilityStatusEnum string + +// Set of constants representing the allowable values for ListJmsPluginsAvailabilityStatusEnum +const ( + ListJmsPluginsAvailabilityStatusActive ListJmsPluginsAvailabilityStatusEnum = "ACTIVE" + ListJmsPluginsAvailabilityStatusSilent ListJmsPluginsAvailabilityStatusEnum = "SILENT" + ListJmsPluginsAvailabilityStatusNotAvailable ListJmsPluginsAvailabilityStatusEnum = "NOT_AVAILABLE" +) + +var mappingListJmsPluginsAvailabilityStatusEnum = map[string]ListJmsPluginsAvailabilityStatusEnum{ + "ACTIVE": ListJmsPluginsAvailabilityStatusActive, + "SILENT": ListJmsPluginsAvailabilityStatusSilent, + "NOT_AVAILABLE": ListJmsPluginsAvailabilityStatusNotAvailable, +} + +var mappingListJmsPluginsAvailabilityStatusEnumLowerCase = map[string]ListJmsPluginsAvailabilityStatusEnum{ + "active": ListJmsPluginsAvailabilityStatusActive, + "silent": ListJmsPluginsAvailabilityStatusSilent, + "not_available": ListJmsPluginsAvailabilityStatusNotAvailable, +} + +// GetListJmsPluginsAvailabilityStatusEnumValues Enumerates the set of values for ListJmsPluginsAvailabilityStatusEnum +func GetListJmsPluginsAvailabilityStatusEnumValues() []ListJmsPluginsAvailabilityStatusEnum { + values := make([]ListJmsPluginsAvailabilityStatusEnum, 0) + for _, v := range mappingListJmsPluginsAvailabilityStatusEnum { + values = append(values, v) + } + return values +} + +// GetListJmsPluginsAvailabilityStatusEnumStringValues Enumerates the set of values in String for ListJmsPluginsAvailabilityStatusEnum +func GetListJmsPluginsAvailabilityStatusEnumStringValues() []string { + return []string{ + "ACTIVE", + "SILENT", + "NOT_AVAILABLE", + } +} + +// GetMappingListJmsPluginsAvailabilityStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJmsPluginsAvailabilityStatusEnum(val string) (ListJmsPluginsAvailabilityStatusEnum, bool) { + enum, ok := mappingListJmsPluginsAvailabilityStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJmsPluginsSortOrderEnum Enum with underlying type: string +type ListJmsPluginsSortOrderEnum string + +// Set of constants representing the allowable values for ListJmsPluginsSortOrderEnum +const ( + ListJmsPluginsSortOrderAsc ListJmsPluginsSortOrderEnum = "ASC" + ListJmsPluginsSortOrderDesc ListJmsPluginsSortOrderEnum = "DESC" +) + +var mappingListJmsPluginsSortOrderEnum = map[string]ListJmsPluginsSortOrderEnum{ + "ASC": ListJmsPluginsSortOrderAsc, + "DESC": ListJmsPluginsSortOrderDesc, +} + +var mappingListJmsPluginsSortOrderEnumLowerCase = map[string]ListJmsPluginsSortOrderEnum{ + "asc": ListJmsPluginsSortOrderAsc, + "desc": ListJmsPluginsSortOrderDesc, +} + +// GetListJmsPluginsSortOrderEnumValues Enumerates the set of values for ListJmsPluginsSortOrderEnum +func GetListJmsPluginsSortOrderEnumValues() []ListJmsPluginsSortOrderEnum { + values := make([]ListJmsPluginsSortOrderEnum, 0) + for _, v := range mappingListJmsPluginsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListJmsPluginsSortOrderEnumStringValues Enumerates the set of values in String for ListJmsPluginsSortOrderEnum +func GetListJmsPluginsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListJmsPluginsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJmsPluginsSortOrderEnum(val string) (ListJmsPluginsSortOrderEnum, bool) { + enum, ok := mappingListJmsPluginsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJmsPluginsSortByEnum Enum with underlying type: string +type ListJmsPluginsSortByEnum string + +// Set of constants representing the allowable values for ListJmsPluginsSortByEnum +const ( + ListJmsPluginsSortById ListJmsPluginsSortByEnum = "id" + ListJmsPluginsSortByTimelastseen ListJmsPluginsSortByEnum = "timeLastSeen" + ListJmsPluginsSortByTimeregistered ListJmsPluginsSortByEnum = "timeRegistered" + ListJmsPluginsSortByHostname ListJmsPluginsSortByEnum = "hostname" + ListJmsPluginsSortByAgentid ListJmsPluginsSortByEnum = "agentId" + ListJmsPluginsSortByAgenttype ListJmsPluginsSortByEnum = "agentType" + ListJmsPluginsSortByLifecyclestate ListJmsPluginsSortByEnum = "lifecycleState" + ListJmsPluginsSortByAvailabilitystatus ListJmsPluginsSortByEnum = "availabilityStatus" + ListJmsPluginsSortByFleetid ListJmsPluginsSortByEnum = "fleetId" + ListJmsPluginsSortByCompartmentid ListJmsPluginsSortByEnum = "compartmentId" + ListJmsPluginsSortByOsfamily ListJmsPluginsSortByEnum = "osFamily" + ListJmsPluginsSortByOsarchitecture ListJmsPluginsSortByEnum = "osArchitecture" + ListJmsPluginsSortByOsdistribution ListJmsPluginsSortByEnum = "osDistribution" + ListJmsPluginsSortByPluginversion ListJmsPluginsSortByEnum = "pluginVersion" +) + +var mappingListJmsPluginsSortByEnum = map[string]ListJmsPluginsSortByEnum{ + "id": ListJmsPluginsSortById, + "timeLastSeen": ListJmsPluginsSortByTimelastseen, + "timeRegistered": ListJmsPluginsSortByTimeregistered, + "hostname": ListJmsPluginsSortByHostname, + "agentId": ListJmsPluginsSortByAgentid, + "agentType": ListJmsPluginsSortByAgenttype, + "lifecycleState": ListJmsPluginsSortByLifecyclestate, + "availabilityStatus": ListJmsPluginsSortByAvailabilitystatus, + "fleetId": ListJmsPluginsSortByFleetid, + "compartmentId": ListJmsPluginsSortByCompartmentid, + "osFamily": ListJmsPluginsSortByOsfamily, + "osArchitecture": ListJmsPluginsSortByOsarchitecture, + "osDistribution": ListJmsPluginsSortByOsdistribution, + "pluginVersion": ListJmsPluginsSortByPluginversion, +} + +var mappingListJmsPluginsSortByEnumLowerCase = map[string]ListJmsPluginsSortByEnum{ + "id": ListJmsPluginsSortById, + "timelastseen": ListJmsPluginsSortByTimelastseen, + "timeregistered": ListJmsPluginsSortByTimeregistered, + "hostname": ListJmsPluginsSortByHostname, + "agentid": ListJmsPluginsSortByAgentid, + "agenttype": ListJmsPluginsSortByAgenttype, + "lifecyclestate": ListJmsPluginsSortByLifecyclestate, + "availabilitystatus": ListJmsPluginsSortByAvailabilitystatus, + "fleetid": ListJmsPluginsSortByFleetid, + "compartmentid": ListJmsPluginsSortByCompartmentid, + "osfamily": ListJmsPluginsSortByOsfamily, + "osarchitecture": ListJmsPluginsSortByOsarchitecture, + "osdistribution": ListJmsPluginsSortByOsdistribution, + "pluginversion": ListJmsPluginsSortByPluginversion, +} + +// GetListJmsPluginsSortByEnumValues Enumerates the set of values for ListJmsPluginsSortByEnum +func GetListJmsPluginsSortByEnumValues() []ListJmsPluginsSortByEnum { + values := make([]ListJmsPluginsSortByEnum, 0) + for _, v := range mappingListJmsPluginsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListJmsPluginsSortByEnumStringValues Enumerates the set of values in String for ListJmsPluginsSortByEnum +func GetListJmsPluginsSortByEnumStringValues() []string { + return []string{ + "id", + "timeLastSeen", + "timeRegistered", + "hostname", + "agentId", + "agentType", + "lifecycleState", + "availabilityStatus", + "fleetId", + "compartmentId", + "osFamily", + "osArchitecture", + "osDistribution", + "pluginVersion", + } +} + +// GetMappingListJmsPluginsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJmsPluginsSortByEnum(val string) (ListJmsPluginsSortByEnum, bool) { + enum, ok := mappingListJmsPluginsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/list_jre_usage_request_response.go b/jms/list_jre_usage_request_response.go index 9533bc548b..56d41bda13 100644 --- a/jms/list_jre_usage_request_response.go +++ b/jms/list_jre_usage_request_response.go @@ -114,10 +114,10 @@ type ListJreUsageResponse struct { JreUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/list_performance_tuning_analysis_results_request_response.go b/jms/list_performance_tuning_analysis_results_request_response.go index b3e645c005..d4e4d21f51 100644 --- a/jms/list_performance_tuning_analysis_results_request_response.go +++ b/jms/list_performance_tuning_analysis_results_request_response.go @@ -27,6 +27,15 @@ type ListPerformanceTuningAnalysisResultsRequest struct { // The Fleet-unique identifier of the related application. ApplicationId *string `mandatory:"false" contributesTo:"query" name:"applicationId"` + // The host OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + HostName *string `mandatory:"false" contributesTo:"query" name:"hostName"` + + // The start of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` + + // The end of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnd"` + // The maximum number of items to return. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` @@ -45,12 +54,6 @@ type ListPerformanceTuningAnalysisResultsRequest struct { // The client request ID for tracing. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - // The start of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). - TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` - - // The end of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). - TimeEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnd"` - // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -109,10 +112,10 @@ type ListPerformanceTuningAnalysisResultsResponse struct { PerformanceTuningAnalysisResultCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` @@ -177,18 +180,21 @@ const ( ListPerformanceTuningAnalysisResultsSortByTimecreated ListPerformanceTuningAnalysisResultsSortByEnum = "timeCreated" ListPerformanceTuningAnalysisResultsSortByManagedinstanceid ListPerformanceTuningAnalysisResultsSortByEnum = "managedInstanceId" ListPerformanceTuningAnalysisResultsSortByWorkrequestid ListPerformanceTuningAnalysisResultsSortByEnum = "workRequestId" + ListPerformanceTuningAnalysisResultsSortByWarningcount ListPerformanceTuningAnalysisResultsSortByEnum = "warningCount" ) var mappingListPerformanceTuningAnalysisResultsSortByEnum = map[string]ListPerformanceTuningAnalysisResultsSortByEnum{ "timeCreated": ListPerformanceTuningAnalysisResultsSortByTimecreated, "managedInstanceId": ListPerformanceTuningAnalysisResultsSortByManagedinstanceid, "workRequestId": ListPerformanceTuningAnalysisResultsSortByWorkrequestid, + "warningCount": ListPerformanceTuningAnalysisResultsSortByWarningcount, } var mappingListPerformanceTuningAnalysisResultsSortByEnumLowerCase = map[string]ListPerformanceTuningAnalysisResultsSortByEnum{ "timecreated": ListPerformanceTuningAnalysisResultsSortByTimecreated, "managedinstanceid": ListPerformanceTuningAnalysisResultsSortByManagedinstanceid, "workrequestid": ListPerformanceTuningAnalysisResultsSortByWorkrequestid, + "warningcount": ListPerformanceTuningAnalysisResultsSortByWarningcount, } // GetListPerformanceTuningAnalysisResultsSortByEnumValues Enumerates the set of values for ListPerformanceTuningAnalysisResultsSortByEnum @@ -206,6 +212,7 @@ func GetListPerformanceTuningAnalysisResultsSortByEnumStringValues() []string { "timeCreated", "managedInstanceId", "workRequestId", + "warningCount", } } diff --git a/jms/list_work_items_request_response.go b/jms/list_work_items_request_response.go index 849c9591a8..cc473e7b52 100644 --- a/jms/list_work_items_request_response.go +++ b/jms/list_work_items_request_response.go @@ -81,13 +81,13 @@ type ListWorkItemsResponse struct { // A list of WorkItemCollection instances WorkItemCollection `presentIn:"body"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/list_work_request_errors_request_response.go b/jms/list_work_request_errors_request_response.go index ac69245f2f..8f71b44cae 100644 --- a/jms/list_work_request_errors_request_response.go +++ b/jms/list_work_request_errors_request_response.go @@ -81,13 +81,13 @@ type ListWorkRequestErrorsResponse struct { // A list of WorkRequestErrorCollection instances WorkRequestErrorCollection `presentIn:"body"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/list_work_request_logs_request_response.go b/jms/list_work_request_logs_request_response.go index 8d755d5374..fc572a396d 100644 --- a/jms/list_work_request_logs_request_response.go +++ b/jms/list_work_request_logs_request_response.go @@ -81,13 +81,13 @@ type ListWorkRequestLogsResponse struct { // A list of WorkRequestLogEntryCollection instances WorkRequestLogEntryCollection `presentIn:"body"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/list_work_requests_request_response.go b/jms/list_work_requests_request_response.go index 90f69e9bfb..9cccc50943 100644 --- a/jms/list_work_requests_request_response.go +++ b/jms/list_work_requests_request_response.go @@ -39,6 +39,12 @@ type ListWorkRequestsRequest struct { // The Fleet-unique identifier of the managed instance. ManagedInstanceId *string `mandatory:"false" contributesTo:"query" name:"managedInstanceId"` + // The operation type of the work request. + OperationType ListWorkRequestsOperationTypeEnum `mandatory:"false" contributesTo:"query" name:"operationType" omitEmpty:"true"` + + // The status of the work request. + Status []OperationStatusEnum `contributesTo:"query" name:"status" omitEmpty:"true" collectionFormat:"multi"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -75,6 +81,15 @@ func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { // Not recommended for calling this function directly func (request ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingListWorkRequestsOperationTypeEnum(string(request.OperationType)); !ok && request.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", request.OperationType, strings.Join(GetListWorkRequestsOperationTypeEnumStringValues(), ","))) + } + for _, val := range request.Status { + if _, ok := GetMappingOperationStatusEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", val, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } + } + if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -91,10 +106,10 @@ type ListWorkRequestsResponse struct { WorkRequestCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` @@ -108,3 +123,117 @@ func (response ListWorkRequestsResponse) String() string { func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { return response.RawResponse } + +// ListWorkRequestsOperationTypeEnum Enum with underlying type: string +type ListWorkRequestsOperationTypeEnum string + +// Set of constants representing the allowable values for ListWorkRequestsOperationTypeEnum +const ( + ListWorkRequestsOperationTypeCreateFleet ListWorkRequestsOperationTypeEnum = "CREATE_FLEET" + ListWorkRequestsOperationTypeDeleteFleet ListWorkRequestsOperationTypeEnum = "DELETE_FLEET" + ListWorkRequestsOperationTypeMoveFleet ListWorkRequestsOperationTypeEnum = "MOVE_FLEET" + ListWorkRequestsOperationTypeUpdateFleet ListWorkRequestsOperationTypeEnum = "UPDATE_FLEET" + ListWorkRequestsOperationTypeUpdateFleetAgentConfiguration ListWorkRequestsOperationTypeEnum = "UPDATE_FLEET_AGENT_CONFIGURATION" + ListWorkRequestsOperationTypeDeleteJavaInstallation ListWorkRequestsOperationTypeEnum = "DELETE_JAVA_INSTALLATION" + ListWorkRequestsOperationTypeCreateJavaInstallation ListWorkRequestsOperationTypeEnum = "CREATE_JAVA_INSTALLATION" + ListWorkRequestsOperationTypeCollectJfr ListWorkRequestsOperationTypeEnum = "COLLECT_JFR" + ListWorkRequestsOperationTypeRequestCryptoEventAnalysis ListWorkRequestsOperationTypeEnum = "REQUEST_CRYPTO_EVENT_ANALYSIS" + ListWorkRequestsOperationTypeRequestPerformanceTuningAnalysis ListWorkRequestsOperationTypeEnum = "REQUEST_PERFORMANCE_TUNING_ANALYSIS" + ListWorkRequestsOperationTypeRequestJavaMigrationAnalysis ListWorkRequestsOperationTypeEnum = "REQUEST_JAVA_MIGRATION_ANALYSIS" + ListWorkRequestsOperationTypeDeleteJmsReport ListWorkRequestsOperationTypeEnum = "DELETE_JMS_REPORT" + ListWorkRequestsOperationTypeScanJavaServerUsage ListWorkRequestsOperationTypeEnum = "SCAN_JAVA_SERVER_USAGE" + ListWorkRequestsOperationTypeScanLibraryUsage ListWorkRequestsOperationTypeEnum = "SCAN_LIBRARY_USAGE" + ListWorkRequestsOperationTypeExportDataCsv ListWorkRequestsOperationTypeEnum = "EXPORT_DATA_CSV" + ListWorkRequestsOperationTypeCreateDrsFile ListWorkRequestsOperationTypeEnum = "CREATE_DRS_FILE" + ListWorkRequestsOperationTypeUpdateDrsFile ListWorkRequestsOperationTypeEnum = "UPDATE_DRS_FILE" + ListWorkRequestsOperationTypeDeleteDrsFile ListWorkRequestsOperationTypeEnum = "DELETE_DRS_FILE" + ListWorkRequestsOperationTypeEnableDrs ListWorkRequestsOperationTypeEnum = "ENABLE_DRS" + ListWorkRequestsOperationTypeDisableDrs ListWorkRequestsOperationTypeEnum = "DISABLE_DRS" +) + +var mappingListWorkRequestsOperationTypeEnum = map[string]ListWorkRequestsOperationTypeEnum{ + "CREATE_FLEET": ListWorkRequestsOperationTypeCreateFleet, + "DELETE_FLEET": ListWorkRequestsOperationTypeDeleteFleet, + "MOVE_FLEET": ListWorkRequestsOperationTypeMoveFleet, + "UPDATE_FLEET": ListWorkRequestsOperationTypeUpdateFleet, + "UPDATE_FLEET_AGENT_CONFIGURATION": ListWorkRequestsOperationTypeUpdateFleetAgentConfiguration, + "DELETE_JAVA_INSTALLATION": ListWorkRequestsOperationTypeDeleteJavaInstallation, + "CREATE_JAVA_INSTALLATION": ListWorkRequestsOperationTypeCreateJavaInstallation, + "COLLECT_JFR": ListWorkRequestsOperationTypeCollectJfr, + "REQUEST_CRYPTO_EVENT_ANALYSIS": ListWorkRequestsOperationTypeRequestCryptoEventAnalysis, + "REQUEST_PERFORMANCE_TUNING_ANALYSIS": ListWorkRequestsOperationTypeRequestPerformanceTuningAnalysis, + "REQUEST_JAVA_MIGRATION_ANALYSIS": ListWorkRequestsOperationTypeRequestJavaMigrationAnalysis, + "DELETE_JMS_REPORT": ListWorkRequestsOperationTypeDeleteJmsReport, + "SCAN_JAVA_SERVER_USAGE": ListWorkRequestsOperationTypeScanJavaServerUsage, + "SCAN_LIBRARY_USAGE": ListWorkRequestsOperationTypeScanLibraryUsage, + "EXPORT_DATA_CSV": ListWorkRequestsOperationTypeExportDataCsv, + "CREATE_DRS_FILE": ListWorkRequestsOperationTypeCreateDrsFile, + "UPDATE_DRS_FILE": ListWorkRequestsOperationTypeUpdateDrsFile, + "DELETE_DRS_FILE": ListWorkRequestsOperationTypeDeleteDrsFile, + "ENABLE_DRS": ListWorkRequestsOperationTypeEnableDrs, + "DISABLE_DRS": ListWorkRequestsOperationTypeDisableDrs, +} + +var mappingListWorkRequestsOperationTypeEnumLowerCase = map[string]ListWorkRequestsOperationTypeEnum{ + "create_fleet": ListWorkRequestsOperationTypeCreateFleet, + "delete_fleet": ListWorkRequestsOperationTypeDeleteFleet, + "move_fleet": ListWorkRequestsOperationTypeMoveFleet, + "update_fleet": ListWorkRequestsOperationTypeUpdateFleet, + "update_fleet_agent_configuration": ListWorkRequestsOperationTypeUpdateFleetAgentConfiguration, + "delete_java_installation": ListWorkRequestsOperationTypeDeleteJavaInstallation, + "create_java_installation": ListWorkRequestsOperationTypeCreateJavaInstallation, + "collect_jfr": ListWorkRequestsOperationTypeCollectJfr, + "request_crypto_event_analysis": ListWorkRequestsOperationTypeRequestCryptoEventAnalysis, + "request_performance_tuning_analysis": ListWorkRequestsOperationTypeRequestPerformanceTuningAnalysis, + "request_java_migration_analysis": ListWorkRequestsOperationTypeRequestJavaMigrationAnalysis, + "delete_jms_report": ListWorkRequestsOperationTypeDeleteJmsReport, + "scan_java_server_usage": ListWorkRequestsOperationTypeScanJavaServerUsage, + "scan_library_usage": ListWorkRequestsOperationTypeScanLibraryUsage, + "export_data_csv": ListWorkRequestsOperationTypeExportDataCsv, + "create_drs_file": ListWorkRequestsOperationTypeCreateDrsFile, + "update_drs_file": ListWorkRequestsOperationTypeUpdateDrsFile, + "delete_drs_file": ListWorkRequestsOperationTypeDeleteDrsFile, + "enable_drs": ListWorkRequestsOperationTypeEnableDrs, + "disable_drs": ListWorkRequestsOperationTypeDisableDrs, +} + +// GetListWorkRequestsOperationTypeEnumValues Enumerates the set of values for ListWorkRequestsOperationTypeEnum +func GetListWorkRequestsOperationTypeEnumValues() []ListWorkRequestsOperationTypeEnum { + values := make([]ListWorkRequestsOperationTypeEnum, 0) + for _, v := range mappingListWorkRequestsOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsOperationTypeEnumStringValues Enumerates the set of values in String for ListWorkRequestsOperationTypeEnum +func GetListWorkRequestsOperationTypeEnumStringValues() []string { + return []string{ + "CREATE_FLEET", + "DELETE_FLEET", + "MOVE_FLEET", + "UPDATE_FLEET", + "UPDATE_FLEET_AGENT_CONFIGURATION", + "DELETE_JAVA_INSTALLATION", + "CREATE_JAVA_INSTALLATION", + "COLLECT_JFR", + "REQUEST_CRYPTO_EVENT_ANALYSIS", + "REQUEST_PERFORMANCE_TUNING_ANALYSIS", + "REQUEST_JAVA_MIGRATION_ANALYSIS", + "DELETE_JMS_REPORT", + "SCAN_JAVA_SERVER_USAGE", + "SCAN_LIBRARY_USAGE", + "EXPORT_DATA_CSV", + "CREATE_DRS_FILE", + "UPDATE_DRS_FILE", + "DELETE_DRS_FILE", + "ENABLE_DRS", + "DISABLE_DRS", + } +} + +// GetMappingListWorkRequestsOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsOperationTypeEnum(val string) (ListWorkRequestsOperationTypeEnum, bool) { + enum, ok := mappingListWorkRequestsOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/manage_drs_details.go b/jms/manage_drs_details.go index eae8d41602..90b776f75b 100644 --- a/jms/manage_drs_details.go +++ b/jms/manage_drs_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/managed_instance_sort_by.go b/jms/managed_instance_sort_by.go index d6101ca433..08aa866899 100644 --- a/jms/managed_instance_sort_by.go +++ b/jms/managed_instance_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/managed_instance_type.go b/jms/managed_instance_type.go index f9a4e56fca..4e0d99783a 100644 --- a/jms/managed_instance_type.go +++ b/jms/managed_instance_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -19,14 +19,17 @@ type ManagedInstanceTypeEnum string // Set of constants representing the allowable values for ManagedInstanceTypeEnum const ( ManagedInstanceTypeOracleManagementAgent ManagedInstanceTypeEnum = "ORACLE_MANAGEMENT_AGENT" + ManagedInstanceTypeOracleCloudAgent ManagedInstanceTypeEnum = "ORACLE_CLOUD_AGENT" ) var mappingManagedInstanceTypeEnum = map[string]ManagedInstanceTypeEnum{ "ORACLE_MANAGEMENT_AGENT": ManagedInstanceTypeOracleManagementAgent, + "ORACLE_CLOUD_AGENT": ManagedInstanceTypeOracleCloudAgent, } var mappingManagedInstanceTypeEnumLowerCase = map[string]ManagedInstanceTypeEnum{ "oracle_management_agent": ManagedInstanceTypeOracleManagementAgent, + "oracle_cloud_agent": ManagedInstanceTypeOracleCloudAgent, } // GetManagedInstanceTypeEnumValues Enumerates the set of values for ManagedInstanceTypeEnum @@ -42,6 +45,7 @@ func GetManagedInstanceTypeEnumValues() []ManagedInstanceTypeEnum { func GetManagedInstanceTypeEnumStringValues() []string { return []string{ "ORACLE_MANAGEMENT_AGENT", + "ORACLE_CLOUD_AGENT", } } diff --git a/jms/managed_instance_usage.go b/jms/managed_instance_usage.go index 4934e2b633..76b7d6477d 100644 --- a/jms/managed_instance_usage.go +++ b/jms/managed_instance_usage.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -49,6 +49,9 @@ type ManagedInstanceUsage struct { // DRS file status DrsFileStatus DrsFileStatusEnum `mandatory:"false" json:"drsFileStatus,omitempty"` + // Comma separated list of user names that invoked applications within this managed instance. + ApplicationInvokedBy *string `mandatory:"false" json:"applicationInvokedBy"` + // Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` diff --git a/jms/managed_instance_usage_collection.go b/jms/managed_instance_usage_collection.go index fefc3b962f..e7da3e0e2a 100644 --- a/jms/managed_instance_usage_collection.go +++ b/jms/managed_instance_usage_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/minimum_key_size_settings.go b/jms/minimum_key_size_settings.go index 46e4661685..7e732626bc 100644 --- a/jms/minimum_key_size_settings.go +++ b/jms/minimum_key_size_settings.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/new_installation_site.go b/jms/new_installation_site.go index 98c1063e07..85103cdd6d 100644 --- a/jms/new_installation_site.go +++ b/jms/new_installation_site.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/operating_system.go b/jms/operating_system.go index 6561b52b26..80582cba74 100644 --- a/jms/operating_system.go +++ b/jms/operating_system.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -18,7 +18,7 @@ import ( // OperatingSystem Operating System of the platform on which the Java Runtime was reported. type OperatingSystem struct { - // The operating system type, such as Windows or Linux + // The operating system type, such as Windows, Linux or macOS Family OsFamilyEnum `mandatory:"true" json:"family"` // The name of the operating system as provided by the Java system property os.name. diff --git a/jms/operation_status.go b/jms/operation_status.go index 3187885654..30c570ac81 100644 --- a/jms/operation_status.go +++ b/jms/operation_status.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/operation_type.go b/jms/operation_type.go index 08b650a8d4..06e7184f9a 100644 --- a/jms/operation_type.go +++ b/jms/operation_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/os_family.go b/jms/os_family.go index abe28488aa..da427a3830 100644 --- a/jms/os_family.go +++ b/jms/os_family.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/package_type.go b/jms/package_type.go new file mode 100644 index 0000000000..712651878b --- /dev/null +++ b/jms/package_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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "strings" +) + +// PackageTypeEnum Enum with underlying type: string +type PackageTypeEnum string + +// Set of constants representing the allowable values for PackageTypeEnum +const ( + PackageTypeRpm PackageTypeEnum = "RPM" + PackageTypeZip PackageTypeEnum = "ZIP" +) + +var mappingPackageTypeEnum = map[string]PackageTypeEnum{ + "RPM": PackageTypeRpm, + "ZIP": PackageTypeZip, +} + +var mappingPackageTypeEnumLowerCase = map[string]PackageTypeEnum{ + "rpm": PackageTypeRpm, + "zip": PackageTypeZip, +} + +// GetPackageTypeEnumValues Enumerates the set of values for PackageTypeEnum +func GetPackageTypeEnumValues() []PackageTypeEnum { + values := make([]PackageTypeEnum, 0) + for _, v := range mappingPackageTypeEnum { + values = append(values, v) + } + return values +} + +// GetPackageTypeEnumStringValues Enumerates the set of values in String for PackageTypeEnum +func GetPackageTypeEnumStringValues() []string { + return []string{ + "RPM", + "ZIP", + } +} + +// GetMappingPackageTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPackageTypeEnum(val string) (PackageTypeEnum, bool) { + enum, ok := mappingPackageTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/patch_detail.go b/jms/patch_detail.go index b53f07119c..e18a1b2983 100644 --- a/jms/patch_detail.go +++ b/jms/patch_detail.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/performance_tuning_analysis.go b/jms/performance_tuning_analysis.go index 3d4f2dffc2..80bf07ec27 100644 --- a/jms/performance_tuning_analysis.go +++ b/jms/performance_tuning_analysis.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/performance_tuning_analysis_result.go b/jms/performance_tuning_analysis_result.go index 2dfb28c253..5b81c465d4 100644 --- a/jms/performance_tuning_analysis_result.go +++ b/jms/performance_tuning_analysis_result.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -60,10 +60,10 @@ type PerformanceTuningAnalysisResult struct { // The time the result is compiled. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // The time the JFR capture started. + // The time the JFR recording has started. TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` - // The time the JFR capture finished. + // The time the JFR recording has finished. TimeFinished *common.SDKTime `mandatory:"true" json:"timeFinished"` // The OCID of the work request to start the analysis. diff --git a/jms/performance_tuning_analysis_result_collection.go b/jms/performance_tuning_analysis_result_collection.go index 16d12a6e26..167deda185 100644 --- a/jms/performance_tuning_analysis_result_collection.go +++ b/jms/performance_tuning_analysis_result_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/performance_tuning_analysis_result_sort_by.go b/jms/performance_tuning_analysis_result_sort_by.go index 5b4817cf86..b84cca6579 100644 --- a/jms/performance_tuning_analysis_result_sort_by.go +++ b/jms/performance_tuning_analysis_result_sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -21,18 +21,21 @@ const ( PerformanceTuningAnalysisResultSortByTimeCreated PerformanceTuningAnalysisResultSortByEnum = "timeCreated" PerformanceTuningAnalysisResultSortByManagedInstanceId PerformanceTuningAnalysisResultSortByEnum = "managedInstanceId" PerformanceTuningAnalysisResultSortByWorkRequestId PerformanceTuningAnalysisResultSortByEnum = "workRequestId" + PerformanceTuningAnalysisResultSortByWarningCount PerformanceTuningAnalysisResultSortByEnum = "warningCount" ) var mappingPerformanceTuningAnalysisResultSortByEnum = map[string]PerformanceTuningAnalysisResultSortByEnum{ "timeCreated": PerformanceTuningAnalysisResultSortByTimeCreated, "managedInstanceId": PerformanceTuningAnalysisResultSortByManagedInstanceId, "workRequestId": PerformanceTuningAnalysisResultSortByWorkRequestId, + "warningCount": PerformanceTuningAnalysisResultSortByWarningCount, } var mappingPerformanceTuningAnalysisResultSortByEnumLowerCase = map[string]PerformanceTuningAnalysisResultSortByEnum{ "timecreated": PerformanceTuningAnalysisResultSortByTimeCreated, "managedinstanceid": PerformanceTuningAnalysisResultSortByManagedInstanceId, "workrequestid": PerformanceTuningAnalysisResultSortByWorkRequestId, + "warningcount": PerformanceTuningAnalysisResultSortByWarningCount, } // GetPerformanceTuningAnalysisResultSortByEnumValues Enumerates the set of values for PerformanceTuningAnalysisResultSortByEnum @@ -50,6 +53,7 @@ func GetPerformanceTuningAnalysisResultSortByEnumStringValues() []string { "timeCreated", "managedInstanceId", "workRequestId", + "warningCount", } } diff --git a/jms/performance_tuning_analysis_result_summary.go b/jms/performance_tuning_analysis_result_summary.go index c38989d0fa..67ca7c5890 100644 --- a/jms/performance_tuning_analysis_result_summary.go +++ b/jms/performance_tuning_analysis_result_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -60,10 +60,10 @@ type PerformanceTuningAnalysisResultSummary struct { // The time the result is compiled. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // The time the JFR capture started. + // The time the JFR recording has started. TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` - // The time the JFR capture finished. + // The time the JFR recording has finished. TimeFinished *common.SDKTime `mandatory:"true" json:"timeFinished"` // The OCID of the work request to start the analysis. diff --git a/jms/performance_tuning_result_status.go b/jms/performance_tuning_result_status.go index b4ef628f84..ea05914d81 100644 --- a/jms/performance_tuning_result_status.go +++ b/jms/performance_tuning_result_status.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/platform_architecture_type.go b/jms/platform_architecture_type.go new file mode 100644 index 0000000000..04f6745f5a --- /dev/null +++ b/jms/platform_architecture_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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "strings" +) + +// PlatformArchitectureTypeEnum Enum with underlying type: string +type PlatformArchitectureTypeEnum string + +// Set of constants representing the allowable values for PlatformArchitectureTypeEnum +const ( + PlatformArchitectureTypeX8664 PlatformArchitectureTypeEnum = "X86_64" + PlatformArchitectureTypeX86 PlatformArchitectureTypeEnum = "X86" + PlatformArchitectureTypeAarch64 PlatformArchitectureTypeEnum = "AARCH64" +) + +var mappingPlatformArchitectureTypeEnum = map[string]PlatformArchitectureTypeEnum{ + "X86_64": PlatformArchitectureTypeX8664, + "X86": PlatformArchitectureTypeX86, + "AARCH64": PlatformArchitectureTypeAarch64, +} + +var mappingPlatformArchitectureTypeEnumLowerCase = map[string]PlatformArchitectureTypeEnum{ + "x86_64": PlatformArchitectureTypeX8664, + "x86": PlatformArchitectureTypeX86, + "aarch64": PlatformArchitectureTypeAarch64, +} + +// GetPlatformArchitectureTypeEnumValues Enumerates the set of values for PlatformArchitectureTypeEnum +func GetPlatformArchitectureTypeEnumValues() []PlatformArchitectureTypeEnum { + values := make([]PlatformArchitectureTypeEnum, 0) + for _, v := range mappingPlatformArchitectureTypeEnum { + values = append(values, v) + } + return values +} + +// GetPlatformArchitectureTypeEnumStringValues Enumerates the set of values in String for PlatformArchitectureTypeEnum +func GetPlatformArchitectureTypeEnumStringValues() []string { + return []string{ + "X86_64", + "X86", + "AARCH64", + } +} + +// GetMappingPlatformArchitectureTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPlatformArchitectureTypeEnum(val string) (PlatformArchitectureTypeEnum, bool) { + enum, ok := mappingPlatformArchitectureTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/plugin.go b/jms/plugin.go index 5ef8cda839..03a4c80e8b 100644 --- a/jms/plugin.go +++ b/jms/plugin.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/post_installation_action_settings.go b/jms/post_installation_action_settings.go index fb6a53546b..30997ed730 100644 --- a/jms/post_installation_action_settings.go +++ b/jms/post_installation_action_settings.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/post_installation_actions.go b/jms/post_installation_actions.go index c3b43d2ef5..1e0139abab 100644 --- a/jms/post_installation_actions.go +++ b/jms/post_installation_actions.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/principal.go b/jms/principal.go index 70d76544d7..e1e59ce76f 100644 --- a/jms/principal.go +++ b/jms/principal.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/proxies.go b/jms/proxies.go index e8db3b2be3..0a8e3a20ca 100644 --- a/jms/proxies.go +++ b/jms/proxies.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/release_type.go b/jms/release_type.go index 4ab24f9d8a..33e900a7fd 100644 --- a/jms/release_type.go +++ b/jms/release_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/remove_fleet_installation_sites_details.go b/jms/remove_fleet_installation_sites_details.go index 234a40d37e..8ac5ebbef3 100644 --- a/jms/remove_fleet_installation_sites_details.go +++ b/jms/remove_fleet_installation_sites_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/remove_fleet_installation_sites_request_response.go b/jms/remove_fleet_installation_sites_request_response.go index ee8c104c8f..a8d0dbc8d3 100644 --- a/jms/remove_fleet_installation_sites_request_response.go +++ b/jms/remove_fleet_installation_sites_request_response.go @@ -94,7 +94,7 @@ type RemoveFleetInstallationSitesResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/request_crypto_analyses_details.go b/jms/request_crypto_analyses_details.go index cd0d423707..016e9c374d 100644 --- a/jms/request_crypto_analyses_details.go +++ b/jms/request_crypto_analyses_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/request_crypto_analyses_request_response.go b/jms/request_crypto_analyses_request_response.go index a4af33f4c3..d5b8d7b851 100644 --- a/jms/request_crypto_analyses_request_response.go +++ b/jms/request_crypto_analyses_request_response.go @@ -80,7 +80,7 @@ type RequestCryptoAnalysesResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/request_deployed_application_migration_analyses_details.go b/jms/request_deployed_application_migration_analyses_details.go new file mode 100644 index 0000000000..58200ea936 --- /dev/null +++ b/jms/request_deployed_application_migration_analyses_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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RequestDeployedApplicationMigrationAnalysesDetails Details of the request to start a Java migration analyses. The analyses requires the managed instance OCID, deployed application key, +// source JDK version, and target JDK version of each selected application. +type RequestDeployedApplicationMigrationAnalysesDetails struct { + + // An array of migration analyses requests. + Targets []DeployedApplicationMigrationAnalysesTarget `mandatory:"true" json:"targets"` +} + +func (m RequestDeployedApplicationMigrationAnalysesDetails) 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 RequestDeployedApplicationMigrationAnalysesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/request_deployed_application_migration_analyses_request_response.go b/jms/request_deployed_application_migration_analyses_request_response.go new file mode 100644 index 0000000000..82c0487877 --- /dev/null +++ b/jms/request_deployed_application_migration_analyses_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 jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RequestDeployedApplicationMigrationAnalysesRequest wrapper for the RequestDeployedApplicationMigrationAnalyses operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/RequestDeployedApplicationMigrationAnalyses.go.html to see an example of how to use RequestDeployedApplicationMigrationAnalysesRequest. +type RequestDeployedApplicationMigrationAnalysesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // Detail information that starts the deployed Java migration analyses + RequestDeployedApplicationMigrationAnalysesDetails `contributesTo:"body"` + + // 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 RequestDeployedApplicationMigrationAnalysesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RequestDeployedApplicationMigrationAnalysesRequest) 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 RequestDeployedApplicationMigrationAnalysesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RequestDeployedApplicationMigrationAnalysesRequest) 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 RequestDeployedApplicationMigrationAnalysesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RequestDeployedApplicationMigrationAnalysesResponse wrapper for the RequestDeployedApplicationMigrationAnalyses operation +type RequestDeployedApplicationMigrationAnalysesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. + // You can use this to query the status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RequestDeployedApplicationMigrationAnalysesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RequestDeployedApplicationMigrationAnalysesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/request_java_migration_analyses_details.go b/jms/request_java_migration_analyses_details.go index 2764f10b00..274083cd35 100644 --- a/jms/request_java_migration_analyses_details.go +++ b/jms/request_java_migration_analyses_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/request_java_migration_analyses_request_response.go b/jms/request_java_migration_analyses_request_response.go index 7f8f763ee3..a7bdf2e0a8 100644 --- a/jms/request_java_migration_analyses_request_response.go +++ b/jms/request_java_migration_analyses_request_response.go @@ -80,7 +80,7 @@ type RequestJavaMigrationAnalysesResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/request_jfr_recordings_details.go b/jms/request_jfr_recordings_details.go index 7667be3d2a..6bf1dd0929 100644 --- a/jms/request_jfr_recordings_details.go +++ b/jms/request_jfr_recordings_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/request_jfr_recordings_request_response.go b/jms/request_jfr_recordings_request_response.go index 987797136c..304e459c64 100644 --- a/jms/request_jfr_recordings_request_response.go +++ b/jms/request_jfr_recordings_request_response.go @@ -80,7 +80,7 @@ type RequestJfrRecordingsResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/request_performance_tuning_analyses_details.go b/jms/request_performance_tuning_analyses_details.go index 4e54dc3eba..de218e29a9 100644 --- a/jms/request_performance_tuning_analyses_details.go +++ b/jms/request_performance_tuning_analyses_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/request_performance_tuning_analyses_request_response.go b/jms/request_performance_tuning_analyses_request_response.go index f3c9ce766b..3553d1757f 100644 --- a/jms/request_performance_tuning_analyses_request_response.go +++ b/jms/request_performance_tuning_analyses_request_response.go @@ -80,7 +80,7 @@ type RequestPerformanceTuningAnalysesResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/resource_inventory.go b/jms/resource_inventory.go index b06c6ef957..352002015f 100644 --- a/jms/resource_inventory.go +++ b/jms/resource_inventory.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/scan_java_server_usage_details.go b/jms/scan_java_server_usage_details.go index 141293061a..297f9a0d48 100644 --- a/jms/scan_java_server_usage_details.go +++ b/jms/scan_java_server_usage_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/scan_java_server_usage_request_response.go b/jms/scan_java_server_usage_request_response.go index 681d3a0a44..5cd3d26941 100644 --- a/jms/scan_java_server_usage_request_response.go +++ b/jms/scan_java_server_usage_request_response.go @@ -94,7 +94,7 @@ type ScanJavaServerUsageResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/scan_library_usage_details.go b/jms/scan_library_usage_details.go index 12b2371479..c89ecd9a19 100644 --- a/jms/scan_library_usage_details.go +++ b/jms/scan_library_usage_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/scan_library_usage_request_response.go b/jms/scan_library_usage_request_response.go index 62f23ceb54..bd2ba99c2f 100644 --- a/jms/scan_library_usage_request_response.go +++ b/jms/scan_library_usage_request_response.go @@ -94,7 +94,7 @@ type ScanLibraryUsageResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/sort_by.go b/jms/sort_by.go index c18d80f8b9..bf476cfd30 100644 --- a/jms/sort_by.go +++ b/jms/sort_by.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/sort_order.go b/jms/sort_order.go index bfd8698c79..0f29d34102 100644 --- a/jms/sort_order.go +++ b/jms/sort_order.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/summarize_application_installation_usage_request_response.go b/jms/summarize_application_installation_usage_request_response.go index c0cc373ed6..d8680c201c 100644 --- a/jms/summarize_application_installation_usage_request_response.go +++ b/jms/summarize_application_installation_usage_request_response.go @@ -149,10 +149,10 @@ type SummarizeApplicationInstallationUsageResponse struct { ApplicationInstallationUsageSummaryCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` @@ -222,6 +222,7 @@ const ( SummarizeApplicationInstallationUsageSortByApproximatejrecount SummarizeApplicationInstallationUsageSortByEnum = "approximateJreCount" SummarizeApplicationInstallationUsageSortByApproximateinstallationcount SummarizeApplicationInstallationUsageSortByEnum = "approximateInstallationCount" SummarizeApplicationInstallationUsageSortByApproximatemanagedinstancecount SummarizeApplicationInstallationUsageSortByEnum = "approximateManagedInstanceCount" + SummarizeApplicationInstallationUsageSortByApproximatelibrarycount SummarizeApplicationInstallationUsageSortByEnum = "approximateLibraryCount" ) var mappingSummarizeApplicationInstallationUsageSortByEnum = map[string]SummarizeApplicationInstallationUsageSortByEnum{ @@ -233,6 +234,7 @@ var mappingSummarizeApplicationInstallationUsageSortByEnum = map[string]Summariz "approximateJreCount": SummarizeApplicationInstallationUsageSortByApproximatejrecount, "approximateInstallationCount": SummarizeApplicationInstallationUsageSortByApproximateinstallationcount, "approximateManagedInstanceCount": SummarizeApplicationInstallationUsageSortByApproximatemanagedinstancecount, + "approximateLibraryCount": SummarizeApplicationInstallationUsageSortByApproximatelibrarycount, } var mappingSummarizeApplicationInstallationUsageSortByEnumLowerCase = map[string]SummarizeApplicationInstallationUsageSortByEnum{ @@ -244,6 +246,7 @@ var mappingSummarizeApplicationInstallationUsageSortByEnumLowerCase = map[string "approximatejrecount": SummarizeApplicationInstallationUsageSortByApproximatejrecount, "approximateinstallationcount": SummarizeApplicationInstallationUsageSortByApproximateinstallationcount, "approximatemanagedinstancecount": SummarizeApplicationInstallationUsageSortByApproximatemanagedinstancecount, + "approximatelibrarycount": SummarizeApplicationInstallationUsageSortByApproximatelibrarycount, } // GetSummarizeApplicationInstallationUsageSortByEnumValues Enumerates the set of values for SummarizeApplicationInstallationUsageSortByEnum @@ -266,6 +269,7 @@ func GetSummarizeApplicationInstallationUsageSortByEnumStringValues() []string { "approximateJreCount", "approximateInstallationCount", "approximateManagedInstanceCount", + "approximateLibraryCount", } } diff --git a/jms/summarize_application_usage_fields.go b/jms/summarize_application_usage_fields.go index 6e01753141..ff78e00f07 100644 --- a/jms/summarize_application_usage_fields.go +++ b/jms/summarize_application_usage_fields.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/summarize_application_usage_request_response.go b/jms/summarize_application_usage_request_response.go index 961d485ec7..0c0b5ca4e0 100644 --- a/jms/summarize_application_usage_request_response.go +++ b/jms/summarize_application_usage_request_response.go @@ -154,10 +154,10 @@ type SummarizeApplicationUsageResponse struct { ApplicationUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` @@ -225,6 +225,7 @@ const ( SummarizeApplicationUsageSortByApproximatejrecount SummarizeApplicationUsageSortByEnum = "approximateJreCount" SummarizeApplicationUsageSortByApproximateinstallationcount SummarizeApplicationUsageSortByEnum = "approximateInstallationCount" SummarizeApplicationUsageSortByApproximatemanagedinstancecount SummarizeApplicationUsageSortByEnum = "approximateManagedInstanceCount" + SummarizeApplicationUsageSortByApproximatelibrarycount SummarizeApplicationUsageSortByEnum = "approximateLibraryCount" SummarizeApplicationUsageSortByOsname SummarizeApplicationUsageSortByEnum = "osName" ) @@ -235,6 +236,7 @@ var mappingSummarizeApplicationUsageSortByEnum = map[string]SummarizeApplication "approximateJreCount": SummarizeApplicationUsageSortByApproximatejrecount, "approximateInstallationCount": SummarizeApplicationUsageSortByApproximateinstallationcount, "approximateManagedInstanceCount": SummarizeApplicationUsageSortByApproximatemanagedinstancecount, + "approximateLibraryCount": SummarizeApplicationUsageSortByApproximatelibrarycount, "osName": SummarizeApplicationUsageSortByOsname, } @@ -245,6 +247,7 @@ var mappingSummarizeApplicationUsageSortByEnumLowerCase = map[string]SummarizeAp "approximatejrecount": SummarizeApplicationUsageSortByApproximatejrecount, "approximateinstallationcount": SummarizeApplicationUsageSortByApproximateinstallationcount, "approximatemanagedinstancecount": SummarizeApplicationUsageSortByApproximatemanagedinstancecount, + "approximatelibrarycount": SummarizeApplicationUsageSortByApproximatelibrarycount, "osname": SummarizeApplicationUsageSortByOsname, } @@ -266,6 +269,7 @@ func GetSummarizeApplicationUsageSortByEnumStringValues() []string { "approximateJreCount", "approximateInstallationCount", "approximateManagedInstanceCount", + "approximateLibraryCount", "osName", } } diff --git a/jms/summarize_deployed_application_installation_usage_request_response.go b/jms/summarize_deployed_application_installation_usage_request_response.go index 92177d37d8..02783a3df2 100644 --- a/jms/summarize_deployed_application_installation_usage_request_response.go +++ b/jms/summarize_deployed_application_installation_usage_request_response.go @@ -129,10 +129,10 @@ type SummarizeDeployedApplicationInstallationUsageResponse struct { DeployedApplicationInstallationUsageSummaryCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` @@ -194,33 +194,39 @@ type SummarizeDeployedApplicationInstallationUsageSortByEnum string // Set of constants representing the allowable values for SummarizeDeployedApplicationInstallationUsageSortByEnum const ( - SummarizeDeployedApplicationInstallationUsageSortByApplicationname SummarizeDeployedApplicationInstallationUsageSortByEnum = "applicationName" - SummarizeDeployedApplicationInstallationUsageSortByApplicationtype SummarizeDeployedApplicationInstallationUsageSortByEnum = "applicationType" - SummarizeDeployedApplicationInstallationUsageSortByApplicationsourcepath SummarizeDeployedApplicationInstallationUsageSortByEnum = "applicationSourcePath" - SummarizeDeployedApplicationInstallationUsageSortByIsclustered SummarizeDeployedApplicationInstallationUsageSortByEnum = "isClustered" - SummarizeDeployedApplicationInstallationUsageSortByJavaserverinstancecount SummarizeDeployedApplicationInstallationUsageSortByEnum = "javaServerInstanceCount" - SummarizeDeployedApplicationInstallationUsageSortByTimefirstseen SummarizeDeployedApplicationInstallationUsageSortByEnum = "timeFirstSeen" - SummarizeDeployedApplicationInstallationUsageSortByTimelastseen SummarizeDeployedApplicationInstallationUsageSortByEnum = "timeLastSeen" + SummarizeDeployedApplicationInstallationUsageSortByApplicationname SummarizeDeployedApplicationInstallationUsageSortByEnum = "applicationName" + SummarizeDeployedApplicationInstallationUsageSortByApplicationtype SummarizeDeployedApplicationInstallationUsageSortByEnum = "applicationType" + SummarizeDeployedApplicationInstallationUsageSortByApplicationsourcepath SummarizeDeployedApplicationInstallationUsageSortByEnum = "applicationSourcePath" + SummarizeDeployedApplicationInstallationUsageSortByIsclustered SummarizeDeployedApplicationInstallationUsageSortByEnum = "isClustered" + SummarizeDeployedApplicationInstallationUsageSortByJavaserverinstancecount SummarizeDeployedApplicationInstallationUsageSortByEnum = "javaServerInstanceCount" + SummarizeDeployedApplicationInstallationUsageSortByApproximatejavaserverinstancecount SummarizeDeployedApplicationInstallationUsageSortByEnum = "approximateJavaServerInstanceCount" + SummarizeDeployedApplicationInstallationUsageSortByApproximatelibrarycount SummarizeDeployedApplicationInstallationUsageSortByEnum = "approximateLibraryCount" + SummarizeDeployedApplicationInstallationUsageSortByTimefirstseen SummarizeDeployedApplicationInstallationUsageSortByEnum = "timeFirstSeen" + SummarizeDeployedApplicationInstallationUsageSortByTimelastseen SummarizeDeployedApplicationInstallationUsageSortByEnum = "timeLastSeen" ) var mappingSummarizeDeployedApplicationInstallationUsageSortByEnum = map[string]SummarizeDeployedApplicationInstallationUsageSortByEnum{ - "applicationName": SummarizeDeployedApplicationInstallationUsageSortByApplicationname, - "applicationType": SummarizeDeployedApplicationInstallationUsageSortByApplicationtype, - "applicationSourcePath": SummarizeDeployedApplicationInstallationUsageSortByApplicationsourcepath, - "isClustered": SummarizeDeployedApplicationInstallationUsageSortByIsclustered, - "javaServerInstanceCount": SummarizeDeployedApplicationInstallationUsageSortByJavaserverinstancecount, - "timeFirstSeen": SummarizeDeployedApplicationInstallationUsageSortByTimefirstseen, - "timeLastSeen": SummarizeDeployedApplicationInstallationUsageSortByTimelastseen, + "applicationName": SummarizeDeployedApplicationInstallationUsageSortByApplicationname, + "applicationType": SummarizeDeployedApplicationInstallationUsageSortByApplicationtype, + "applicationSourcePath": SummarizeDeployedApplicationInstallationUsageSortByApplicationsourcepath, + "isClustered": SummarizeDeployedApplicationInstallationUsageSortByIsclustered, + "javaServerInstanceCount": SummarizeDeployedApplicationInstallationUsageSortByJavaserverinstancecount, + "approximateJavaServerInstanceCount": SummarizeDeployedApplicationInstallationUsageSortByApproximatejavaserverinstancecount, + "approximateLibraryCount": SummarizeDeployedApplicationInstallationUsageSortByApproximatelibrarycount, + "timeFirstSeen": SummarizeDeployedApplicationInstallationUsageSortByTimefirstseen, + "timeLastSeen": SummarizeDeployedApplicationInstallationUsageSortByTimelastseen, } var mappingSummarizeDeployedApplicationInstallationUsageSortByEnumLowerCase = map[string]SummarizeDeployedApplicationInstallationUsageSortByEnum{ - "applicationname": SummarizeDeployedApplicationInstallationUsageSortByApplicationname, - "applicationtype": SummarizeDeployedApplicationInstallationUsageSortByApplicationtype, - "applicationsourcepath": SummarizeDeployedApplicationInstallationUsageSortByApplicationsourcepath, - "isclustered": SummarizeDeployedApplicationInstallationUsageSortByIsclustered, - "javaserverinstancecount": SummarizeDeployedApplicationInstallationUsageSortByJavaserverinstancecount, - "timefirstseen": SummarizeDeployedApplicationInstallationUsageSortByTimefirstseen, - "timelastseen": SummarizeDeployedApplicationInstallationUsageSortByTimelastseen, + "applicationname": SummarizeDeployedApplicationInstallationUsageSortByApplicationname, + "applicationtype": SummarizeDeployedApplicationInstallationUsageSortByApplicationtype, + "applicationsourcepath": SummarizeDeployedApplicationInstallationUsageSortByApplicationsourcepath, + "isclustered": SummarizeDeployedApplicationInstallationUsageSortByIsclustered, + "javaserverinstancecount": SummarizeDeployedApplicationInstallationUsageSortByJavaserverinstancecount, + "approximatejavaserverinstancecount": SummarizeDeployedApplicationInstallationUsageSortByApproximatejavaserverinstancecount, + "approximatelibrarycount": SummarizeDeployedApplicationInstallationUsageSortByApproximatelibrarycount, + "timefirstseen": SummarizeDeployedApplicationInstallationUsageSortByTimefirstseen, + "timelastseen": SummarizeDeployedApplicationInstallationUsageSortByTimelastseen, } // GetSummarizeDeployedApplicationInstallationUsageSortByEnumValues Enumerates the set of values for SummarizeDeployedApplicationInstallationUsageSortByEnum @@ -240,6 +246,8 @@ func GetSummarizeDeployedApplicationInstallationUsageSortByEnumStringValues() [] "applicationSourcePath", "isClustered", "javaServerInstanceCount", + "approximateJavaServerInstanceCount", + "approximateLibraryCount", "timeFirstSeen", "timeLastSeen", } diff --git a/jms/summarize_deployed_application_usage_request_response.go b/jms/summarize_deployed_application_usage_request_response.go index 3254d4860a..b06c4b5c23 100644 --- a/jms/summarize_deployed_application_usage_request_response.go +++ b/jms/summarize_deployed_application_usage_request_response.go @@ -122,10 +122,10 @@ type SummarizeDeployedApplicationUsageResponse struct { DeployedApplicationUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` @@ -187,30 +187,36 @@ type SummarizeDeployedApplicationUsageSortByEnum string // Set of constants representing the allowable values for SummarizeDeployedApplicationUsageSortByEnum const ( - SummarizeDeployedApplicationUsageSortByApplicationname SummarizeDeployedApplicationUsageSortByEnum = "applicationName" - SummarizeDeployedApplicationUsageSortByApplicationtype SummarizeDeployedApplicationUsageSortByEnum = "applicationType" - SummarizeDeployedApplicationUsageSortByIsclustered SummarizeDeployedApplicationUsageSortByEnum = "isClustered" - SummarizeDeployedApplicationUsageSortByJavaserverinstancecount SummarizeDeployedApplicationUsageSortByEnum = "javaServerInstanceCount" - SummarizeDeployedApplicationUsageSortByTimefirstseen SummarizeDeployedApplicationUsageSortByEnum = "timeFirstSeen" - SummarizeDeployedApplicationUsageSortByTimelastseen SummarizeDeployedApplicationUsageSortByEnum = "timeLastSeen" + SummarizeDeployedApplicationUsageSortByApplicationname SummarizeDeployedApplicationUsageSortByEnum = "applicationName" + SummarizeDeployedApplicationUsageSortByApplicationtype SummarizeDeployedApplicationUsageSortByEnum = "applicationType" + SummarizeDeployedApplicationUsageSortByIsclustered SummarizeDeployedApplicationUsageSortByEnum = "isClustered" + SummarizeDeployedApplicationUsageSortByJavaserverinstancecount SummarizeDeployedApplicationUsageSortByEnum = "javaServerInstanceCount" + SummarizeDeployedApplicationUsageSortByApproximatejavaserverinstancecount SummarizeDeployedApplicationUsageSortByEnum = "approximateJavaServerInstanceCount" + SummarizeDeployedApplicationUsageSortByApproximatelibrarycount SummarizeDeployedApplicationUsageSortByEnum = "approximateLibraryCount" + SummarizeDeployedApplicationUsageSortByTimefirstseen SummarizeDeployedApplicationUsageSortByEnum = "timeFirstSeen" + SummarizeDeployedApplicationUsageSortByTimelastseen SummarizeDeployedApplicationUsageSortByEnum = "timeLastSeen" ) var mappingSummarizeDeployedApplicationUsageSortByEnum = map[string]SummarizeDeployedApplicationUsageSortByEnum{ - "applicationName": SummarizeDeployedApplicationUsageSortByApplicationname, - "applicationType": SummarizeDeployedApplicationUsageSortByApplicationtype, - "isClustered": SummarizeDeployedApplicationUsageSortByIsclustered, - "javaServerInstanceCount": SummarizeDeployedApplicationUsageSortByJavaserverinstancecount, - "timeFirstSeen": SummarizeDeployedApplicationUsageSortByTimefirstseen, - "timeLastSeen": SummarizeDeployedApplicationUsageSortByTimelastseen, + "applicationName": SummarizeDeployedApplicationUsageSortByApplicationname, + "applicationType": SummarizeDeployedApplicationUsageSortByApplicationtype, + "isClustered": SummarizeDeployedApplicationUsageSortByIsclustered, + "javaServerInstanceCount": SummarizeDeployedApplicationUsageSortByJavaserverinstancecount, + "approximateJavaServerInstanceCount": SummarizeDeployedApplicationUsageSortByApproximatejavaserverinstancecount, + "approximateLibraryCount": SummarizeDeployedApplicationUsageSortByApproximatelibrarycount, + "timeFirstSeen": SummarizeDeployedApplicationUsageSortByTimefirstseen, + "timeLastSeen": SummarizeDeployedApplicationUsageSortByTimelastseen, } var mappingSummarizeDeployedApplicationUsageSortByEnumLowerCase = map[string]SummarizeDeployedApplicationUsageSortByEnum{ - "applicationname": SummarizeDeployedApplicationUsageSortByApplicationname, - "applicationtype": SummarizeDeployedApplicationUsageSortByApplicationtype, - "isclustered": SummarizeDeployedApplicationUsageSortByIsclustered, - "javaserverinstancecount": SummarizeDeployedApplicationUsageSortByJavaserverinstancecount, - "timefirstseen": SummarizeDeployedApplicationUsageSortByTimefirstseen, - "timelastseen": SummarizeDeployedApplicationUsageSortByTimelastseen, + "applicationname": SummarizeDeployedApplicationUsageSortByApplicationname, + "applicationtype": SummarizeDeployedApplicationUsageSortByApplicationtype, + "isclustered": SummarizeDeployedApplicationUsageSortByIsclustered, + "javaserverinstancecount": SummarizeDeployedApplicationUsageSortByJavaserverinstancecount, + "approximatejavaserverinstancecount": SummarizeDeployedApplicationUsageSortByApproximatejavaserverinstancecount, + "approximatelibrarycount": SummarizeDeployedApplicationUsageSortByApproximatelibrarycount, + "timefirstseen": SummarizeDeployedApplicationUsageSortByTimefirstseen, + "timelastseen": SummarizeDeployedApplicationUsageSortByTimelastseen, } // GetSummarizeDeployedApplicationUsageSortByEnumValues Enumerates the set of values for SummarizeDeployedApplicationUsageSortByEnum @@ -229,6 +235,8 @@ func GetSummarizeDeployedApplicationUsageSortByEnumStringValues() []string { "applicationType", "isClustered", "javaServerInstanceCount", + "approximateJavaServerInstanceCount", + "approximateLibraryCount", "timeFirstSeen", "timeLastSeen", } diff --git a/jms/summarize_installation_usage_fields.go b/jms/summarize_installation_usage_fields.go index 983027a9e6..e0de0cdfcb 100644 --- a/jms/summarize_installation_usage_fields.go +++ b/jms/summarize_installation_usage_fields.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/summarize_installation_usage_request_response.go b/jms/summarize_installation_usage_request_response.go index 69a7efb30c..99b3c8bc1e 100644 --- a/jms/summarize_installation_usage_request_response.go +++ b/jms/summarize_installation_usage_request_response.go @@ -144,10 +144,10 @@ type SummarizeInstallationUsageResponse struct { InstallationUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/summarize_java_server_instance_usage_request_response.go b/jms/summarize_java_server_instance_usage_request_response.go index 84849cb7e8..2277fc2c67 100644 --- a/jms/summarize_java_server_instance_usage_request_response.go +++ b/jms/summarize_java_server_instance_usage_request_response.go @@ -122,10 +122,10 @@ type SummarizeJavaServerInstanceUsageResponse struct { JavaServerInstanceUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/summarize_java_server_usage_request_response.go b/jms/summarize_java_server_usage_request_response.go index acc2022969..36475ad295 100644 --- a/jms/summarize_java_server_usage_request_response.go +++ b/jms/summarize_java_server_usage_request_response.go @@ -113,10 +113,10 @@ type SummarizeJavaServerUsageResponse struct { JavaServerUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/summarize_jre_usage_fields.go b/jms/summarize_jre_usage_fields.go index 85d5f70a4e..57e65acaaf 100644 --- a/jms/summarize_jre_usage_fields.go +++ b/jms/summarize_jre_usage_fields.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/summarize_jre_usage_request_response.go b/jms/summarize_jre_usage_request_response.go index e3c3494b01..96e8039506 100644 --- a/jms/summarize_jre_usage_request_response.go +++ b/jms/summarize_jre_usage_request_response.go @@ -149,10 +149,10 @@ type SummarizeJreUsageResponse struct { JreUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/summarize_library_usage_request_response.go b/jms/summarize_library_usage_request_response.go index ddb0929483..c08a8d0cc8 100644 --- a/jms/summarize_library_usage_request_response.go +++ b/jms/summarize_library_usage_request_response.go @@ -39,6 +39,12 @@ type SummarizeLibraryUsageRequest struct { // The library name. LibraryName *string `mandatory:"false" contributesTo:"query" name:"libraryName"` + // Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + CvssScoreGreaterThan *int `mandatory:"false" contributesTo:"query" name:"cvssScoreGreaterThan"` + + // Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + CvssScoreLessThan *int `mandatory:"false" contributesTo:"query" name:"cvssScoreLessThan"` + // The start of the time period during which resources are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` @@ -119,10 +125,10 @@ type SummarizeLibraryUsageResponse struct { LibraryUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` diff --git a/jms/summarize_managed_instance_usage_fields.go b/jms/summarize_managed_instance_usage_fields.go index 359726929d..4d4c521bc9 100644 --- a/jms/summarize_managed_instance_usage_fields.go +++ b/jms/summarize_managed_instance_usage_fields.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/summarize_managed_instance_usage_request_response.go b/jms/summarize_managed_instance_usage_request_response.go index 3be1f4c78f..f95950c5c9 100644 --- a/jms/summarize_managed_instance_usage_request_response.go +++ b/jms/summarize_managed_instance_usage_request_response.go @@ -154,10 +154,10 @@ type SummarizeManagedInstanceUsageResponse struct { ManagedInstanceUsageCollection `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - // For list pagination. When this header appears in the response, additional pages of results remain. + // For list pagination, when this header appears in the response, additional pages of results remain. // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` @@ -177,15 +177,18 @@ type SummarizeManagedInstanceUsageManagedInstanceTypeEnum string // Set of constants representing the allowable values for SummarizeManagedInstanceUsageManagedInstanceTypeEnum const ( - SummarizeManagedInstanceUsageManagedInstanceTypeOracleManagementAgent SummarizeManagedInstanceUsageManagedInstanceTypeEnum = "ORACLE_MANAGEMENT_AGENT" + SummarizeManagedInstanceUsageManagedInstanceTypeManagementAgent SummarizeManagedInstanceUsageManagedInstanceTypeEnum = "ORACLE_MANAGEMENT_AGENT" + SummarizeManagedInstanceUsageManagedInstanceTypeCloudAgent SummarizeManagedInstanceUsageManagedInstanceTypeEnum = "ORACLE_CLOUD_AGENT" ) var mappingSummarizeManagedInstanceUsageManagedInstanceTypeEnum = map[string]SummarizeManagedInstanceUsageManagedInstanceTypeEnum{ - "ORACLE_MANAGEMENT_AGENT": SummarizeManagedInstanceUsageManagedInstanceTypeOracleManagementAgent, + "ORACLE_MANAGEMENT_AGENT": SummarizeManagedInstanceUsageManagedInstanceTypeManagementAgent, + "ORACLE_CLOUD_AGENT": SummarizeManagedInstanceUsageManagedInstanceTypeCloudAgent, } var mappingSummarizeManagedInstanceUsageManagedInstanceTypeEnumLowerCase = map[string]SummarizeManagedInstanceUsageManagedInstanceTypeEnum{ - "oracle_management_agent": SummarizeManagedInstanceUsageManagedInstanceTypeOracleManagementAgent, + "oracle_management_agent": SummarizeManagedInstanceUsageManagedInstanceTypeManagementAgent, + "oracle_cloud_agent": SummarizeManagedInstanceUsageManagedInstanceTypeCloudAgent, } // GetSummarizeManagedInstanceUsageManagedInstanceTypeEnumValues Enumerates the set of values for SummarizeManagedInstanceUsageManagedInstanceTypeEnum @@ -201,6 +204,7 @@ func GetSummarizeManagedInstanceUsageManagedInstanceTypeEnumValues() []Summarize func GetSummarizeManagedInstanceUsageManagedInstanceTypeEnumStringValues() []string { return []string{ "ORACLE_MANAGEMENT_AGENT", + "ORACLE_CLOUD_AGENT", } } diff --git a/jms/summarize_resource_inventory_request_response.go b/jms/summarize_resource_inventory_request_response.go index 23179ee86e..e900993872 100644 --- a/jms/summarize_resource_inventory_request_response.go +++ b/jms/summarize_resource_inventory_request_response.go @@ -82,7 +82,7 @@ type SummarizeResourceInventoryResponse struct { ResourceInventory `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/summarized_events_log.go b/jms/summarized_events_log.go index 37f47345a0..0098fe9b22 100644 --- a/jms/summarized_events_log.go +++ b/jms/summarized_events_log.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/support_type.go b/jms/support_type.go index 66b3193d12..268b946d3e 100644 --- a/jms/support_type.go +++ b/jms/support_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/tls_versions.go b/jms/tls_versions.go index 903ae7dbb8..d270b10916 100644 --- a/jms/tls_versions.go +++ b/jms/tls_versions.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/update_drs_file_details.go b/jms/update_drs_file_details.go index 8c283ba5be..495ac1f9b9 100644 --- a/jms/update_drs_file_details.go +++ b/jms/update_drs_file_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/update_drs_file_request_response.go b/jms/update_drs_file_request_response.go index 4791f1bb03..e2a9d3edaf 100644 --- a/jms/update_drs_file_request_response.go +++ b/jms/update_drs_file_request_response.go @@ -97,7 +97,7 @@ type UpdateDrsFileResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/update_export_setting_details.go b/jms/update_export_setting_details.go index 752b2c16f6..87b639bfdf 100644 --- a/jms/update_export_setting_details.go +++ b/jms/update_export_setting_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -15,7 +15,7 @@ import ( "strings" ) -// UpdateExportSettingDetails Attributes to update a Export setting. +// UpdateExportSettingDetails Attributes to update an export setting. type UpdateExportSettingDetails struct { // ExportSetting flag to store enabled or disabled status. @@ -36,7 +36,7 @@ type UpdateExportSettingDetails struct { // The namespace of the bucket where data will be exported. TargetBucketNamespace *string `mandatory:"false" json:"targetBucketNamespace"` - // The namespace of the bucket where data will be exported. + // The id of the region of the target bucket. TargetBucketRegion *string `mandatory:"false" json:"targetBucketRegion"` // Schedule at which data will be exported. diff --git a/jms/update_export_setting_request_response.go b/jms/update_export_setting_request_response.go index 7cfffa240e..27bc3c2246 100644 --- a/jms/update_export_setting_request_response.go +++ b/jms/update_export_setting_request_response.go @@ -21,7 +21,7 @@ type UpdateExportSettingRequest struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` - // The new details for the Export setting. + // The new details for the export setting. UpdateExportSettingDetails `contributesTo:"body"` // For optimistic concurrency control. In the PUT or DELETE call @@ -89,7 +89,7 @@ type UpdateExportSettingResponse struct { 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. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/update_fleet_advanced_feature_configuration_details.go b/jms/update_fleet_advanced_feature_configuration_details.go index 8a9a7d6880..5987523568 100644 --- a/jms/update_fleet_advanced_feature_configuration_details.go +++ b/jms/update_fleet_advanced_feature_configuration_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/update_fleet_advanced_feature_configuration_request_response.go b/jms/update_fleet_advanced_feature_configuration_request_response.go index 26913079aa..2332df7b51 100644 --- a/jms/update_fleet_advanced_feature_configuration_request_response.go +++ b/jms/update_fleet_advanced_feature_configuration_request_response.go @@ -93,7 +93,7 @@ type UpdateFleetAdvancedFeatureConfigurationResponse struct { FleetAdvancedFeatureConfiguration `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For optimistic concurrency control. See `if-match`. diff --git a/jms/update_fleet_agent_configuration_details.go b/jms/update_fleet_agent_configuration_details.go index 365545ed3d..00e6a0a1f8 100644 --- a/jms/update_fleet_agent_configuration_details.go +++ b/jms/update_fleet_agent_configuration_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -30,6 +30,12 @@ type UpdateFleetAgentConfigurationDetails struct { // Agent polling interval in minutes AgentPollingIntervalInMinutes *int `mandatory:"false" json:"agentPollingIntervalInMinutes"` + // Collect JMS agent metrics on all managed instances in the fleet. + IsCollectingManagedInstanceMetricsEnabled *bool `mandatory:"false" json:"isCollectingManagedInstanceMetricsEnabled"` + + // Collect username for application invocations for all managed instances in the fleet. + IsCollectingUsernamesEnabled *bool `mandatory:"false" json:"isCollectingUsernamesEnabled"` + LinuxConfiguration *FleetAgentOsConfiguration `mandatory:"false" json:"linuxConfiguration"` WindowsConfiguration *FleetAgentOsConfiguration `mandatory:"false" json:"windowsConfiguration"` diff --git a/jms/update_fleet_agent_configuration_request_response.go b/jms/update_fleet_agent_configuration_request_response.go index 5d4787f777..66fef8dfc7 100644 --- a/jms/update_fleet_agent_configuration_request_response.go +++ b/jms/update_fleet_agent_configuration_request_response.go @@ -87,7 +87,7 @@ type UpdateFleetAgentConfigurationResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/update_fleet_details.go b/jms/update_fleet_details.go index c23462f443..55b6dcd5d4 100644 --- a/jms/update_fleet_details.go +++ b/jms/update_fleet_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/update_fleet_request_response.go b/jms/update_fleet_request_response.go index 8026c5185c..85cce78780 100644 --- a/jms/update_fleet_request_response.go +++ b/jms/update_fleet_request_response.go @@ -87,7 +87,7 @@ type UpdateFleetResponse struct { OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // Oracle about a particular request, provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/jms/update_jms_plugin_details.go b/jms/update_jms_plugin_details.go new file mode 100644 index 0000000000..0e57b2484f --- /dev/null +++ b/jms/update_jms_plugin_details.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. + +// Java Management Service Fleets API +// +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateJmsPluginDetails Attributes to update a JmsPlugin. +type UpdateJmsPluginDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + FleetId *string `mandatory:"false" json:"fleetId"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateJmsPluginDetails) 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 UpdateJmsPluginDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/update_jms_plugin_request_response.go b/jms/update_jms_plugin_request_response.go new file mode 100644 index 0000000000..82a418919b --- /dev/null +++ b/jms/update_jms_plugin_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 jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateJmsPluginRequest wrapper for the UpdateJmsPlugin operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/UpdateJmsPlugin.go.html to see an example of how to use UpdateJmsPluginRequest. +type UpdateJmsPluginRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + JmsPluginId *string `mandatory:"true" contributesTo:"path" name:"jmsPluginId"` + + // The new details for the JmsPlugin. + UpdateJmsPluginDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // ETag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the ETag you + // provide matches the resource's current ETag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 UpdateJmsPluginRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateJmsPluginRequest) 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 UpdateJmsPluginRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateJmsPluginRequest) 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 UpdateJmsPluginRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateJmsPluginResponse wrapper for the UpdateJmsPlugin operation +type UpdateJmsPluginResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JmsPlugin instance + JmsPlugin `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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateJmsPluginResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateJmsPluginResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/work_item_collection.go b/jms/work_item_collection.go index a0bfb39b68..a1b9778f15 100644 --- a/jms/work_item_collection.go +++ b/jms/work_item_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_item_details.go b/jms/work_item_details.go index ae06b7b6bd..a46e279914 100644 --- a/jms/work_item_details.go +++ b/jms/work_item_details.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -55,6 +55,10 @@ func (m *workitemdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, er var err error switch m.Kind { + case "DEPLOYED_APPLICATION": + mm := DeployedApplicationWorkItemDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "LCM": mm := LcmWorkItemDetails{} err = json.Unmarshal(data, &mm) @@ -102,21 +106,24 @@ type WorkItemDetailsKindEnum string // Set of constants representing the allowable values for WorkItemDetailsKindEnum const ( - WorkItemDetailsKindBasic WorkItemDetailsKindEnum = "BASIC" - WorkItemDetailsKindApplication WorkItemDetailsKindEnum = "APPLICATION" - WorkItemDetailsKindLcm WorkItemDetailsKindEnum = "LCM" + WorkItemDetailsKindBasic WorkItemDetailsKindEnum = "BASIC" + WorkItemDetailsKindApplication WorkItemDetailsKindEnum = "APPLICATION" + WorkItemDetailsKindLcm WorkItemDetailsKindEnum = "LCM" + WorkItemDetailsKindDeployedApplication WorkItemDetailsKindEnum = "DEPLOYED_APPLICATION" ) var mappingWorkItemDetailsKindEnum = map[string]WorkItemDetailsKindEnum{ - "BASIC": WorkItemDetailsKindBasic, - "APPLICATION": WorkItemDetailsKindApplication, - "LCM": WorkItemDetailsKindLcm, + "BASIC": WorkItemDetailsKindBasic, + "APPLICATION": WorkItemDetailsKindApplication, + "LCM": WorkItemDetailsKindLcm, + "DEPLOYED_APPLICATION": WorkItemDetailsKindDeployedApplication, } var mappingWorkItemDetailsKindEnumLowerCase = map[string]WorkItemDetailsKindEnum{ - "basic": WorkItemDetailsKindBasic, - "application": WorkItemDetailsKindApplication, - "lcm": WorkItemDetailsKindLcm, + "basic": WorkItemDetailsKindBasic, + "application": WorkItemDetailsKindApplication, + "lcm": WorkItemDetailsKindLcm, + "deployed_application": WorkItemDetailsKindDeployedApplication, } // GetWorkItemDetailsKindEnumValues Enumerates the set of values for WorkItemDetailsKindEnum @@ -134,6 +141,7 @@ func GetWorkItemDetailsKindEnumStringValues() []string { "BASIC", "APPLICATION", "LCM", + "DEPLOYED_APPLICATION", } } diff --git a/jms/work_item_status.go b/jms/work_item_status.go index 44a175531d..fcf90a5394 100644 --- a/jms/work_item_status.go +++ b/jms/work_item_status.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms @@ -25,6 +25,7 @@ const ( WorkItemStatusSucceeded WorkItemStatusEnum = "SUCCEEDED" WorkItemStatusNeedsAttention WorkItemStatusEnum = "NEEDS_ATTENTION" WorkItemStatusRetrying WorkItemStatusEnum = "RETRYING" + WorkItemStatusSkipped WorkItemStatusEnum = "SKIPPED" ) var mappingWorkItemStatusEnum = map[string]WorkItemStatusEnum{ @@ -35,6 +36,7 @@ var mappingWorkItemStatusEnum = map[string]WorkItemStatusEnum{ "SUCCEEDED": WorkItemStatusSucceeded, "NEEDS_ATTENTION": WorkItemStatusNeedsAttention, "RETRYING": WorkItemStatusRetrying, + "SKIPPED": WorkItemStatusSkipped, } var mappingWorkItemStatusEnumLowerCase = map[string]WorkItemStatusEnum{ @@ -45,6 +47,7 @@ var mappingWorkItemStatusEnumLowerCase = map[string]WorkItemStatusEnum{ "succeeded": WorkItemStatusSucceeded, "needs_attention": WorkItemStatusNeedsAttention, "retrying": WorkItemStatusRetrying, + "skipped": WorkItemStatusSkipped, } // GetWorkItemStatusEnumValues Enumerates the set of values for WorkItemStatusEnum @@ -66,6 +69,7 @@ func GetWorkItemStatusEnumStringValues() []string { "SUCCEEDED", "NEEDS_ATTENTION", "RETRYING", + "SKIPPED", } } diff --git a/jms/work_item_summary.go b/jms/work_item_summary.go index 2b1548cad3..859c1023c3 100644 --- a/jms/work_item_summary.go +++ b/jms/work_item_summary.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_item_type.go b/jms/work_item_type.go index 9c3762b537..4c1465b9ee 100644 --- a/jms/work_item_type.go +++ b/jms/work_item_type.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_request.go b/jms/work_request.go index ab020e3974..86bbb5f904 100644 --- a/jms/work_request.go +++ b/jms/work_request.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_request_collection.go b/jms/work_request_collection.go index d9ea3066f8..a19e67310b 100644 --- a/jms/work_request_collection.go +++ b/jms/work_request_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_request_error.go b/jms/work_request_error.go index bc3897fa66..51647d2a63 100644 --- a/jms/work_request_error.go +++ b/jms/work_request_error.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_request_error_collection.go b/jms/work_request_error_collection.go index ec854dd35c..cd1e95b533 100644 --- a/jms/work_request_error_collection.go +++ b/jms/work_request_error_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_request_log_entry.go b/jms/work_request_log_entry.go index 4879c8fbda..374415de92 100644 --- a/jms/work_request_log_entry.go +++ b/jms/work_request_log_entry.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_request_log_entry_collection.go b/jms/work_request_log_entry_collection.go index c6d1579133..d3c9419461 100644 --- a/jms/work_request_log_entry_collection.go +++ b/jms/work_request_log_entry_collection.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jms/work_request_resource.go b/jms/work_request_resource.go index 81ff09098d..dc32a4cc92 100644 --- a/jms/work_request_resource.go +++ b/jms/work_request_resource.go @@ -2,9 +2,9 @@ // 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. -// Java Management Service API +// Java Management Service Fleets API // -// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. // package jms diff --git a/jmsjavadownloads/generate_artifact_download_url_details.go b/jmsjavadownloads/generate_artifact_download_url_details.go index f8ed857986..16932554fe 100644 --- a/jmsjavadownloads/generate_artifact_download_url_details.go +++ b/jmsjavadownloads/generate_artifact_download_url_details.go @@ -20,6 +20,9 @@ type GenerateArtifactDownloadUrlDetails struct { // Unique identifier for the Java runtime artifact. ArtifactId *int64 `mandatory:"true" json:"artifactId"` + + // The tenancy OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user initiating the download. + CompartmentId *string `mandatory:"false" json:"compartmentId"` } func (m GenerateArtifactDownloadUrlDetails) String() string { diff --git a/jmsjavadownloads/jmsjavadownloads_javadownload_client.go b/jmsjavadownloads/jmsjavadownloads_javadownload_client.go index cd6a39b846..ef37b027d6 100644 --- a/jmsjavadownloads/jmsjavadownloads_javadownload_client.go +++ b/jmsjavadownloads/jmsjavadownloads_javadownload_client.go @@ -514,10 +514,10 @@ func (client JavaDownloadClient) deleteJavaLicenseAcceptanceRecord(ctx context.C return response, err } -// GenerateArtifactDownloadUrl Generates a short-lived download URL and returns it in the response payload. -// The returned URL can then be used for downloading the specific Java runtime artifact. +// GenerateArtifactDownloadUrl Generates a download URL and returns it in the response payload. +// The URL in the response can then be used for downloading the specific Java runtime artifact. // Use the GetJavaRelease API -// to get information about available artifacts for a specific release. Each such artifact is uniquely identified by an `artifactId`. +// to get information about available artifacts for a specific release. Each artifact is uniquely identified by an `artifactId`. // Refer JavaArtifact for more details. // // # See also diff --git a/jmsjavadownloads/list_java_download_tokens_request_response.go b/jmsjavadownloads/list_java_download_tokens_request_response.go index 01757981bc..5c2b734c82 100644 --- a/jmsjavadownloads/list_java_download_tokens_request_response.go +++ b/jmsjavadownloads/list_java_download_tokens_request_response.go @@ -38,7 +38,7 @@ type ListJavaDownloadTokensRequest struct { // A filter to return only resources that match the user principal detail. // The search string can be any of the property values from the Principal object. - // This object is used as response datatype for the `createdBy` and `lastUpdatedBy` fields in applicable resource. + // This object is used as a response datatype for the `createdBy` and `lastUpdatedBy` fields in applicable resource. SearchByUser *string `mandatory:"false" contributesTo:"query" name:"searchByUser"` // The maximum number of items to return. diff --git a/jmsjavadownloads/list_java_license_acceptance_records_request_response.go b/jmsjavadownloads/list_java_license_acceptance_records_request_response.go index 06ff14a175..ae2b6fcdec 100644 --- a/jmsjavadownloads/list_java_license_acceptance_records_request_response.go +++ b/jmsjavadownloads/list_java_license_acceptance_records_request_response.go @@ -23,7 +23,7 @@ type ListJavaLicenseAcceptanceRecordsRequest struct { // A filter to return only resources that match the user principal detail. // The search string can be any of the property values from the Principal object. - // This object is used as response datatype for the `createdBy` and `lastUpdatedBy` fields in applicable resource. + // This object is used as a response datatype for the `createdBy` and `lastUpdatedBy` fields in applicable resource. SearchByUser *string `mandatory:"false" contributesTo:"query" name:"searchByUser"` // Unique Java license acceptance record identifier. diff --git a/osmanagementhub/create_custom_software_source_details.go b/osmanagementhub/create_custom_software_source_details.go index 7783d9527f..8e6d687288 100644 --- a/osmanagementhub/create_custom_software_source_details.go +++ b/osmanagementhub/create_custom_software_source_details.go @@ -53,6 +53,14 @@ type CreateCustomSoftwareSourceDetails struct { // Indicates whether the service should create the software source from a list of packages provided by the user. IsCreatedFromPackageList *bool `mandatory:"false" json:"isCreatedFromPackageList"` + // Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + // * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + // * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + // * For a package filter that does not specify a version, this will include only the latest available version of the package. + // * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + // * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + IsLatestContentOnly *bool `mandatory:"false" json:"isLatestContentOnly"` + // A property used for compatibility only. It doesn't provide a complete list of packages. See AddPackagesToSoftwareSourceDetails for providing the list of packages used to create the software source when isCreatedFromPackageList is set to true. Packages []string `mandatory:"false" json:"packages"` } diff --git a/osmanagementhub/create_versioned_custom_software_source_details.go b/osmanagementhub/create_versioned_custom_software_source_details.go index 4f7b1e5d35..7a0403b981 100644 --- a/osmanagementhub/create_versioned_custom_software_source_details.go +++ b/osmanagementhub/create_versioned_custom_software_source_details.go @@ -53,6 +53,14 @@ type CreateVersionedCustomSoftwareSourceDetails struct { // Indicates whether the service should create the software source from a list of packages provided by the user. IsCreatedFromPackageList *bool `mandatory:"false" json:"isCreatedFromPackageList"` + // Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + // * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + // * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + // * For a package filter that does not specify a version, this will include only the latest available version of the package. + // * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + // * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + IsLatestContentOnly *bool `mandatory:"false" json:"isLatestContentOnly"` + // A property used for compatibility only. It doesn't provide a complete list of packages. See AddPackagesToSoftwareSourceDetails for providing the list of packages used to create the software source when isCreatedFromPackageList is set to true. Packages []string `mandatory:"false" json:"packages"` } diff --git a/osmanagementhub/custom_software_source.go b/osmanagementhub/custom_software_source.go index 2deb921920..f31dff8322 100644 --- a/osmanagementhub/custom_software_source.go +++ b/osmanagementhub/custom_software_source.go @@ -84,6 +84,14 @@ type CustomSoftwareSource struct { // Indicates whether the service should create the software source from a list of packages provided by the user. IsCreatedFromPackageList *bool `mandatory:"false" json:"isCreatedFromPackageList"` + // Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + // * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + // * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + // * For a package filter that does not specify a version, this will include only the latest available version of the package. + // * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + // * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + IsLatestContentOnly *bool `mandatory:"false" json:"isLatestContentOnly"` + // The packages in the software source. Packages []string `mandatory:"false" json:"packages"` diff --git a/osmanagementhub/osmanagementhub_softwaresource_client.go b/osmanagementhub/osmanagementhub_softwaresource_client.go index daf3156686..65949ffc45 100644 --- a/osmanagementhub/osmanagementhub_softwaresource_client.go +++ b/osmanagementhub/osmanagementhub_softwaresource_client.go @@ -283,7 +283,7 @@ func (client SoftwareSourceClient) changeSoftwareSourceCompartment(ctx context.C return response, err } -// CreateEntitlement Registers the necessary entitlement credentials for OS vendor software sources. +// CreateEntitlement Registers the necessary entitlement credentials for OS vendor software sources for a tenancy. // // # See also // diff --git a/osmanagementhub/update_custom_software_source_details.go b/osmanagementhub/update_custom_software_source_details.go index 310d432aa7..396418adbe 100644 --- a/osmanagementhub/update_custom_software_source_details.go +++ b/osmanagementhub/update_custom_software_source_details.go @@ -49,6 +49,14 @@ type UpdateCustomSoftwareSourceDetails struct { // Indicates whether the service should automatically resolve package dependencies when including specific packages in the software source. IsAutoResolveDependencies *bool `mandatory:"false" json:"isAutoResolveDependencies"` + + // Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + // * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + // * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + // * For a package filter that does not specify a version, this will include only the latest available version of the package. + // * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + // * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + IsLatestContentOnly *bool `mandatory:"false" json:"isLatestContentOnly"` } // GetCompartmentId returns CompartmentId diff --git a/osmanagementhub/versioned_custom_software_source.go b/osmanagementhub/versioned_custom_software_source.go index 4582c50619..6b156150b6 100644 --- a/osmanagementhub/versioned_custom_software_source.go +++ b/osmanagementhub/versioned_custom_software_source.go @@ -84,6 +84,14 @@ type VersionedCustomSoftwareSource struct { // Indicates whether the service should create the software source from a list of packages provided by the user. IsCreatedFromPackageList *bool `mandatory:"false" json:"isCreatedFromPackageList"` + // Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + // * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + // * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + // * For a package filter that does not specify a version, this will include only the latest available version of the package. + // * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + // * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + IsLatestContentOnly *bool `mandatory:"false" json:"isLatestContentOnly"` + // The packages in the software source. Packages []string `mandatory:"false" json:"packages"` diff --git a/psql/backup.go b/psql/backup.go index 141f516dd4..ff04055a66 100644 --- a/psql/backup.go +++ b/psql/backup.go @@ -28,7 +28,7 @@ type Backup struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the backup. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The date and time the backup was created, expressed in + // The date and time the backup request was received, expressed in // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` diff --git a/psql/backup_summary.go b/psql/backup_summary.go index 7182bb8e92..5f400ce8c0 100644 --- a/psql/backup_summary.go +++ b/psql/backup_summary.go @@ -52,7 +52,7 @@ type BackupSummary struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Specifies whether the backup was created manually, or by a management policy. + // Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. SourceType BackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` // The size of the backup, in gigabytes. diff --git a/psql/configuration.go b/psql/configuration.go index 95f2947882..e2cc605dc6 100644 --- a/psql/configuration.go +++ b/psql/configuration.go @@ -36,19 +36,21 @@ type Configuration struct { // The current state of the configuration. LifecycleState ConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + // Version of the PostgreSQL database. + DbVersion *string `mandatory:"true" json:"dbVersion"` + // The name of the shape for the configuration. // Example: `VM.Standard.E4.Flex` Shape *string `mandatory:"true" json:"shape"` // CPU core count. + // It's value is set to 0 if configuration is for a flexible shape. InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` // Memory size in gigabytes with 1GB increment. + // It's value is set to 0 if configuration is for a flexible shape. InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` - // Version of the PostgreSQL database. - DbVersion *string `mandatory:"true" json:"dbVersion"` - ConfigurationDetails *ConfigurationDetails `mandatory:"true" json:"configurationDetails"` // A description for the configuration. @@ -57,6 +59,12 @@ type Configuration struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // The type of configuration. Either user-created or a default configuration. + ConfigType ConfigurationConfigTypeEnum `mandatory:"false" json:"configType,omitempty"` + + // Whether the configuration supports flexible shapes. + IsFlexible *bool `mandatory:"false" json:"isFlexible"` + // 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"` @@ -83,6 +91,9 @@ func (m Configuration) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConfigurationLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingConfigurationConfigTypeEnum(string(m.ConfigType)); !ok && m.ConfigType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConfigType: %s. Supported values are: %s.", m.ConfigType, strings.Join(GetConfigurationConfigTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -138,3 +149,45 @@ func GetMappingConfigurationLifecycleStateEnum(val string) (ConfigurationLifecyc enum, ok := mappingConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// ConfigurationConfigTypeEnum Enum with underlying type: string +type ConfigurationConfigTypeEnum string + +// Set of constants representing the allowable values for ConfigurationConfigTypeEnum +const ( + ConfigurationConfigTypeDefault ConfigurationConfigTypeEnum = "DEFAULT" + ConfigurationConfigTypeCustom ConfigurationConfigTypeEnum = "CUSTOM" +) + +var mappingConfigurationConfigTypeEnum = map[string]ConfigurationConfigTypeEnum{ + "DEFAULT": ConfigurationConfigTypeDefault, + "CUSTOM": ConfigurationConfigTypeCustom, +} + +var mappingConfigurationConfigTypeEnumLowerCase = map[string]ConfigurationConfigTypeEnum{ + "default": ConfigurationConfigTypeDefault, + "custom": ConfigurationConfigTypeCustom, +} + +// GetConfigurationConfigTypeEnumValues Enumerates the set of values for ConfigurationConfigTypeEnum +func GetConfigurationConfigTypeEnumValues() []ConfigurationConfigTypeEnum { + values := make([]ConfigurationConfigTypeEnum, 0) + for _, v := range mappingConfigurationConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetConfigurationConfigTypeEnumStringValues Enumerates the set of values in String for ConfigurationConfigTypeEnum +func GetConfigurationConfigTypeEnumStringValues() []string { + return []string{ + "DEFAULT", + "CUSTOM", + } +} + +// GetMappingConfigurationConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConfigurationConfigTypeEnum(val string) (ConfigurationConfigTypeEnum, bool) { + enum, ok := mappingConfigurationConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/configuration_summary.go b/psql/configuration_summary.go index c5f759af3c..4115864ac3 100644 --- a/psql/configuration_summary.go +++ b/psql/configuration_summary.go @@ -36,22 +36,27 @@ type ConfigurationSummary struct { // The current state of the configuration. LifecycleState ConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + // Version of the PostgreSQL database. + DbVersion *string `mandatory:"true" json:"dbVersion"` + // The name of the shape for the configuration. // Example: `VM.Standard.E4.Flex` Shape *string `mandatory:"true" json:"shape"` - // Version of the PostgreSQL database. - DbVersion *string `mandatory:"true" json:"dbVersion"` - // CPU core count. + // It's value is set to 0 if configuration is for a flexible shape. InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` // Memory size in gigabytes with 1GB increment. + // It's value is set to 0 if configuration is for a flexible shape. InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Whether the configuration supports flexible shapes. + IsFlexible *bool `mandatory:"false" json:"isFlexible"` + // 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"` diff --git a/psql/create_configuration_details.go b/psql/create_configuration_details.go index 849211c727..ab70a17c1a 100644 --- a/psql/create_configuration_details.go +++ b/psql/create_configuration_details.go @@ -25,24 +25,29 @@ type CreateConfigurationDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the configuration. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The name of the shape for the configuration. - // Example: `VM.Standard.E4.Flex` - Shape *string `mandatory:"true" json:"shape"` - // Version of the PostgreSQL database. DbVersion *string `mandatory:"true" json:"dbVersion"` - // CPU core count. - InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` - - // Memory size in gigabytes with 1GB increment. - InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + // The name of the shape for the configuration. + // Example: `VM.Standard.E4.Flex` + Shape *string `mandatory:"true" json:"shape"` DbConfigurationOverrides *DbConfigurationOverrideCollection `mandatory:"true" json:"dbConfigurationOverrides"` // Details about the configuration set. Description *string `mandatory:"false" json:"description"` + // Whether the configuration supports flexible shapes. + IsFlexible *bool `mandatory:"false" json:"isFlexible"` + + // CPU core count. + // Skip or set it's value to 0 if configuration is for a flexible shape. + InstanceOcpuCount *int `mandatory:"false" json:"instanceOcpuCount"` + + // Memory size in gigabytes with 1GB increment. + // Skip or set it's value to 0 if configuration is for a flexible shape. + InstanceMemorySizeInGBs *int `mandatory:"false" json:"instanceMemorySizeInGBs"` + // 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"` diff --git a/psql/create_db_system_details.go b/psql/create_db_system_details.go index 275bd200ed..47d319ee72 100644 --- a/psql/create_db_system_details.go +++ b/psql/create_db_system_details.go @@ -35,6 +35,8 @@ type CreateDbSystemDetails struct { // Example: `VM.Standard.E4.Flex` Shape *string `mandatory:"true" json:"shape"` + Credentials *Credentials `mandatory:"true" json:"credentials"` + NetworkDetails *NetworkDetails `mandatory:"true" json:"networkDetails"` // A user-provided description of a database system. @@ -59,8 +61,6 @@ type CreateDbSystemDetails struct { // If specified, its size must match `instanceCount`. InstancesDetails []CreateDbInstanceDetails `mandatory:"false" json:"instancesDetails"` - Credentials *Credentials `mandatory:"false" json:"credentials"` - ManagementPolicy *ManagementPolicyDetails `mandatory:"false" json:"managementPolicy"` Source SourceDetails `mandatory:"false" json:"source"` @@ -103,7 +103,6 @@ func (m *CreateDbSystemDetails) UnmarshalJSON(data []byte) (e error) { InstanceMemorySizeInGBs *int `json:"instanceMemorySizeInGBs"` InstanceCount *int `json:"instanceCount"` InstancesDetails []CreateDbInstanceDetails `json:"instancesDetails"` - Credentials *Credentials `json:"credentials"` ManagementPolicy *ManagementPolicyDetails `json:"managementPolicy"` Source sourcedetails `json:"source"` FreeformTags map[string]string `json:"freeformTags"` @@ -113,6 +112,7 @@ func (m *CreateDbSystemDetails) UnmarshalJSON(data []byte) (e error) { DbVersion *string `json:"dbVersion"` StorageDetails storagedetails `json:"storageDetails"` Shape *string `json:"shape"` + Credentials *Credentials `json:"credentials"` NetworkDetails *NetworkDetails `json:"networkDetails"` }{} @@ -135,8 +135,6 @@ func (m *CreateDbSystemDetails) UnmarshalJSON(data []byte) (e error) { m.InstancesDetails = make([]CreateDbInstanceDetails, len(model.InstancesDetails)) copy(m.InstancesDetails, model.InstancesDetails) - m.Credentials = model.Credentials - m.ManagementPolicy = model.ManagementPolicy nn, e = model.Source.UnmarshalPolymorphicJSON(model.Source.JsonData) @@ -171,6 +169,8 @@ func (m *CreateDbSystemDetails) UnmarshalJSON(data []byte) (e error) { m.Shape = model.Shape + m.Credentials = model.Credentials + m.NetworkDetails = model.NetworkDetails return diff --git a/psql/default_configuration.go b/psql/default_configuration.go index a6c9a0bf8c..b4ed268f9b 100644 --- a/psql/default_configuration.go +++ b/psql/default_configuration.go @@ -33,19 +33,21 @@ type DefaultConfiguration struct { // The current state of the configuration. LifecycleState DefaultConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + // Version of the PostgreSQL database. + DbVersion *string `mandatory:"true" json:"dbVersion"` + // The name of the shape for the configuration. // Example: `VM.Standard.E4.Flex` Shape *string `mandatory:"true" json:"shape"` - // CPU core count. Minimum value is 1. + // CPU core count. + // Its value is set to 0 if configuration is for a flexible shape. InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` // Memory size in gigabytes with 1GB increment. + // Its value is set to 0 if configuration is for a flexible shape. InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` - // Version of the PostgreSQL database. - DbVersion *string `mandatory:"true" json:"dbVersion"` - ConfigurationDetails *DefaultConfigurationDetails `mandatory:"true" json:"configurationDetails"` // A description for the configuration. @@ -53,6 +55,9 @@ type DefaultConfiguration struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // True if the configuration supports flexible shapes, false otherwise. + IsFlexible *bool `mandatory:"false" json:"isFlexible"` } func (m DefaultConfiguration) String() string { diff --git a/psql/default_configuration_summary.go b/psql/default_configuration_summary.go index c7ecca7d43..d1688f2d2a 100644 --- a/psql/default_configuration_summary.go +++ b/psql/default_configuration_summary.go @@ -33,21 +33,26 @@ type DefaultConfigurationSummary struct { // The current state of the configuration. LifecycleState DefaultConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + // Version of the PostgreSQL database. + DbVersion *string `mandatory:"true" json:"dbVersion"` + // The name of the shape for the configuration. // Example: `VM.Standard.E4.Flex` Shape *string `mandatory:"true" json:"shape"` - // Version of the PostgreSQL database. - DbVersion *string `mandatory:"true" json:"dbVersion"` - - // CPU core count. Minimum value is 1. + // CPU core count. + // It's value is set to 0 if configuration is for a flexible shape. InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` // Memory size in gigabytes with 1GB increment. + // It's value is set to 0 if configuration is for a flexible shape. InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // True if the configuration supports flexible shapes, false otherwise. + IsFlexible *bool `mandatory:"false" json:"isFlexible"` } func (m DefaultConfigurationSummary) String() string { diff --git a/psql/list_configurations_request_response.go b/psql/list_configurations_request_response.go index 43fb97a5fd..d1ebd20ef6 100644 --- a/psql/list_configurations_request_response.go +++ b/psql/list_configurations_request_response.go @@ -27,7 +27,7 @@ type ListConfigurationsRequest struct { // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // Verison of the PostgreSQL database, such as 14.9. + // Version of the PostgreSQL database, such as 14.9. DbVersion *string `mandatory:"false" contributesTo:"query" name:"dbVersion"` // The name of the shape for the configuration. diff --git a/psql/list_default_configurations_request_response.go b/psql/list_default_configurations_request_response.go index 66a801e25b..f62b4c2983 100644 --- a/psql/list_default_configurations_request_response.go +++ b/psql/list_default_configurations_request_response.go @@ -24,7 +24,7 @@ type ListDefaultConfigurationsRequest struct { // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // Verison of the PostgreSQL database, such as 14.9. + // Version of the PostgreSQL database, such as 14.9. DbVersion *string `mandatory:"false" contributesTo:"query" name:"dbVersion"` // The name of the shape for the configuration. diff --git a/psql/management_policy_details.go b/psql/management_policy_details.go index be7c13e745..ce8ab25e1d 100644 --- a/psql/management_policy_details.go +++ b/psql/management_policy_details.go @@ -20,7 +20,10 @@ import ( // ManagementPolicyDetails PostgreSQL database system management policy update details. type ManagementPolicyDetails struct { - // The start of the maintenance window. + // The start of the maintenance window in UTC. + // This string is of the format: "{day-of-week} {time-of-day}". + // "{day-of-week}" is a case-insensitive string like "mon", "tue", &c. + // "{time-of-day}" is the "Time" portion of an RFC3339-formatted timestamp. Any second or sub-second time data will be truncated to zero. MaintenanceWindowStart *string `mandatory:"false" json:"maintenanceWindowStart"` BackupPolicy BackupPolicy `mandatory:"false" json:"backupPolicy"` diff --git a/psql/shape_memory_options.go b/psql/shape_memory_options.go new file mode 100644 index 0000000000..5377ae9709 --- /dev/null +++ b/psql/shape_memory_options.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. + +// PGSQL Control Plane API +// +// Use the OCI Database with PostgreSQL API to manage resources such as database systems, database nodes, backups, and configurations. +// For information, see the user guide documentation for the service (https://docs.cloud.oracle.com/iaas/Content/postgresql/home.htm). +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeMemoryOptions Options for the the shape memory +type ShapeMemoryOptions struct { + + // Default per OCPU configuration in GBs + DefaultPerOcpuInGBs *int `mandatory:"true" json:"defaultPerOcpuInGBs"` + + // Minimum Memory configuration in GBs + MinInGBs *int `mandatory:"true" json:"minInGBs"` + + // Minimum Memory configuration per OCPU in GBs + MinPerOcpuInGBs *int `mandatory:"true" json:"minPerOcpuInGBs"` + + // Maximum Memory configuration in GBs + MaxInGBs *int `mandatory:"true" json:"maxInGBs"` + + // Maximum Memory configuration per OCPU in GBs + MaxPerOcpuInGBs *int `mandatory:"true" json:"maxPerOcpuInGBs"` +} + +func (m ShapeMemoryOptions) 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 ShapeMemoryOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/shape_ocpu_options.go b/psql/shape_ocpu_options.go new file mode 100644 index 0000000000..bd3d9e11c6 --- /dev/null +++ b/psql/shape_ocpu_options.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. + +// PGSQL Control Plane API +// +// Use the OCI Database with PostgreSQL API to manage resources such as database systems, database nodes, backups, and configurations. +// For information, see the user guide documentation for the service (https://docs.cloud.oracle.com/iaas/Content/postgresql/home.htm). +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeOcpuOptions Options for the the shape OCPU +type ShapeOcpuOptions struct { + + // Minimum OCPU configuration + Min *int `mandatory:"true" json:"min"` + + // Maximum OCPU configuration + Max *int `mandatory:"true" json:"max"` +} + +func (m ShapeOcpuOptions) 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 ShapeOcpuOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/shape_summary.go b/psql/shape_summary.go index aaba4395a2..330c8ec069 100644 --- a/psql/shape_summary.go +++ b/psql/shape_summary.go @@ -31,6 +31,13 @@ type ShapeSummary struct { // A unique identifier for the shape. Id *string `mandatory:"false" json:"id"` + + // Indicates if the shape is a flex shape. + IsFlexible *bool `mandatory:"false" json:"isFlexible"` + + ShapeOcpuOptions *ShapeOcpuOptions `mandatory:"false" json:"shapeOcpuOptions"` + + ShapeMemoryOptions *ShapeMemoryOptions `mandatory:"false" json:"shapeMemoryOptions"` } func (m ShapeSummary) String() string { diff --git a/psql/update_db_system_details.go b/psql/update_db_system_details.go index 2825ddade2..21cf3c01b1 100644 --- a/psql/update_db_system_details.go +++ b/psql/update_db_system_details.go @@ -25,12 +25,24 @@ type UpdateDbSystemDetails struct { // A user-provided description of the database system. Description *string `mandatory:"false" json:"description"` + // The name of the shape for the database system nodes. + // Example: `VM.Standard.E4.Flex` + Shape *string `mandatory:"false" json:"shape"` + + // The total number of OCPUs available to each database system node. + InstanceOcpuCount *int `mandatory:"false" json:"instanceOcpuCount"` + + // The total amount of memory available to each database system node, in gigabytes. + InstanceMemorySizeInGBs *int `mandatory:"false" json:"instanceMemorySizeInGBs"` + DbConfigurationParams *UpdateDbConfigParams `mandatory:"false" json:"dbConfigurationParams"` ManagementPolicy *ManagementPolicyDetails `mandatory:"false" json:"managementPolicy"` StorageDetails *UpdateStorageDetailsParams `mandatory:"false" json:"storageDetails"` + NetworkDetails *UpdateNetworkDetails `mandatory:"false" json:"networkDetails"` + // 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"` diff --git a/psql/update_network_details.go b/psql/update_network_details.go new file mode 100644 index 0000000000..2a7b19f9b2 --- /dev/null +++ b/psql/update_network_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. + +// PGSQL Control Plane API +// +// Use the OCI Database with PostgreSQL API to manage resources such as database systems, database nodes, backups, and configurations. +// For information, see the user guide documentation for the service (https://docs.cloud.oracle.com/iaas/Content/postgresql/home.htm). +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNetworkDetails Network details for the database system. +type UpdateNetworkDetails struct { + + // List of Network Security Group OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with the database system. + NsgIds []string `mandatory:"false" json:"nsgIds"` +} + +func (m UpdateNetworkDetails) 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 UpdateNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +}