From 1374e0f904d0fed631bd0541ae57b5d799ad3d5b Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 20 Aug 2024 04:29:52 +0000 Subject: [PATCH] Releasing version 65.72.0 --- CHANGELOG.md | 14 + Makefile | 2 +- analytics/analytics_client.go | 63 + analytics/analytics_instance.go | 24 +- analytics/analytics_instance_summary.go | 23 + analytics/capacity.go | 6 +- .../create_analytics_instance_details.go | 23 +- analytics/feature_bundle.go | 64 + analytics/set_feature_bundle_details.go | 42 + .../set_feature_bundle_request_response.go | 107 + common/version.go | 4 +- .../autonomous_database_software_image.go | 3 + ...onomous_database_software_image_summary.go | 3 + database/create_maintenance_run_details.go | 21 +- database/maintenance_run.go | 55 +- database/maintenance_run_summary.go | 55 +- .../database_connection_credentials.go | 26 +- .../database_feature_configuration.go | 8 + .../database_feature_details.go | 8 + ...atabase_lifecycle_feature_configuration.go | 158 ++ ...se_lifecycle_management_feature_details.go | 93 + ...ase_named_credential_connection_details.go | 57 + ...atabase_sql_watch_feature_configuration.go | 107 + .../database_sql_watch_feature_details.go | 93 + databasemanagement/db_management_feature.go | 8 + .../external_database_feature_details.go | 8 + ...se_lifecycle_management_feature_details.go | 134 + ...rnal_database_sql_watch_feature_details.go | 83 + .../external_database_summary.go | 90 + ...rnal_pluggable_database_feature_details.go | 8 + ...se_lifecycle_management_feature_details.go | 83 + ...able_database_sql_watch_feature_details.go | 83 + databasemanagement/managed_database.go | 114 + .../managed_database_summary.go | 87 + ...snapshot_standby_connection_string_type.go | 59 + ...ous_database_standby_type_for_dr_drills.go | 63 + ...r_autonomous_container_database_details.go | 70 + ...roup_member_autonomous_database_details.go | 13 + ...eate_dr_protection_group_member_details.go | 8 + ...up_member_object_storage_bucket_details.go | 71 + disasterrecovery/dr_plan_step_type.go | 510 ++-- .../dr_protection_group_member.go | 8 + ...up_member_autonomous_container_database.go | 70 + ...ection_group_member_autonomous_database.go | 13 + ...tion_group_member_object_storage_bucket.go | 71 + .../dr_protection_group_member_type.go | 62 +- ...ist_dr_plan_executions_request_response.go | 72 - ...r_autonomous_container_database_details.go | 70 + ...roup_member_autonomous_database_details.go | 13 + ...date_dr_protection_group_member_details.go | 8 + ...up_member_object_storage_bucket_details.go | 71 + fleetappsmanagement/action_group.go | 66 + fleetappsmanagement/action_group_details.go | 79 + fleetappsmanagement/action_type.go | 73 + .../activity_resource_target.go | 46 + .../announcement_collection.go | 40 + fleetappsmanagement/announcement_sort_by.go | 57 + fleetappsmanagement/announcement_summary.go | 147 ++ .../api_based_execution_details.go | 55 + .../associated_fleet_credential_details.go | 104 + .../associated_fleet_property_details.go | 99 + .../associated_fleet_resource_details.go | 49 + .../associated_local_task_details.go | 115 + .../associated_scheduler_definition.go | 51 + .../associated_shared_task_details.go | 55 + .../associated_task_details.go | 82 + fleetappsmanagement/associations.go | 48 + .../check_resource_tagging_details.go | 46 + ...check_resource_tagging_request_response.go | 100 + fleetappsmanagement/compliance_report.go | 52 + .../compliance_report_patch_detail.go | 52 + .../compliance_report_product.go | 43 + .../compliance_report_resource.go | 67 + .../compliance_report_target.go | 58 + fleetappsmanagement/compliance_state.go | 65 + fleetappsmanagement/component_properties.go | 95 + fleetappsmanagement/condition.go | 46 + .../confirm_targets_details.go | 40 + .../confirm_targets_request_response.go | 100 + fleetappsmanagement/content_details.go | 116 + .../create_fleet_credential_details.go | 104 + ...reate_fleet_credential_request_response.go | 112 + fleetappsmanagement/create_fleet_details.go | 94 + .../create_fleet_property_details.go | 46 + .../create_fleet_property_request_response.go | 103 + .../create_fleet_request_response.go | 109 + .../create_fleet_resource_details.go | 52 + .../create_fleet_resource_request_response.go | 112 + .../create_maintenance_window_details.go | 81 + ...ate_maintenance_window_request_response.go | 100 + .../create_onboarding_details.go | 46 + .../create_onboarding_request_response.go | 109 + .../create_property_details.go | 60 + .../create_property_request_response.go | 100 + .../create_scheduler_definition_details.go | 68 + ...e_scheduler_definition_request_response.go | 109 + fleetappsmanagement/credential_details.go | 132 + .../credential_entity_specific_details.go | 116 + ...elete_fleet_credential_request_response.go | 100 + .../delete_fleet_property_request_response.go | 97 + .../delete_fleet_request_response.go | 97 + .../delete_fleet_resource_request_response.go | 100 + ...ete_maintenance_window_request_response.go | 97 + .../delete_property_request_response.go | 94 + ...e_scheduler_definition_request_response.go | 94 + .../delete_scheduler_job_request_response.go | 94 + fleetappsmanagement/details.go | 93 + fleetappsmanagement/discovered_target.go | 52 + .../entity_execution_details.go | 64 + fleetappsmanagement/execution.go | 76 + fleetappsmanagement/execution_collection.go | 40 + fleetappsmanagement/execution_details.go | 82 + fleetappsmanagement/execution_summary.go | 71 + .../execution_workflow_details.go | 40 + fleetappsmanagement/fleet.go | 325 +++ fleetappsmanagement/fleet_collection.go | 40 + fleetappsmanagement/fleet_credential.go | 190 ++ .../fleet_credential_collection.go | 40 + .../fleet_credential_summary.go | 144 ++ .../fleet_product_collection.go | 40 + fleetappsmanagement/fleet_product_summary.go | 54 + fleetappsmanagement/fleet_property.go | 131 + .../fleet_property_collection.go | 40 + fleetappsmanagement/fleet_property_summary.go | 76 + fleetappsmanagement/fleet_resource.go | 156 ++ .../fleet_resource_collection.go | 40 + fleetappsmanagement/fleet_resource_summary.go | 106 + fleetappsmanagement/fleet_summary.go | 87 + fleetappsmanagement/fleet_target.go | 121 + .../fleet_target_collection.go | 40 + fleetappsmanagement/fleet_target_summary.go | 72 + .../fleetappsmanagement_client.go | 2169 +++++++++++++++++ ...agement_fleetappsmanagementadmin_client.go | 567 +++++ ...tappsmanagementmaintenancewindow_client.go | 388 +++ ...nt_fleetappsmanagementoperations_client.go | 852 +++++++ ...ment_fleetappsmanagementrunbooks_client.go | 325 +++ .../generate_compliance_report_details.go | 40 + ...rate_compliance_report_request_response.go | 100 + .../get_compliance_report_request_response.go | 96 + .../get_execution_request_response.go | 102 + .../get_fleet_credential_request_response.go | 96 + .../get_fleet_property_request_response.go | 96 + .../get_fleet_request_response.go | 93 + .../get_fleet_resource_request_response.go | 96 + .../get_job_activity_request_response.go | 96 + ...get_maintenance_window_request_response.go | 93 + .../get_property_request_response.go | 93 + .../get_runbook_request_response.go | 93 + ...t_scheduler_definition_request_response.go | 93 + .../get_scheduler_job_request_response.go | 93 + .../get_task_record_request_response.go | 93 + .../get_work_request_request_response.go | 96 + fleetappsmanagement/group.go | 94 + fleetappsmanagement/input_argument.go | 144 ++ fleetappsmanagement/input_parameter.go | 43 + .../inventory_resource_collection.go | 40 + .../inventory_resource_summary.go | 78 + fleetappsmanagement/job_activity.go | 61 + fleetappsmanagement/job_status.go | 93 + .../key_encryption_credential_details.go | 64 + .../life_cycle_action_group_type.go | 57 + .../list_announcements_request_response.go | 201 ++ .../list_executions_request_response.go | 211 ++ ...list_fleet_credentials_request_response.go | 218 ++ .../list_fleet_products_request_response.go | 209 ++ .../list_fleet_properties_request_response.go | 212 ++ .../list_fleet_resources_request_response.go | 215 ++ .../list_fleet_targets_request_response.go | 213 ++ .../list_fleets_request_response.go | 227 ++ ...st_inventory_resources_request_response.go | 227 ++ ...st_maintenance_windows_request_response.go | 212 ++ ...st_onboarding_policies_request_response.go | 190 ++ .../list_onboardings_request_response.go | 206 ++ .../list_properties_request_response.go | 257 ++ .../list_runbooks_request_response.go | 227 ++ .../list_scheduled_fleets_request_response.go | 199 ++ ..._scheduler_definitions_request_response.go | 225 ++ .../list_scheduler_jobs_request_response.go | 228 ++ .../list_targets_request_response.go | 200 ++ .../list_task_records_request_response.go | 218 ++ ...st_work_request_errors_request_response.go | 193 ++ ...list_work_request_logs_request_response.go | 193 ++ .../list_work_requests_request_response.go | 271 ++ fleetappsmanagement/maintenance_window.go | 164 ++ .../maintenance_window_collection.go | 40 + .../maintenance_window_summary.go | 106 + .../maintenance_window_type.go | 53 + .../notification_preferences.go | 45 + .../object_storage_bucket_content_details.go | 65 + fleetappsmanagement/onboarding.go | 137 ++ fleetappsmanagement/onboarding_collection.go | 40 + .../onboarding_policy_collection.go | 40 + .../onboarding_policy_summary.go | 53 + fleetappsmanagement/onboarding_summary.go | 71 + fleetappsmanagement/operation_runbook.go | 43 + fleetappsmanagement/operation_status.go | 81 + fleetappsmanagement/operation_type.go | 121 + fleetappsmanagement/os_type.go | 61 + fleetappsmanagement/outcome.go | 46 + .../output_variable_details.go | 43 + .../output_variable_input_argument.go | 68 + .../output_variable_mapping.go | 42 + .../plain_text_credential_details.go | 55 + fleetappsmanagement/preferences.go | 46 + fleetappsmanagement/properties.go | 43 + fleetappsmanagement/property.go | 197 ++ fleetappsmanagement/property_collection.go | 40 + fleetappsmanagement/property_summary.go | 105 + .../request_resource_validation_details.go | 43 + ...st_resource_validation_request_response.go | 100 + .../request_target_discovery_details.go | 43 + ...quest_target_discovery_request_response.go | 100 + .../resource_tag_check_details.go | 40 + .../resource_tag_enablement_info.go | 43 + fleetappsmanagement/rule.go | 49 + fleetappsmanagement/runbook.go | 248 ++ fleetappsmanagement/runbook_collection.go | 40 + fleetappsmanagement/runbook_summary.go | 112 + fleetappsmanagement/schedule.go | 97 + .../scheduled_fleet_collection.go | 40 + .../scheduled_fleet_summary.go | 70 + fleetappsmanagement/scheduler_definition.go | 185 ++ .../scheduler_definition_collection.go | 40 + .../scheduler_definition_summary.go | 114 + fleetappsmanagement/scheduler_job.go | 162 ++ .../scheduler_job_collection.go | 40 + fleetappsmanagement/scheduler_job_summary.go | 110 + fleetappsmanagement/scope.go | 57 + .../script_based_execution_details.go | 88 + fleetappsmanagement/selection.go | 61 + fleetappsmanagement/selection_criteria.go | 88 + fleetappsmanagement/sort_order.go | 57 + fleetappsmanagement/string_input_argument.go | 68 + ...rget_credential_entity_specific_details.go | 58 + fleetappsmanagement/target_resource.go | 45 + fleetappsmanagement/task.go | 128 + fleetappsmanagement/task_argument.go | 43 + fleetappsmanagement/task_execution_type.go | 57 + fleetappsmanagement/task_record.go | 197 ++ fleetappsmanagement/task_record_collection.go | 40 + fleetappsmanagement/task_record_summary.go | 93 + fleetappsmanagement/task_scope.go | 57 + fleetappsmanagement/task_variable.go | 73 + .../update_fleet_credential_details.go | 98 + ...pdate_fleet_credential_request_response.go | 103 + fleetappsmanagement/update_fleet_details.go | 61 + .../update_fleet_property_details.go | 40 + .../update_fleet_property_request_response.go | 106 + .../update_fleet_request_response.go | 103 + .../update_fleet_resource_details.go | 43 + .../update_fleet_resource_request_response.go | 103 + .../update_maintenance_window_details.go | 78 + ...ate_maintenance_window_request_response.go | 100 + .../update_property_details.go | 57 + .../update_property_request_response.go | 103 + .../update_scheduler_definition_details.go | 65 + ...e_scheduler_definition_request_response.go | 100 + .../update_scheduler_job_details.go | 48 + .../update_scheduler_job_request_response.go | 103 + fleetappsmanagement/value_type.go | 57 + .../vault_secret_credential_details.go | 58 + fleetappsmanagement/work_request.go | 78 + fleetappsmanagement/work_request_error.go | 47 + .../work_request_error_collection.go | 40 + fleetappsmanagement/work_request_log_entry.go | 43 + .../work_request_log_entry_collection.go | 40 + fleetappsmanagement/work_request_resource.go | 58 + .../work_request_resource_metadata_key.go | 53 + fleetappsmanagement/work_request_summary.go | 78 + .../work_request_summary_collection.go | 40 + fleetappsmanagement/workflow_component.go | 124 + fleetappsmanagement/workflow_group.go | 124 + .../workflow_group_component.go | 59 + .../workflow_task_component.go | 55 + integration/extend_data_retention_details.go | 88 + .../extend_data_retention_request_response.go | 110 + integration/integration_instance.go | 59 + integration/integration_instance_summary.go | 59 + .../integration_integrationinstance_client.go | 63 + ..._integration_instances_request_response.go | 4 + integration/work_request.go | 4 + integration/work_request_summary.go | 4 + jms/jms_javamanagementservice_client.go | 150 +- .../jmsjavadownloads_javadownload_client.go | 50 +- mysql/create_db_system_details.go | 5 + mysql/data_storage.go | 66 + mysql/data_storage_details.go | 50 + mysql/db_system.go | 8 +- mysql/db_system_snapshot.go | 5 +- mysql/update_db_system_details.go | 2 + redis/action_type.go | 4 +- ...hange_redis_cluster_compartment_details.go | 6 +- ...is_cluster_compartment_request_response.go | 2 +- redis/create_redis_cluster_details.go | 27 +- .../create_redis_cluster_request_response.go | 2 +- .../delete_redis_cluster_request_response.go | 2 +- redis/get_redis_cluster_request_response.go | 2 +- ...st_redis_cluster_nodes_request_response.go | 200 ++ redis/list_redis_clusters_request_response.go | 2 +- redis/node.go | 8 +- redis/node_collection.go | 6 +- redis/node_summary.go | 51 + redis/operation_status.go | 4 +- redis/operation_type.go | 4 +- redis/redis_cluster.go | 85 +- redis/redis_cluster_collection.go | 8 +- redis/redis_cluster_summary.go | 43 +- redis/redis_node_collection.go | 39 + redis/redis_rediscluster_client.go | 96 +- redis/sort_order.go | 4 +- redis/update_redis_cluster_details.go | 15 +- .../update_redis_cluster_request_response.go | 2 +- redis/work_request.go | 4 +- redis/work_request_error.go | 4 +- redis/work_request_error_collection.go | 4 +- redis/work_request_log_entry.go | 4 +- redis/work_request_log_entry_collection.go | 4 +- redis/work_request_resource.go | 4 +- redis/work_request_summary.go | 4 +- redis/work_request_summary_collection.go | 4 +- 320 files changed, 28633 insertions(+), 591 deletions(-) create mode 100644 analytics/feature_bundle.go create mode 100644 analytics/set_feature_bundle_details.go create mode 100644 analytics/set_feature_bundle_request_response.go create mode 100644 databasemanagement/database_lifecycle_feature_configuration.go create mode 100644 databasemanagement/database_lifecycle_management_feature_details.go create mode 100644 databasemanagement/database_named_credential_connection_details.go create mode 100644 databasemanagement/database_sql_watch_feature_configuration.go create mode 100644 databasemanagement/database_sql_watch_feature_details.go create mode 100644 databasemanagement/external_database_lifecycle_management_feature_details.go create mode 100644 databasemanagement/external_database_sql_watch_feature_details.go create mode 100644 databasemanagement/external_pluggable_database_lifecycle_management_feature_details.go create mode 100644 databasemanagement/external_pluggable_database_sql_watch_feature_details.go create mode 100644 disasterrecovery/autonomous_container_database_snapshot_standby_connection_string_type.go create mode 100644 disasterrecovery/autonomous_database_standby_type_for_dr_drills.go create mode 100644 disasterrecovery/create_dr_protection_group_member_autonomous_container_database_details.go create mode 100644 disasterrecovery/create_dr_protection_group_member_object_storage_bucket_details.go create mode 100644 disasterrecovery/dr_protection_group_member_autonomous_container_database.go create mode 100644 disasterrecovery/dr_protection_group_member_object_storage_bucket.go create mode 100644 disasterrecovery/update_dr_protection_group_member_autonomous_container_database_details.go create mode 100644 disasterrecovery/update_dr_protection_group_member_object_storage_bucket_details.go create mode 100644 fleetappsmanagement/action_group.go create mode 100644 fleetappsmanagement/action_group_details.go create mode 100644 fleetappsmanagement/action_type.go create mode 100644 fleetappsmanagement/activity_resource_target.go create mode 100644 fleetappsmanagement/announcement_collection.go create mode 100644 fleetappsmanagement/announcement_sort_by.go create mode 100644 fleetappsmanagement/announcement_summary.go create mode 100644 fleetappsmanagement/api_based_execution_details.go create mode 100644 fleetappsmanagement/associated_fleet_credential_details.go create mode 100644 fleetappsmanagement/associated_fleet_property_details.go create mode 100644 fleetappsmanagement/associated_fleet_resource_details.go create mode 100644 fleetappsmanagement/associated_local_task_details.go create mode 100644 fleetappsmanagement/associated_scheduler_definition.go create mode 100644 fleetappsmanagement/associated_shared_task_details.go create mode 100644 fleetappsmanagement/associated_task_details.go create mode 100644 fleetappsmanagement/associations.go create mode 100644 fleetappsmanagement/check_resource_tagging_details.go create mode 100644 fleetappsmanagement/check_resource_tagging_request_response.go create mode 100644 fleetappsmanagement/compliance_report.go create mode 100644 fleetappsmanagement/compliance_report_patch_detail.go create mode 100644 fleetappsmanagement/compliance_report_product.go create mode 100644 fleetappsmanagement/compliance_report_resource.go create mode 100644 fleetappsmanagement/compliance_report_target.go create mode 100644 fleetappsmanagement/compliance_state.go create mode 100644 fleetappsmanagement/component_properties.go create mode 100644 fleetappsmanagement/condition.go create mode 100644 fleetappsmanagement/confirm_targets_details.go create mode 100644 fleetappsmanagement/confirm_targets_request_response.go create mode 100644 fleetappsmanagement/content_details.go create mode 100644 fleetappsmanagement/create_fleet_credential_details.go create mode 100644 fleetappsmanagement/create_fleet_credential_request_response.go create mode 100644 fleetappsmanagement/create_fleet_details.go create mode 100644 fleetappsmanagement/create_fleet_property_details.go create mode 100644 fleetappsmanagement/create_fleet_property_request_response.go create mode 100644 fleetappsmanagement/create_fleet_request_response.go create mode 100644 fleetappsmanagement/create_fleet_resource_details.go create mode 100644 fleetappsmanagement/create_fleet_resource_request_response.go create mode 100644 fleetappsmanagement/create_maintenance_window_details.go create mode 100644 fleetappsmanagement/create_maintenance_window_request_response.go create mode 100644 fleetappsmanagement/create_onboarding_details.go create mode 100644 fleetappsmanagement/create_onboarding_request_response.go create mode 100644 fleetappsmanagement/create_property_details.go create mode 100644 fleetappsmanagement/create_property_request_response.go create mode 100644 fleetappsmanagement/create_scheduler_definition_details.go create mode 100644 fleetappsmanagement/create_scheduler_definition_request_response.go create mode 100644 fleetappsmanagement/credential_details.go create mode 100644 fleetappsmanagement/credential_entity_specific_details.go create mode 100644 fleetappsmanagement/delete_fleet_credential_request_response.go create mode 100644 fleetappsmanagement/delete_fleet_property_request_response.go create mode 100644 fleetappsmanagement/delete_fleet_request_response.go create mode 100644 fleetappsmanagement/delete_fleet_resource_request_response.go create mode 100644 fleetappsmanagement/delete_maintenance_window_request_response.go create mode 100644 fleetappsmanagement/delete_property_request_response.go create mode 100644 fleetappsmanagement/delete_scheduler_definition_request_response.go create mode 100644 fleetappsmanagement/delete_scheduler_job_request_response.go create mode 100644 fleetappsmanagement/details.go create mode 100644 fleetappsmanagement/discovered_target.go create mode 100644 fleetappsmanagement/entity_execution_details.go create mode 100644 fleetappsmanagement/execution.go create mode 100644 fleetappsmanagement/execution_collection.go create mode 100644 fleetappsmanagement/execution_details.go create mode 100644 fleetappsmanagement/execution_summary.go create mode 100644 fleetappsmanagement/execution_workflow_details.go create mode 100644 fleetappsmanagement/fleet.go create mode 100644 fleetappsmanagement/fleet_collection.go create mode 100644 fleetappsmanagement/fleet_credential.go create mode 100644 fleetappsmanagement/fleet_credential_collection.go create mode 100644 fleetappsmanagement/fleet_credential_summary.go create mode 100644 fleetappsmanagement/fleet_product_collection.go create mode 100644 fleetappsmanagement/fleet_product_summary.go create mode 100644 fleetappsmanagement/fleet_property.go create mode 100644 fleetappsmanagement/fleet_property_collection.go create mode 100644 fleetappsmanagement/fleet_property_summary.go create mode 100644 fleetappsmanagement/fleet_resource.go create mode 100644 fleetappsmanagement/fleet_resource_collection.go create mode 100644 fleetappsmanagement/fleet_resource_summary.go create mode 100644 fleetappsmanagement/fleet_summary.go create mode 100644 fleetappsmanagement/fleet_target.go create mode 100644 fleetappsmanagement/fleet_target_collection.go create mode 100644 fleetappsmanagement/fleet_target_summary.go create mode 100644 fleetappsmanagement/fleetappsmanagement_client.go create mode 100644 fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go create mode 100644 fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go create mode 100644 fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go create mode 100644 fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go create mode 100644 fleetappsmanagement/generate_compliance_report_details.go create mode 100644 fleetappsmanagement/generate_compliance_report_request_response.go create mode 100644 fleetappsmanagement/get_compliance_report_request_response.go create mode 100644 fleetappsmanagement/get_execution_request_response.go create mode 100644 fleetappsmanagement/get_fleet_credential_request_response.go create mode 100644 fleetappsmanagement/get_fleet_property_request_response.go create mode 100644 fleetappsmanagement/get_fleet_request_response.go create mode 100644 fleetappsmanagement/get_fleet_resource_request_response.go create mode 100644 fleetappsmanagement/get_job_activity_request_response.go create mode 100644 fleetappsmanagement/get_maintenance_window_request_response.go create mode 100644 fleetappsmanagement/get_property_request_response.go create mode 100644 fleetappsmanagement/get_runbook_request_response.go create mode 100644 fleetappsmanagement/get_scheduler_definition_request_response.go create mode 100644 fleetappsmanagement/get_scheduler_job_request_response.go create mode 100644 fleetappsmanagement/get_task_record_request_response.go create mode 100644 fleetappsmanagement/get_work_request_request_response.go create mode 100644 fleetappsmanagement/group.go create mode 100644 fleetappsmanagement/input_argument.go create mode 100644 fleetappsmanagement/input_parameter.go create mode 100644 fleetappsmanagement/inventory_resource_collection.go create mode 100644 fleetappsmanagement/inventory_resource_summary.go create mode 100644 fleetappsmanagement/job_activity.go create mode 100644 fleetappsmanagement/job_status.go create mode 100644 fleetappsmanagement/key_encryption_credential_details.go create mode 100644 fleetappsmanagement/life_cycle_action_group_type.go create mode 100644 fleetappsmanagement/list_announcements_request_response.go create mode 100644 fleetappsmanagement/list_executions_request_response.go create mode 100644 fleetappsmanagement/list_fleet_credentials_request_response.go create mode 100644 fleetappsmanagement/list_fleet_products_request_response.go create mode 100644 fleetappsmanagement/list_fleet_properties_request_response.go create mode 100644 fleetappsmanagement/list_fleet_resources_request_response.go create mode 100644 fleetappsmanagement/list_fleet_targets_request_response.go create mode 100644 fleetappsmanagement/list_fleets_request_response.go create mode 100644 fleetappsmanagement/list_inventory_resources_request_response.go create mode 100644 fleetappsmanagement/list_maintenance_windows_request_response.go create mode 100644 fleetappsmanagement/list_onboarding_policies_request_response.go create mode 100644 fleetappsmanagement/list_onboardings_request_response.go create mode 100644 fleetappsmanagement/list_properties_request_response.go create mode 100644 fleetappsmanagement/list_runbooks_request_response.go create mode 100644 fleetappsmanagement/list_scheduled_fleets_request_response.go create mode 100644 fleetappsmanagement/list_scheduler_definitions_request_response.go create mode 100644 fleetappsmanagement/list_scheduler_jobs_request_response.go create mode 100644 fleetappsmanagement/list_targets_request_response.go create mode 100644 fleetappsmanagement/list_task_records_request_response.go create mode 100644 fleetappsmanagement/list_work_request_errors_request_response.go create mode 100644 fleetappsmanagement/list_work_request_logs_request_response.go create mode 100644 fleetappsmanagement/list_work_requests_request_response.go create mode 100644 fleetappsmanagement/maintenance_window.go create mode 100644 fleetappsmanagement/maintenance_window_collection.go create mode 100644 fleetappsmanagement/maintenance_window_summary.go create mode 100644 fleetappsmanagement/maintenance_window_type.go create mode 100644 fleetappsmanagement/notification_preferences.go create mode 100644 fleetappsmanagement/object_storage_bucket_content_details.go create mode 100644 fleetappsmanagement/onboarding.go create mode 100644 fleetappsmanagement/onboarding_collection.go create mode 100644 fleetappsmanagement/onboarding_policy_collection.go create mode 100644 fleetappsmanagement/onboarding_policy_summary.go create mode 100644 fleetappsmanagement/onboarding_summary.go create mode 100644 fleetappsmanagement/operation_runbook.go create mode 100644 fleetappsmanagement/operation_status.go create mode 100644 fleetappsmanagement/operation_type.go create mode 100644 fleetappsmanagement/os_type.go create mode 100644 fleetappsmanagement/outcome.go create mode 100644 fleetappsmanagement/output_variable_details.go create mode 100644 fleetappsmanagement/output_variable_input_argument.go create mode 100644 fleetappsmanagement/output_variable_mapping.go create mode 100644 fleetappsmanagement/plain_text_credential_details.go create mode 100644 fleetappsmanagement/preferences.go create mode 100644 fleetappsmanagement/properties.go create mode 100644 fleetappsmanagement/property.go create mode 100644 fleetappsmanagement/property_collection.go create mode 100644 fleetappsmanagement/property_summary.go create mode 100644 fleetappsmanagement/request_resource_validation_details.go create mode 100644 fleetappsmanagement/request_resource_validation_request_response.go create mode 100644 fleetappsmanagement/request_target_discovery_details.go create mode 100644 fleetappsmanagement/request_target_discovery_request_response.go create mode 100644 fleetappsmanagement/resource_tag_check_details.go create mode 100644 fleetappsmanagement/resource_tag_enablement_info.go create mode 100644 fleetappsmanagement/rule.go create mode 100644 fleetappsmanagement/runbook.go create mode 100644 fleetappsmanagement/runbook_collection.go create mode 100644 fleetappsmanagement/runbook_summary.go create mode 100644 fleetappsmanagement/schedule.go create mode 100644 fleetappsmanagement/scheduled_fleet_collection.go create mode 100644 fleetappsmanagement/scheduled_fleet_summary.go create mode 100644 fleetappsmanagement/scheduler_definition.go create mode 100644 fleetappsmanagement/scheduler_definition_collection.go create mode 100644 fleetappsmanagement/scheduler_definition_summary.go create mode 100644 fleetappsmanagement/scheduler_job.go create mode 100644 fleetappsmanagement/scheduler_job_collection.go create mode 100644 fleetappsmanagement/scheduler_job_summary.go create mode 100644 fleetappsmanagement/scope.go create mode 100644 fleetappsmanagement/script_based_execution_details.go create mode 100644 fleetappsmanagement/selection.go create mode 100644 fleetappsmanagement/selection_criteria.go create mode 100644 fleetappsmanagement/sort_order.go create mode 100644 fleetappsmanagement/string_input_argument.go create mode 100644 fleetappsmanagement/target_credential_entity_specific_details.go create mode 100644 fleetappsmanagement/target_resource.go create mode 100644 fleetappsmanagement/task.go create mode 100644 fleetappsmanagement/task_argument.go create mode 100644 fleetappsmanagement/task_execution_type.go create mode 100644 fleetappsmanagement/task_record.go create mode 100644 fleetappsmanagement/task_record_collection.go create mode 100644 fleetappsmanagement/task_record_summary.go create mode 100644 fleetappsmanagement/task_scope.go create mode 100644 fleetappsmanagement/task_variable.go create mode 100644 fleetappsmanagement/update_fleet_credential_details.go create mode 100644 fleetappsmanagement/update_fleet_credential_request_response.go create mode 100644 fleetappsmanagement/update_fleet_details.go create mode 100644 fleetappsmanagement/update_fleet_property_details.go create mode 100644 fleetappsmanagement/update_fleet_property_request_response.go create mode 100644 fleetappsmanagement/update_fleet_request_response.go create mode 100644 fleetappsmanagement/update_fleet_resource_details.go create mode 100644 fleetappsmanagement/update_fleet_resource_request_response.go create mode 100644 fleetappsmanagement/update_maintenance_window_details.go create mode 100644 fleetappsmanagement/update_maintenance_window_request_response.go create mode 100644 fleetappsmanagement/update_property_details.go create mode 100644 fleetappsmanagement/update_property_request_response.go create mode 100644 fleetappsmanagement/update_scheduler_definition_details.go create mode 100644 fleetappsmanagement/update_scheduler_definition_request_response.go create mode 100644 fleetappsmanagement/update_scheduler_job_details.go create mode 100644 fleetappsmanagement/update_scheduler_job_request_response.go create mode 100644 fleetappsmanagement/value_type.go create mode 100644 fleetappsmanagement/vault_secret_credential_details.go create mode 100644 fleetappsmanagement/work_request.go create mode 100644 fleetappsmanagement/work_request_error.go create mode 100644 fleetappsmanagement/work_request_error_collection.go create mode 100644 fleetappsmanagement/work_request_log_entry.go create mode 100644 fleetappsmanagement/work_request_log_entry_collection.go create mode 100644 fleetappsmanagement/work_request_resource.go create mode 100644 fleetappsmanagement/work_request_resource_metadata_key.go create mode 100644 fleetappsmanagement/work_request_summary.go create mode 100644 fleetappsmanagement/work_request_summary_collection.go create mode 100644 fleetappsmanagement/workflow_component.go create mode 100644 fleetappsmanagement/workflow_group.go create mode 100644 fleetappsmanagement/workflow_group_component.go create mode 100644 fleetappsmanagement/workflow_task_component.go create mode 100644 integration/extend_data_retention_details.go create mode 100644 integration/extend_data_retention_request_response.go create mode 100644 mysql/data_storage.go create mode 100644 mysql/data_storage_details.go create mode 100644 redis/list_redis_cluster_nodes_request_response.go create mode 100644 redis/node_summary.go create mode 100644 redis/redis_node_collection.go diff --git a/CHANGELOG.md b/CHANGELOG.md index d1301c825c..84fadf82fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.72.0 - 2024-08-20 +### Added +- Support for Fleet Application Management service +- Support for creating maintenance runs using autonomous database software images in the Database service +- Support for Object Storage buckets, Oracle databases, Oracle databases on exascale Infrastructure, autonomous container databases, and autonomous container databases on Cloud at Customer in the Disaster Recovery service +- Support for multiple sharing modes in the OCI Cache service +- Support for extended data retention periods for instances in the Integration Cloud service +- Support for SQL watch and lifecycle management in the Database management service +- Support for identity domains and feature sets in the Analytics Cloud service +- Support for automatically extending the storage space for MySQL DB systems in pre-defined increments in the MySQL Database service + +### Breaking Changes +- The property `DrPlanExecutionType` has been removed from the model `ListDrPlanExecutionsRequest` in the Disaster Recovery service + ## 65.71.1 - 2024-08-13 ### Added - Support for calling Oracle Cloud Infrastructure services in the `me-abudhabi-4` region diff --git a/Makefile b/Makefile index 413577de62..334b0501cd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOC_SERVER_URL=https:\/\/docs.cloud.oracle.com -GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument queue recovery vbsinst identitydomains accessgovernancecp ocicontrolcenter osmanagementhub fleetsoftwareupdate computecloudatcustomer marketplacepublisher redis jmsjavadownloads psql generativeai generativeaiinference capacitymanagement globallydistributeddatabase desktops emaildataplane clusterplacementgroups marketplaceprivateoffer resourcescheduler demandsignal ##SPECNAME## +GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument queue recovery vbsinst identitydomains accessgovernancecp ocicontrolcenter osmanagementhub fleetsoftwareupdate computecloudatcustomer marketplacepublisher redis jmsjavadownloads psql generativeai generativeaiinference capacitymanagement globallydistributeddatabase desktops emaildataplane clusterplacementgroups marketplaceprivateoffer resourcescheduler demandsignal fleetappsmanagement ##SPECNAME## NON_GEN_TARGETS = common common/auth objectstorage/transfer example TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS) diff --git a/analytics/analytics_client.go b/analytics/analytics_client.go index c6d8c03668..ab95e4b432 100644 --- a/analytics/analytics_client.go +++ b/analytics/analytics_client.go @@ -1128,6 +1128,69 @@ func (client AnalyticsClient) scaleAnalyticsInstance(ctx context.Context, reques return response, err } +// SetFeatureBundle Set the external service properties of an Analytics instance. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/analytics/SetFeatureBundle.go.html to see an example of how to use SetFeatureBundle API. +// A default retry strategy applies to this operation SetFeatureBundle() +func (client AnalyticsClient) SetFeatureBundle(ctx context.Context, request SetFeatureBundleRequest) (response SetFeatureBundleResponse, 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.setFeatureBundle, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SetFeatureBundleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SetFeatureBundleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SetFeatureBundleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SetFeatureBundleResponse") + } + return +} + +// setFeatureBundle implements the OCIOperation interface (enables retrying operations) +func (client AnalyticsClient) setFeatureBundle(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/analyticsInstances/{analyticsInstanceId}/actions/setFeatureBundle", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response SetFeatureBundleResponse + 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/analytics/20190331/AnalyticsInstance/SetFeatureBundle" + err = common.PostProcessServiceError(err, "Analytics", "SetFeatureBundle", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // SetKmsKey Encrypts the customer data of this Analytics instance using either a customer OCI Vault Key or Oracle managed default key. // // # See also diff --git a/analytics/analytics_instance.go b/analytics/analytics_instance.go index 2b5290a229..2be365850c 100644 --- a/analytics/analytics_instance.go +++ b/analytics/analytics_instance.go @@ -70,13 +70,23 @@ type AnalyticsInstance struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + // System tags for this resource. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` // The date and time the instance was last updated (in the format defined by RFC3339). // This timestamp represents updates made through this API. External events do not // influence it. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The feature set of an Analytics instance. + FeatureBundle FeatureBundleEnum `mandatory:"false" json:"featureBundle,omitempty"` + + // Identity domain OCID. + DomainId *string `mandatory:"false" json:"domainId"` } func (m AnalyticsInstance) String() string { @@ -98,6 +108,9 @@ func (m AnalyticsInstance) ValidateEnumValue() (bool, error) { if _, ok := GetMappingLicenseTypeEnum(string(m.LicenseType)); !ok && m.LicenseType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", m.LicenseType, strings.Join(GetLicenseTypeEnumStringValues(), ","))) } + if _, ok := GetMappingFeatureBundleEnum(string(m.FeatureBundle)); !ok && m.FeatureBundle != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FeatureBundle: %s. Supported values are: %s.", m.FeatureBundle, strings.Join(GetFeatureBundleEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -115,8 +128,11 @@ func (m *AnalyticsInstance) UnmarshalJSON(data []byte) (e error) { ServiceUrl *string `json:"serviceUrl"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` FreeformTags map[string]string `json:"freeformTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` KmsKeyId *string `json:"kmsKeyId"` TimeUpdated *common.SDKTime `json:"timeUpdated"` + FeatureBundle FeatureBundleEnum `json:"featureBundle"` + DomainId *string `json:"domainId"` Id *string `json:"id"` Name *string `json:"name"` CompartmentId *string `json:"compartmentId"` @@ -148,10 +164,16 @@ func (m *AnalyticsInstance) UnmarshalJSON(data []byte) (e error) { m.FreeformTags = model.FreeformTags + m.SystemTags = model.SystemTags + m.KmsKeyId = model.KmsKeyId m.TimeUpdated = model.TimeUpdated + m.FeatureBundle = model.FeatureBundle + + m.DomainId = model.DomainId + m.Id = model.Id m.Name = model.Name diff --git a/analytics/analytics_instance_summary.go b/analytics/analytics_instance_summary.go index 153e4c8dc8..7229939bda 100644 --- a/analytics/analytics_instance_summary.go +++ b/analytics/analytics_instance_summary.go @@ -54,6 +54,20 @@ type AnalyticsInstanceSummary struct { // URL of the Analytics service. ServiceUrl *string `mandatory:"false" json:"serviceUrl"` + // Defined 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). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // System tags for this resource. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + // The date and time the instance was last updated (in the format defined by RFC3339). // This timestamp represents updates made through this API. External events do not // influence it. @@ -92,6 +106,9 @@ func (m *AnalyticsInstanceSummary) UnmarshalJSON(data []byte) (e error) { LicenseType LicenseTypeEnum `json:"licenseType"` EmailNotification *string `json:"emailNotification"` ServiceUrl *string `json:"serviceUrl"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` TimeUpdated *common.SDKTime `json:"timeUpdated"` Id *string `json:"id"` Name *string `json:"name"` @@ -116,6 +133,12 @@ func (m *AnalyticsInstanceSummary) UnmarshalJSON(data []byte) (e error) { m.ServiceUrl = model.ServiceUrl + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.SystemTags = model.SystemTags + m.TimeUpdated = model.TimeUpdated m.Id = model.Id diff --git a/analytics/capacity.go b/analytics/capacity.go index 7b34232e90..d0716faea9 100644 --- a/analytics/capacity.go +++ b/analytics/capacity.go @@ -19,10 +19,12 @@ import ( type Capacity struct { // The capacity model to use. + // Accepted values are: + // OLPU_COUNT, USER_COUNT CapacityType CapacityTypeEnum `mandatory:"true" json:"capacityType"` - // The capacity value selected (OLPU count, number of users, ...etc...). This parameter affects the - // number of CPUs, amount of memory or other resources allocated to the instance. + // The capacity value selected, either the number of OCPUs (OLPU_COUNT) or the number of users (USER_COUNT). + // This parameter affects the number of OCPUs, amount of memory, and other resources allocated to the instance. CapacityValue *int `mandatory:"true" json:"capacityValue"` } diff --git a/analytics/create_analytics_instance_details.go b/analytics/create_analytics_instance_details.go index 937f39200c..1ea52b1ea4 100644 --- a/analytics/create_analytics_instance_details.go +++ b/analytics/create_analytics_instance_details.go @@ -54,8 +54,17 @@ type CreateAnalyticsInstanceDetails struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + // OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // domain id for which the user is authorized. + DomainId *string `mandatory:"false" json:"domainId"` + + // user name of the authorized user. + AdminUser *string `mandatory:"false" json:"adminUser"` + + // The feature set of an Analytics instance. + FeatureBundle FeatureBundleEnum `mandatory:"false" json:"featureBundle,omitempty"` } func (m CreateAnalyticsInstanceDetails) String() string { @@ -74,6 +83,9 @@ func (m CreateAnalyticsInstanceDetails) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", m.LicenseType, strings.Join(GetLicenseTypeEnumStringValues(), ","))) } + if _, ok := GetMappingFeatureBundleEnum(string(m.FeatureBundle)); !ok && m.FeatureBundle != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FeatureBundle: %s. Supported values are: %s.", m.FeatureBundle, strings.Join(GetFeatureBundleEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -90,6 +102,9 @@ func (m *CreateAnalyticsInstanceDetails) UnmarshalJSON(data []byte) (e error) { DefinedTags map[string]map[string]interface{} `json:"definedTags"` FreeformTags map[string]string `json:"freeformTags"` KmsKeyId *string `json:"kmsKeyId"` + DomainId *string `json:"domainId"` + AdminUser *string `json:"adminUser"` + FeatureBundle FeatureBundleEnum `json:"featureBundle"` Name *string `json:"name"` CompartmentId *string `json:"compartmentId"` FeatureSet FeatureSetEnum `json:"featureSet"` @@ -124,6 +139,12 @@ func (m *CreateAnalyticsInstanceDetails) UnmarshalJSON(data []byte) (e error) { m.KmsKeyId = model.KmsKeyId + m.DomainId = model.DomainId + + m.AdminUser = model.AdminUser + + m.FeatureBundle = model.FeatureBundle + m.Name = model.Name m.CompartmentId = model.CompartmentId diff --git a/analytics/feature_bundle.go b/analytics/feature_bundle.go new file mode 100644 index 0000000000..5bf330c194 --- /dev/null +++ b/analytics/feature_bundle.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. + +// Analytics API +// +// Analytics API. +// + +package analytics + +import ( + "strings" +) + +// FeatureBundleEnum Enum with underlying type: string +type FeatureBundleEnum string + +// Set of constants representing the allowable values for FeatureBundleEnum +const ( + FeatureBundleFawPaid FeatureBundleEnum = "FAW_PAID" + FeatureBundleFawFree FeatureBundleEnum = "FAW_FREE" + FeatureBundleEeEmbedded FeatureBundleEnum = "EE_EMBEDDED" + FeatureBundleSeEmbedded FeatureBundleEnum = "SE_EMBEDDED" +) + +var mappingFeatureBundleEnum = map[string]FeatureBundleEnum{ + "FAW_PAID": FeatureBundleFawPaid, + "FAW_FREE": FeatureBundleFawFree, + "EE_EMBEDDED": FeatureBundleEeEmbedded, + "SE_EMBEDDED": FeatureBundleSeEmbedded, +} + +var mappingFeatureBundleEnumLowerCase = map[string]FeatureBundleEnum{ + "faw_paid": FeatureBundleFawPaid, + "faw_free": FeatureBundleFawFree, + "ee_embedded": FeatureBundleEeEmbedded, + "se_embedded": FeatureBundleSeEmbedded, +} + +// GetFeatureBundleEnumValues Enumerates the set of values for FeatureBundleEnum +func GetFeatureBundleEnumValues() []FeatureBundleEnum { + values := make([]FeatureBundleEnum, 0) + for _, v := range mappingFeatureBundleEnum { + values = append(values, v) + } + return values +} + +// GetFeatureBundleEnumStringValues Enumerates the set of values in String for FeatureBundleEnum +func GetFeatureBundleEnumStringValues() []string { + return []string{ + "FAW_PAID", + "FAW_FREE", + "EE_EMBEDDED", + "SE_EMBEDDED", + } +} + +// GetMappingFeatureBundleEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFeatureBundleEnum(val string) (FeatureBundleEnum, bool) { + enum, ok := mappingFeatureBundleEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/analytics/set_feature_bundle_details.go b/analytics/set_feature_bundle_details.go new file mode 100644 index 0000000000..3c7ba4220d --- /dev/null +++ b/analytics/set_feature_bundle_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. + +// Analytics API +// +// Analytics API. +// + +package analytics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SetFeatureBundleDetails Input payload for the feature set of an Analytics instance. +type SetFeatureBundleDetails struct { + + // The feature set of an Analytics instance. + FeatureBundle FeatureBundleEnum `mandatory:"false" json:"featureBundle,omitempty"` +} + +func (m SetFeatureBundleDetails) 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 SetFeatureBundleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingFeatureBundleEnum(string(m.FeatureBundle)); !ok && m.FeatureBundle != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FeatureBundle: %s. Supported values are: %s.", m.FeatureBundle, strings.Join(GetFeatureBundleEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/analytics/set_feature_bundle_request_response.go b/analytics/set_feature_bundle_request_response.go new file mode 100644 index 0000000000..a9f76b8922 --- /dev/null +++ b/analytics/set_feature_bundle_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 analytics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SetFeatureBundleRequest wrapper for the SetFeatureBundle operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/analytics/SetFeatureBundle.go.html to see an example of how to use SetFeatureBundleRequest. +type SetFeatureBundleRequest struct { + + // The OCID of the AnalyticsInstance. + AnalyticsInstanceId *string `mandatory:"true" contributesTo:"path" name:"analyticsInstanceId"` + + // Input payload for the feature set of an Analytics instance. + SetFeatureBundleDetails `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 identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SetFeatureBundleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SetFeatureBundleRequest) 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 SetFeatureBundleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SetFeatureBundleRequest) 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 SetFeatureBundleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SetFeatureBundleResponse wrapper for the SetFeatureBundle operation +type SetFeatureBundleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID of the work request. Use GetWorkRequest with this ID to track the status + // of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response SetFeatureBundleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SetFeatureBundleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/common/version.go b/common/version.go index cb9804ddff..2f111c1b0f 100644 --- a/common/version.go +++ b/common/version.go @@ -12,8 +12,8 @@ import ( const ( major = "65" - minor = "71" - patch = "1" + minor = "72" + patch = "0" tag = "" ) diff --git a/database/autonomous_database_software_image.go b/database/autonomous_database_software_image.go index 0f9bef6e17..5a87765897 100644 --- a/database/autonomous_database_software_image.go +++ b/database/autonomous_database_software_image.go @@ -56,6 +56,9 @@ type AutonomousDatabaseSoftwareImage struct { // One-off patches included in the Autonomous Database Software Image AutonomousDsiOneOffPatches []string `mandatory:"false" json:"autonomousDsiOneOffPatches"` + + // DST Time-Zone File version of the Autonomous Container Database. + DstFileVersion *string `mandatory:"false" json:"dstFileVersion"` } func (m AutonomousDatabaseSoftwareImage) String() string { diff --git a/database/autonomous_database_software_image_summary.go b/database/autonomous_database_software_image_summary.go index 231ac2c846..69359cae5b 100644 --- a/database/autonomous_database_software_image_summary.go +++ b/database/autonomous_database_software_image_summary.go @@ -56,6 +56,9 @@ type AutonomousDatabaseSoftwareImageSummary struct { // One-off patches included in the Autonomous Database Software Image AutonomousDsiOneOffPatches []string `mandatory:"false" json:"autonomousDsiOneOffPatches"` + + // DST Time-Zone File version of the Autonomous Container Database. + DstFileVersion *string `mandatory:"false" json:"dstFileVersion"` } func (m AutonomousDatabaseSoftwareImageSummary) String() string { diff --git a/database/create_maintenance_run_details.go b/database/create_maintenance_run_details.go index eb924b43cb..d5eac5443f 100644 --- a/database/create_maintenance_run_details.go +++ b/database/create_maintenance_run_details.go @@ -24,7 +24,7 @@ type CreateMaintenanceRunDetails struct { // The date and time that update should be scheduled. TimeScheduled *common.SDKTime `mandatory:"true" json:"timeScheduled"` - // Patch type, either "QUARTERLY" or "TIMEZONE". + // Patch type, either "QUARTERLY", "TIMEZONE" or "CUSTOM_DATABASE_SOFTWARE_IMAGE". PatchType CreateMaintenanceRunDetailsPatchTypeEnum `mandatory:"true" json:"patchType"` // Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner. @@ -36,6 +36,9 @@ type CreateMaintenanceRunDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment containing the Maintenance Run. CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The Autonomous Database Software Image OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + DatabaseSoftwareImageId *string `mandatory:"false" json:"databaseSoftwareImageId"` } func (m CreateMaintenanceRunDetails) String() string { @@ -107,18 +110,21 @@ type CreateMaintenanceRunDetailsPatchTypeEnum string // Set of constants representing the allowable values for CreateMaintenanceRunDetailsPatchTypeEnum const ( - CreateMaintenanceRunDetailsPatchTypeQuarterly CreateMaintenanceRunDetailsPatchTypeEnum = "QUARTERLY" - CreateMaintenanceRunDetailsPatchTypeTimezone CreateMaintenanceRunDetailsPatchTypeEnum = "TIMEZONE" + CreateMaintenanceRunDetailsPatchTypeQuarterly CreateMaintenanceRunDetailsPatchTypeEnum = "QUARTERLY" + CreateMaintenanceRunDetailsPatchTypeTimezone CreateMaintenanceRunDetailsPatchTypeEnum = "TIMEZONE" + CreateMaintenanceRunDetailsPatchTypeCustomDatabaseSoftwareImage CreateMaintenanceRunDetailsPatchTypeEnum = "CUSTOM_DATABASE_SOFTWARE_IMAGE" ) var mappingCreateMaintenanceRunDetailsPatchTypeEnum = map[string]CreateMaintenanceRunDetailsPatchTypeEnum{ - "QUARTERLY": CreateMaintenanceRunDetailsPatchTypeQuarterly, - "TIMEZONE": CreateMaintenanceRunDetailsPatchTypeTimezone, + "QUARTERLY": CreateMaintenanceRunDetailsPatchTypeQuarterly, + "TIMEZONE": CreateMaintenanceRunDetailsPatchTypeTimezone, + "CUSTOM_DATABASE_SOFTWARE_IMAGE": CreateMaintenanceRunDetailsPatchTypeCustomDatabaseSoftwareImage, } var mappingCreateMaintenanceRunDetailsPatchTypeEnumLowerCase = map[string]CreateMaintenanceRunDetailsPatchTypeEnum{ - "quarterly": CreateMaintenanceRunDetailsPatchTypeQuarterly, - "timezone": CreateMaintenanceRunDetailsPatchTypeTimezone, + "quarterly": CreateMaintenanceRunDetailsPatchTypeQuarterly, + "timezone": CreateMaintenanceRunDetailsPatchTypeTimezone, + "custom_database_software_image": CreateMaintenanceRunDetailsPatchTypeCustomDatabaseSoftwareImage, } // GetCreateMaintenanceRunDetailsPatchTypeEnumValues Enumerates the set of values for CreateMaintenanceRunDetailsPatchTypeEnum @@ -135,6 +141,7 @@ func GetCreateMaintenanceRunDetailsPatchTypeEnumStringValues() []string { return []string{ "QUARTERLY", "TIMEZONE", + "CUSTOM_DATABASE_SOFTWARE_IMAGE", } } diff --git a/database/maintenance_run.go b/database/maintenance_run.go index b2e3a0e699..5fd1502945 100644 --- a/database/maintenance_run.go +++ b/database/maintenance_run.go @@ -105,6 +105,9 @@ type MaintenanceRun struct { // The estimated start time of the next infrastruture component patching operation. EstimatedComponentPatchingStartTime *common.SDKTime `mandatory:"false" json:"estimatedComponentPatchingStartTime"` + + // The Autonomous Database Software Image OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + DatabaseSoftwareImageId *string `mandatory:"false" json:"databaseSoftwareImageId"` } func (m MaintenanceRun) String() string { @@ -324,36 +327,39 @@ type MaintenanceRunMaintenanceSubtypeEnum string // Set of constants representing the allowable values for MaintenanceRunMaintenanceSubtypeEnum const ( - MaintenanceRunMaintenanceSubtypeQuarterly MaintenanceRunMaintenanceSubtypeEnum = "QUARTERLY" - MaintenanceRunMaintenanceSubtypeHardware MaintenanceRunMaintenanceSubtypeEnum = "HARDWARE" - MaintenanceRunMaintenanceSubtypeCritical MaintenanceRunMaintenanceSubtypeEnum = "CRITICAL" - MaintenanceRunMaintenanceSubtypeInfrastructure MaintenanceRunMaintenanceSubtypeEnum = "INFRASTRUCTURE" - MaintenanceRunMaintenanceSubtypeDatabase MaintenanceRunMaintenanceSubtypeEnum = "DATABASE" - MaintenanceRunMaintenanceSubtypeOneoff MaintenanceRunMaintenanceSubtypeEnum = "ONEOFF" - MaintenanceRunMaintenanceSubtypeSecurityMonthly MaintenanceRunMaintenanceSubtypeEnum = "SECURITY_MONTHLY" - MaintenanceRunMaintenanceSubtypeTimezone MaintenanceRunMaintenanceSubtypeEnum = "TIMEZONE" + MaintenanceRunMaintenanceSubtypeQuarterly MaintenanceRunMaintenanceSubtypeEnum = "QUARTERLY" + MaintenanceRunMaintenanceSubtypeHardware MaintenanceRunMaintenanceSubtypeEnum = "HARDWARE" + MaintenanceRunMaintenanceSubtypeCritical MaintenanceRunMaintenanceSubtypeEnum = "CRITICAL" + MaintenanceRunMaintenanceSubtypeInfrastructure MaintenanceRunMaintenanceSubtypeEnum = "INFRASTRUCTURE" + MaintenanceRunMaintenanceSubtypeDatabase MaintenanceRunMaintenanceSubtypeEnum = "DATABASE" + MaintenanceRunMaintenanceSubtypeOneoff MaintenanceRunMaintenanceSubtypeEnum = "ONEOFF" + MaintenanceRunMaintenanceSubtypeSecurityMonthly MaintenanceRunMaintenanceSubtypeEnum = "SECURITY_MONTHLY" + MaintenanceRunMaintenanceSubtypeTimezone MaintenanceRunMaintenanceSubtypeEnum = "TIMEZONE" + MaintenanceRunMaintenanceSubtypeCustomDatabaseSoftwareImage MaintenanceRunMaintenanceSubtypeEnum = "CUSTOM_DATABASE_SOFTWARE_IMAGE" ) var mappingMaintenanceRunMaintenanceSubtypeEnum = map[string]MaintenanceRunMaintenanceSubtypeEnum{ - "QUARTERLY": MaintenanceRunMaintenanceSubtypeQuarterly, - "HARDWARE": MaintenanceRunMaintenanceSubtypeHardware, - "CRITICAL": MaintenanceRunMaintenanceSubtypeCritical, - "INFRASTRUCTURE": MaintenanceRunMaintenanceSubtypeInfrastructure, - "DATABASE": MaintenanceRunMaintenanceSubtypeDatabase, - "ONEOFF": MaintenanceRunMaintenanceSubtypeOneoff, - "SECURITY_MONTHLY": MaintenanceRunMaintenanceSubtypeSecurityMonthly, - "TIMEZONE": MaintenanceRunMaintenanceSubtypeTimezone, + "QUARTERLY": MaintenanceRunMaintenanceSubtypeQuarterly, + "HARDWARE": MaintenanceRunMaintenanceSubtypeHardware, + "CRITICAL": MaintenanceRunMaintenanceSubtypeCritical, + "INFRASTRUCTURE": MaintenanceRunMaintenanceSubtypeInfrastructure, + "DATABASE": MaintenanceRunMaintenanceSubtypeDatabase, + "ONEOFF": MaintenanceRunMaintenanceSubtypeOneoff, + "SECURITY_MONTHLY": MaintenanceRunMaintenanceSubtypeSecurityMonthly, + "TIMEZONE": MaintenanceRunMaintenanceSubtypeTimezone, + "CUSTOM_DATABASE_SOFTWARE_IMAGE": MaintenanceRunMaintenanceSubtypeCustomDatabaseSoftwareImage, } var mappingMaintenanceRunMaintenanceSubtypeEnumLowerCase = map[string]MaintenanceRunMaintenanceSubtypeEnum{ - "quarterly": MaintenanceRunMaintenanceSubtypeQuarterly, - "hardware": MaintenanceRunMaintenanceSubtypeHardware, - "critical": MaintenanceRunMaintenanceSubtypeCritical, - "infrastructure": MaintenanceRunMaintenanceSubtypeInfrastructure, - "database": MaintenanceRunMaintenanceSubtypeDatabase, - "oneoff": MaintenanceRunMaintenanceSubtypeOneoff, - "security_monthly": MaintenanceRunMaintenanceSubtypeSecurityMonthly, - "timezone": MaintenanceRunMaintenanceSubtypeTimezone, + "quarterly": MaintenanceRunMaintenanceSubtypeQuarterly, + "hardware": MaintenanceRunMaintenanceSubtypeHardware, + "critical": MaintenanceRunMaintenanceSubtypeCritical, + "infrastructure": MaintenanceRunMaintenanceSubtypeInfrastructure, + "database": MaintenanceRunMaintenanceSubtypeDatabase, + "oneoff": MaintenanceRunMaintenanceSubtypeOneoff, + "security_monthly": MaintenanceRunMaintenanceSubtypeSecurityMonthly, + "timezone": MaintenanceRunMaintenanceSubtypeTimezone, + "custom_database_software_image": MaintenanceRunMaintenanceSubtypeCustomDatabaseSoftwareImage, } // GetMaintenanceRunMaintenanceSubtypeEnumValues Enumerates the set of values for MaintenanceRunMaintenanceSubtypeEnum @@ -376,6 +382,7 @@ func GetMaintenanceRunMaintenanceSubtypeEnumStringValues() []string { "ONEOFF", "SECURITY_MONTHLY", "TIMEZONE", + "CUSTOM_DATABASE_SOFTWARE_IMAGE", } } diff --git a/database/maintenance_run_summary.go b/database/maintenance_run_summary.go index 28568c7730..456b2c780c 100644 --- a/database/maintenance_run_summary.go +++ b/database/maintenance_run_summary.go @@ -105,6 +105,9 @@ type MaintenanceRunSummary struct { // The estimated start time of the next infrastruture component patching operation. EstimatedComponentPatchingStartTime *common.SDKTime `mandatory:"false" json:"estimatedComponentPatchingStartTime"` + + // The Autonomous Database Software Image OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + DatabaseSoftwareImageId *string `mandatory:"false" json:"databaseSoftwareImageId"` } func (m MaintenanceRunSummary) String() string { @@ -324,36 +327,39 @@ type MaintenanceRunSummaryMaintenanceSubtypeEnum string // Set of constants representing the allowable values for MaintenanceRunSummaryMaintenanceSubtypeEnum const ( - MaintenanceRunSummaryMaintenanceSubtypeQuarterly MaintenanceRunSummaryMaintenanceSubtypeEnum = "QUARTERLY" - MaintenanceRunSummaryMaintenanceSubtypeHardware MaintenanceRunSummaryMaintenanceSubtypeEnum = "HARDWARE" - MaintenanceRunSummaryMaintenanceSubtypeCritical MaintenanceRunSummaryMaintenanceSubtypeEnum = "CRITICAL" - MaintenanceRunSummaryMaintenanceSubtypeInfrastructure MaintenanceRunSummaryMaintenanceSubtypeEnum = "INFRASTRUCTURE" - MaintenanceRunSummaryMaintenanceSubtypeDatabase MaintenanceRunSummaryMaintenanceSubtypeEnum = "DATABASE" - MaintenanceRunSummaryMaintenanceSubtypeOneoff MaintenanceRunSummaryMaintenanceSubtypeEnum = "ONEOFF" - MaintenanceRunSummaryMaintenanceSubtypeSecurityMonthly MaintenanceRunSummaryMaintenanceSubtypeEnum = "SECURITY_MONTHLY" - MaintenanceRunSummaryMaintenanceSubtypeTimezone MaintenanceRunSummaryMaintenanceSubtypeEnum = "TIMEZONE" + MaintenanceRunSummaryMaintenanceSubtypeQuarterly MaintenanceRunSummaryMaintenanceSubtypeEnum = "QUARTERLY" + MaintenanceRunSummaryMaintenanceSubtypeHardware MaintenanceRunSummaryMaintenanceSubtypeEnum = "HARDWARE" + MaintenanceRunSummaryMaintenanceSubtypeCritical MaintenanceRunSummaryMaintenanceSubtypeEnum = "CRITICAL" + MaintenanceRunSummaryMaintenanceSubtypeInfrastructure MaintenanceRunSummaryMaintenanceSubtypeEnum = "INFRASTRUCTURE" + MaintenanceRunSummaryMaintenanceSubtypeDatabase MaintenanceRunSummaryMaintenanceSubtypeEnum = "DATABASE" + MaintenanceRunSummaryMaintenanceSubtypeOneoff MaintenanceRunSummaryMaintenanceSubtypeEnum = "ONEOFF" + MaintenanceRunSummaryMaintenanceSubtypeSecurityMonthly MaintenanceRunSummaryMaintenanceSubtypeEnum = "SECURITY_MONTHLY" + MaintenanceRunSummaryMaintenanceSubtypeTimezone MaintenanceRunSummaryMaintenanceSubtypeEnum = "TIMEZONE" + MaintenanceRunSummaryMaintenanceSubtypeCustomDatabaseSoftwareImage MaintenanceRunSummaryMaintenanceSubtypeEnum = "CUSTOM_DATABASE_SOFTWARE_IMAGE" ) var mappingMaintenanceRunSummaryMaintenanceSubtypeEnum = map[string]MaintenanceRunSummaryMaintenanceSubtypeEnum{ - "QUARTERLY": MaintenanceRunSummaryMaintenanceSubtypeQuarterly, - "HARDWARE": MaintenanceRunSummaryMaintenanceSubtypeHardware, - "CRITICAL": MaintenanceRunSummaryMaintenanceSubtypeCritical, - "INFRASTRUCTURE": MaintenanceRunSummaryMaintenanceSubtypeInfrastructure, - "DATABASE": MaintenanceRunSummaryMaintenanceSubtypeDatabase, - "ONEOFF": MaintenanceRunSummaryMaintenanceSubtypeOneoff, - "SECURITY_MONTHLY": MaintenanceRunSummaryMaintenanceSubtypeSecurityMonthly, - "TIMEZONE": MaintenanceRunSummaryMaintenanceSubtypeTimezone, + "QUARTERLY": MaintenanceRunSummaryMaintenanceSubtypeQuarterly, + "HARDWARE": MaintenanceRunSummaryMaintenanceSubtypeHardware, + "CRITICAL": MaintenanceRunSummaryMaintenanceSubtypeCritical, + "INFRASTRUCTURE": MaintenanceRunSummaryMaintenanceSubtypeInfrastructure, + "DATABASE": MaintenanceRunSummaryMaintenanceSubtypeDatabase, + "ONEOFF": MaintenanceRunSummaryMaintenanceSubtypeOneoff, + "SECURITY_MONTHLY": MaintenanceRunSummaryMaintenanceSubtypeSecurityMonthly, + "TIMEZONE": MaintenanceRunSummaryMaintenanceSubtypeTimezone, + "CUSTOM_DATABASE_SOFTWARE_IMAGE": MaintenanceRunSummaryMaintenanceSubtypeCustomDatabaseSoftwareImage, } var mappingMaintenanceRunSummaryMaintenanceSubtypeEnumLowerCase = map[string]MaintenanceRunSummaryMaintenanceSubtypeEnum{ - "quarterly": MaintenanceRunSummaryMaintenanceSubtypeQuarterly, - "hardware": MaintenanceRunSummaryMaintenanceSubtypeHardware, - "critical": MaintenanceRunSummaryMaintenanceSubtypeCritical, - "infrastructure": MaintenanceRunSummaryMaintenanceSubtypeInfrastructure, - "database": MaintenanceRunSummaryMaintenanceSubtypeDatabase, - "oneoff": MaintenanceRunSummaryMaintenanceSubtypeOneoff, - "security_monthly": MaintenanceRunSummaryMaintenanceSubtypeSecurityMonthly, - "timezone": MaintenanceRunSummaryMaintenanceSubtypeTimezone, + "quarterly": MaintenanceRunSummaryMaintenanceSubtypeQuarterly, + "hardware": MaintenanceRunSummaryMaintenanceSubtypeHardware, + "critical": MaintenanceRunSummaryMaintenanceSubtypeCritical, + "infrastructure": MaintenanceRunSummaryMaintenanceSubtypeInfrastructure, + "database": MaintenanceRunSummaryMaintenanceSubtypeDatabase, + "oneoff": MaintenanceRunSummaryMaintenanceSubtypeOneoff, + "security_monthly": MaintenanceRunSummaryMaintenanceSubtypeSecurityMonthly, + "timezone": MaintenanceRunSummaryMaintenanceSubtypeTimezone, + "custom_database_software_image": MaintenanceRunSummaryMaintenanceSubtypeCustomDatabaseSoftwareImage, } // GetMaintenanceRunSummaryMaintenanceSubtypeEnumValues Enumerates the set of values for MaintenanceRunSummaryMaintenanceSubtypeEnum @@ -376,6 +382,7 @@ func GetMaintenanceRunSummaryMaintenanceSubtypeEnumStringValues() []string { "ONEOFF", "SECURITY_MONTHLY", "TIMEZONE", + "CUSTOM_DATABASE_SOFTWARE_IMAGE", } } diff --git a/databasemanagement/database_connection_credentials.go b/databasemanagement/database_connection_credentials.go index 7e7d21848c..bd675c8762 100644 --- a/databasemanagement/database_connection_credentials.go +++ b/databasemanagement/database_connection_credentials.go @@ -53,6 +53,10 @@ func (m *databaseconnectioncredentials) UnmarshalPolymorphicJSON(data []byte) (i var err error switch m.CredentialType { + case "NAMED_CREDENTIAL": + mm := DatabaseNamedCredentialConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "NAME_REFERENCE": mm := DatabaseConnectionCredentailsByName{} err = json.Unmarshal(data, &mm) @@ -92,21 +96,24 @@ type DatabaseConnectionCredentialsCredentialTypeEnum string // Set of constants representing the allowable values for DatabaseConnectionCredentialsCredentialTypeEnum const ( - DatabaseConnectionCredentialsCredentialTypeNameReference DatabaseConnectionCredentialsCredentialTypeEnum = "NAME_REFERENCE" - DatabaseConnectionCredentialsCredentialTypeDetails DatabaseConnectionCredentialsCredentialTypeEnum = "DETAILS" - DatabaseConnectionCredentialsCredentialTypeSslDetails DatabaseConnectionCredentialsCredentialTypeEnum = "SSL_DETAILS" + DatabaseConnectionCredentialsCredentialTypeNameReference DatabaseConnectionCredentialsCredentialTypeEnum = "NAME_REFERENCE" + DatabaseConnectionCredentialsCredentialTypeDetails DatabaseConnectionCredentialsCredentialTypeEnum = "DETAILS" + DatabaseConnectionCredentialsCredentialTypeSslDetails DatabaseConnectionCredentialsCredentialTypeEnum = "SSL_DETAILS" + DatabaseConnectionCredentialsCredentialTypeNamedCredentials DatabaseConnectionCredentialsCredentialTypeEnum = "NAMED_CREDENTIALS" ) var mappingDatabaseConnectionCredentialsCredentialTypeEnum = map[string]DatabaseConnectionCredentialsCredentialTypeEnum{ - "NAME_REFERENCE": DatabaseConnectionCredentialsCredentialTypeNameReference, - "DETAILS": DatabaseConnectionCredentialsCredentialTypeDetails, - "SSL_DETAILS": DatabaseConnectionCredentialsCredentialTypeSslDetails, + "NAME_REFERENCE": DatabaseConnectionCredentialsCredentialTypeNameReference, + "DETAILS": DatabaseConnectionCredentialsCredentialTypeDetails, + "SSL_DETAILS": DatabaseConnectionCredentialsCredentialTypeSslDetails, + "NAMED_CREDENTIALS": DatabaseConnectionCredentialsCredentialTypeNamedCredentials, } var mappingDatabaseConnectionCredentialsCredentialTypeEnumLowerCase = map[string]DatabaseConnectionCredentialsCredentialTypeEnum{ - "name_reference": DatabaseConnectionCredentialsCredentialTypeNameReference, - "details": DatabaseConnectionCredentialsCredentialTypeDetails, - "ssl_details": DatabaseConnectionCredentialsCredentialTypeSslDetails, + "name_reference": DatabaseConnectionCredentialsCredentialTypeNameReference, + "details": DatabaseConnectionCredentialsCredentialTypeDetails, + "ssl_details": DatabaseConnectionCredentialsCredentialTypeSslDetails, + "named_credentials": DatabaseConnectionCredentialsCredentialTypeNamedCredentials, } // GetDatabaseConnectionCredentialsCredentialTypeEnumValues Enumerates the set of values for DatabaseConnectionCredentialsCredentialTypeEnum @@ -124,6 +131,7 @@ func GetDatabaseConnectionCredentialsCredentialTypeEnumStringValues() []string { "NAME_REFERENCE", "DETAILS", "SSL_DETAILS", + "NAMED_CREDENTIALS", } } diff --git a/databasemanagement/database_feature_configuration.go b/databasemanagement/database_feature_configuration.go index cf3032391d..58628cd0f9 100644 --- a/databasemanagement/database_feature_configuration.go +++ b/databasemanagement/database_feature_configuration.go @@ -69,6 +69,14 @@ func (m *databasefeatureconfiguration) UnmarshalPolymorphicJSON(data []byte) (in mm := DatabaseDiagnosticsAndManagementFeatureConfiguration{} err = json.Unmarshal(data, &mm) return mm, err + case "DB_LIFECYCLE_MANAGEMENT": + mm := DatabaseLifecycleFeatureConfiguration{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SQLWATCH": + mm := DatabaseSqlWatchFeatureConfiguration{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for DatabaseFeatureConfiguration: %s.", m.Feature) return *m, nil diff --git a/databasemanagement/database_feature_details.go b/databasemanagement/database_feature_details.go index 1a2e9ac295..ce1903bb39 100644 --- a/databasemanagement/database_feature_details.go +++ b/databasemanagement/database_feature_details.go @@ -63,6 +63,14 @@ func (m *databasefeaturedetails) UnmarshalPolymorphicJSON(data []byte) (interfac mm := DatabaseDiagnosticsAndManagementFeatureDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "DB_LIFECYCLE_MANAGEMENT": + mm := DatabaseLifecycleManagementFeatureDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SQLWATCH": + mm := DatabaseSqlWatchFeatureDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for DatabaseFeatureDetails: %s.", m.Feature) return *m, nil diff --git a/databasemanagement/database_lifecycle_feature_configuration.go b/databasemanagement/database_lifecycle_feature_configuration.go new file mode 100644 index 0000000000..a10d760a45 --- /dev/null +++ b/databasemanagement/database_lifecycle_feature_configuration.go @@ -0,0 +1,158 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseLifecycleFeatureConfiguration The details required to enable the Database Lifecycle Management feature. +type DatabaseLifecycleFeatureConfiguration struct { + ConnectorDetails ConnectorDetails `mandatory:"false" json:"connectorDetails"` + + DatabaseConnectionDetails *DatabaseConnectionDetails `mandatory:"false" json:"databaseConnectionDetails"` + + // The Oracle license model that applies to the external database. + LicenseModel DatabaseLifecycleFeatureConfigurationLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + + // The list of statuses for Database Management features. + FeatureStatus DatabaseFeatureConfigurationFeatureStatusEnum `mandatory:"true" json:"featureStatus"` +} + +// GetFeatureStatus returns FeatureStatus +func (m DatabaseLifecycleFeatureConfiguration) GetFeatureStatus() DatabaseFeatureConfigurationFeatureStatusEnum { + return m.FeatureStatus +} + +// GetConnectorDetails returns ConnectorDetails +func (m DatabaseLifecycleFeatureConfiguration) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +// GetDatabaseConnectionDetails returns DatabaseConnectionDetails +func (m DatabaseLifecycleFeatureConfiguration) GetDatabaseConnectionDetails() *DatabaseConnectionDetails { + return m.DatabaseConnectionDetails +} + +func (m DatabaseLifecycleFeatureConfiguration) 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 DatabaseLifecycleFeatureConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDatabaseLifecycleFeatureConfigurationLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetDatabaseLifecycleFeatureConfigurationLicenseModelEnumStringValues(), ","))) + } + + if _, ok := GetMappingDatabaseFeatureConfigurationFeatureStatusEnum(string(m.FeatureStatus)); !ok && m.FeatureStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FeatureStatus: %s. Supported values are: %s.", m.FeatureStatus, strings.Join(GetDatabaseFeatureConfigurationFeatureStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DatabaseLifecycleFeatureConfiguration) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDatabaseLifecycleFeatureConfiguration DatabaseLifecycleFeatureConfiguration + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeDatabaseLifecycleFeatureConfiguration + }{ + "DB_LIFECYCLE_MANAGEMENT", + (MarshalTypeDatabaseLifecycleFeatureConfiguration)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *DatabaseLifecycleFeatureConfiguration) UnmarshalJSON(data []byte) (e error) { + model := struct { + ConnectorDetails connectordetails `json:"connectorDetails"` + DatabaseConnectionDetails *DatabaseConnectionDetails `json:"databaseConnectionDetails"` + LicenseModel DatabaseLifecycleFeatureConfigurationLicenseModelEnum `json:"licenseModel"` + FeatureStatus DatabaseFeatureConfigurationFeatureStatusEnum `json:"featureStatus"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + m.DatabaseConnectionDetails = model.DatabaseConnectionDetails + + m.LicenseModel = model.LicenseModel + + m.FeatureStatus = model.FeatureStatus + + return +} + +// DatabaseLifecycleFeatureConfigurationLicenseModelEnum Enum with underlying type: string +type DatabaseLifecycleFeatureConfigurationLicenseModelEnum string + +// Set of constants representing the allowable values for DatabaseLifecycleFeatureConfigurationLicenseModelEnum +const ( + DatabaseLifecycleFeatureConfigurationLicenseModelLicenseIncluded DatabaseLifecycleFeatureConfigurationLicenseModelEnum = "LICENSE_INCLUDED" + DatabaseLifecycleFeatureConfigurationLicenseModelBringYourOwnLicense DatabaseLifecycleFeatureConfigurationLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" +) + +var mappingDatabaseLifecycleFeatureConfigurationLicenseModelEnum = map[string]DatabaseLifecycleFeatureConfigurationLicenseModelEnum{ + "LICENSE_INCLUDED": DatabaseLifecycleFeatureConfigurationLicenseModelLicenseIncluded, + "BRING_YOUR_OWN_LICENSE": DatabaseLifecycleFeatureConfigurationLicenseModelBringYourOwnLicense, +} + +var mappingDatabaseLifecycleFeatureConfigurationLicenseModelEnumLowerCase = map[string]DatabaseLifecycleFeatureConfigurationLicenseModelEnum{ + "license_included": DatabaseLifecycleFeatureConfigurationLicenseModelLicenseIncluded, + "bring_your_own_license": DatabaseLifecycleFeatureConfigurationLicenseModelBringYourOwnLicense, +} + +// GetDatabaseLifecycleFeatureConfigurationLicenseModelEnumValues Enumerates the set of values for DatabaseLifecycleFeatureConfigurationLicenseModelEnum +func GetDatabaseLifecycleFeatureConfigurationLicenseModelEnumValues() []DatabaseLifecycleFeatureConfigurationLicenseModelEnum { + values := make([]DatabaseLifecycleFeatureConfigurationLicenseModelEnum, 0) + for _, v := range mappingDatabaseLifecycleFeatureConfigurationLicenseModelEnum { + values = append(values, v) + } + return values +} + +// GetDatabaseLifecycleFeatureConfigurationLicenseModelEnumStringValues Enumerates the set of values in String for DatabaseLifecycleFeatureConfigurationLicenseModelEnum +func GetDatabaseLifecycleFeatureConfigurationLicenseModelEnumStringValues() []string { + return []string{ + "LICENSE_INCLUDED", + "BRING_YOUR_OWN_LICENSE", + } +} + +// GetMappingDatabaseLifecycleFeatureConfigurationLicenseModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDatabaseLifecycleFeatureConfigurationLicenseModelEnum(val string) (DatabaseLifecycleFeatureConfigurationLicenseModelEnum, bool) { + enum, ok := mappingDatabaseLifecycleFeatureConfigurationLicenseModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/databasemanagement/database_lifecycle_management_feature_details.go b/databasemanagement/database_lifecycle_management_feature_details.go new file mode 100644 index 0000000000..df31e973d5 --- /dev/null +++ b/databasemanagement/database_lifecycle_management_feature_details.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. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseLifecycleManagementFeatureDetails The details required to enable the Database Lifecycle Management feature. +type DatabaseLifecycleManagementFeatureDetails struct { + DatabaseConnectionDetails *DatabaseConnectionDetails `mandatory:"true" json:"databaseConnectionDetails"` + + ConnectorDetails ConnectorDetails `mandatory:"true" json:"connectorDetails"` +} + +// GetDatabaseConnectionDetails returns DatabaseConnectionDetails +func (m DatabaseLifecycleManagementFeatureDetails) GetDatabaseConnectionDetails() *DatabaseConnectionDetails { + return m.DatabaseConnectionDetails +} + +// GetConnectorDetails returns ConnectorDetails +func (m DatabaseLifecycleManagementFeatureDetails) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +func (m DatabaseLifecycleManagementFeatureDetails) 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 DatabaseLifecycleManagementFeatureDetails) 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 DatabaseLifecycleManagementFeatureDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDatabaseLifecycleManagementFeatureDetails DatabaseLifecycleManagementFeatureDetails + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeDatabaseLifecycleManagementFeatureDetails + }{ + "DB_LIFECYCLE_MANAGEMENT", + (MarshalTypeDatabaseLifecycleManagementFeatureDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *DatabaseLifecycleManagementFeatureDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DatabaseConnectionDetails *DatabaseConnectionDetails `json:"databaseConnectionDetails"` + ConnectorDetails connectordetails `json:"connectorDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DatabaseConnectionDetails = model.DatabaseConnectionDetails + + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + return +} diff --git a/databasemanagement/database_named_credential_connection_details.go b/databasemanagement/database_named_credential_connection_details.go new file mode 100644 index 0000000000..16a2f73390 --- /dev/null +++ b/databasemanagement/database_named_credential_connection_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. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseNamedCredentialConnectionDetails User provides a named credential OCID, which will be used to retrieve the password to connect to the database. +type DatabaseNamedCredentialConnectionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Named Credential + // where the database password metadata is stored. + NamedCredentialId *string `mandatory:"true" json:"namedCredentialId"` +} + +func (m DatabaseNamedCredentialConnectionDetails) 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 DatabaseNamedCredentialConnectionDetails) 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 DatabaseNamedCredentialConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDatabaseNamedCredentialConnectionDetails DatabaseNamedCredentialConnectionDetails + s := struct { + DiscriminatorParam string `json:"credentialType"` + MarshalTypeDatabaseNamedCredentialConnectionDetails + }{ + "NAMED_CREDENTIAL", + (MarshalTypeDatabaseNamedCredentialConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/databasemanagement/database_sql_watch_feature_configuration.go b/databasemanagement/database_sql_watch_feature_configuration.go new file mode 100644 index 0000000000..d7a9df582e --- /dev/null +++ b/databasemanagement/database_sql_watch_feature_configuration.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. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseSqlWatchFeatureConfiguration The details required to enable the SQL Watch feature. +type DatabaseSqlWatchFeatureConfiguration struct { + ConnectorDetails ConnectorDetails `mandatory:"false" json:"connectorDetails"` + + DatabaseConnectionDetails *DatabaseConnectionDetails `mandatory:"false" json:"databaseConnectionDetails"` + + // The list of statuses for Database Management features. + FeatureStatus DatabaseFeatureConfigurationFeatureStatusEnum `mandatory:"true" json:"featureStatus"` +} + +// GetFeatureStatus returns FeatureStatus +func (m DatabaseSqlWatchFeatureConfiguration) GetFeatureStatus() DatabaseFeatureConfigurationFeatureStatusEnum { + return m.FeatureStatus +} + +// GetConnectorDetails returns ConnectorDetails +func (m DatabaseSqlWatchFeatureConfiguration) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +// GetDatabaseConnectionDetails returns DatabaseConnectionDetails +func (m DatabaseSqlWatchFeatureConfiguration) GetDatabaseConnectionDetails() *DatabaseConnectionDetails { + return m.DatabaseConnectionDetails +} + +func (m DatabaseSqlWatchFeatureConfiguration) 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 DatabaseSqlWatchFeatureConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDatabaseFeatureConfigurationFeatureStatusEnum(string(m.FeatureStatus)); !ok && m.FeatureStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FeatureStatus: %s. Supported values are: %s.", m.FeatureStatus, strings.Join(GetDatabaseFeatureConfigurationFeatureStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DatabaseSqlWatchFeatureConfiguration) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDatabaseSqlWatchFeatureConfiguration DatabaseSqlWatchFeatureConfiguration + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeDatabaseSqlWatchFeatureConfiguration + }{ + "SQLWATCH", + (MarshalTypeDatabaseSqlWatchFeatureConfiguration)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *DatabaseSqlWatchFeatureConfiguration) UnmarshalJSON(data []byte) (e error) { + model := struct { + ConnectorDetails connectordetails `json:"connectorDetails"` + DatabaseConnectionDetails *DatabaseConnectionDetails `json:"databaseConnectionDetails"` + FeatureStatus DatabaseFeatureConfigurationFeatureStatusEnum `json:"featureStatus"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + m.DatabaseConnectionDetails = model.DatabaseConnectionDetails + + m.FeatureStatus = model.FeatureStatus + + return +} diff --git a/databasemanagement/database_sql_watch_feature_details.go b/databasemanagement/database_sql_watch_feature_details.go new file mode 100644 index 0000000000..f203955a85 --- /dev/null +++ b/databasemanagement/database_sql_watch_feature_details.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. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseSqlWatchFeatureDetails The details required to enable the SQL Watch feature. +type DatabaseSqlWatchFeatureDetails struct { + DatabaseConnectionDetails *DatabaseConnectionDetails `mandatory:"true" json:"databaseConnectionDetails"` + + ConnectorDetails ConnectorDetails `mandatory:"true" json:"connectorDetails"` +} + +// GetDatabaseConnectionDetails returns DatabaseConnectionDetails +func (m DatabaseSqlWatchFeatureDetails) GetDatabaseConnectionDetails() *DatabaseConnectionDetails { + return m.DatabaseConnectionDetails +} + +// GetConnectorDetails returns ConnectorDetails +func (m DatabaseSqlWatchFeatureDetails) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +func (m DatabaseSqlWatchFeatureDetails) 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 DatabaseSqlWatchFeatureDetails) 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 DatabaseSqlWatchFeatureDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDatabaseSqlWatchFeatureDetails DatabaseSqlWatchFeatureDetails + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeDatabaseSqlWatchFeatureDetails + }{ + "SQLWATCH", + (MarshalTypeDatabaseSqlWatchFeatureDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *DatabaseSqlWatchFeatureDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DatabaseConnectionDetails *DatabaseConnectionDetails `json:"databaseConnectionDetails"` + ConnectorDetails connectordetails `json:"connectorDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DatabaseConnectionDetails = model.DatabaseConnectionDetails + + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + return +} diff --git a/databasemanagement/db_management_feature.go b/databasemanagement/db_management_feature.go index e847fb1119..b3d3ac715d 100644 --- a/databasemanagement/db_management_feature.go +++ b/databasemanagement/db_management_feature.go @@ -21,14 +21,20 @@ type DbManagementFeatureEnum string // Set of constants representing the allowable values for DbManagementFeatureEnum const ( DbManagementFeatureDiagnosticsAndManagement DbManagementFeatureEnum = "DIAGNOSTICS_AND_MANAGEMENT" + DbManagementFeatureDbLifecycleManagement DbManagementFeatureEnum = "DB_LIFECYCLE_MANAGEMENT" + DbManagementFeatureSqlwatch DbManagementFeatureEnum = "SQLWATCH" ) var mappingDbManagementFeatureEnum = map[string]DbManagementFeatureEnum{ "DIAGNOSTICS_AND_MANAGEMENT": DbManagementFeatureDiagnosticsAndManagement, + "DB_LIFECYCLE_MANAGEMENT": DbManagementFeatureDbLifecycleManagement, + "SQLWATCH": DbManagementFeatureSqlwatch, } var mappingDbManagementFeatureEnumLowerCase = map[string]DbManagementFeatureEnum{ "diagnostics_and_management": DbManagementFeatureDiagnosticsAndManagement, + "db_lifecycle_management": DbManagementFeatureDbLifecycleManagement, + "sqlwatch": DbManagementFeatureSqlwatch, } // GetDbManagementFeatureEnumValues Enumerates the set of values for DbManagementFeatureEnum @@ -44,6 +50,8 @@ func GetDbManagementFeatureEnumValues() []DbManagementFeatureEnum { func GetDbManagementFeatureEnumStringValues() []string { return []string{ "DIAGNOSTICS_AND_MANAGEMENT", + "DB_LIFECYCLE_MANAGEMENT", + "SQLWATCH", } } diff --git a/databasemanagement/external_database_feature_details.go b/databasemanagement/external_database_feature_details.go index aa00a32b92..2f7668cd05 100644 --- a/databasemanagement/external_database_feature_details.go +++ b/databasemanagement/external_database_feature_details.go @@ -55,6 +55,14 @@ func (m *externaldatabasefeaturedetails) UnmarshalPolymorphicJSON(data []byte) ( var err error switch m.Feature { + case "DB_LIFECYCLE_MANAGEMENT": + mm := ExternalDatabaseLifecycleManagementFeatureDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SQLWATCH": + mm := ExternalDatabaseSqlWatchFeatureDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "DIAGNOSTICS_AND_MANAGEMENT": mm := ExternalDatabaseDiagnosticsAndManagementFeatureDetails{} err = json.Unmarshal(data, &mm) diff --git a/databasemanagement/external_database_lifecycle_management_feature_details.go b/databasemanagement/external_database_lifecycle_management_feature_details.go new file mode 100644 index 0000000000..64629d9979 --- /dev/null +++ b/databasemanagement/external_database_lifecycle_management_feature_details.go @@ -0,0 +1,134 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalDatabaseLifecycleManagementFeatureDetails The details required to enable the Database Lifecycle Management feature. +type ExternalDatabaseLifecycleManagementFeatureDetails struct { + ConnectorDetails ConnectorDetails `mandatory:"true" json:"connectorDetails"` + + // The Oracle license model that applies to the external database. + LicenseModel ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum `mandatory:"true" json:"licenseModel"` +} + +// GetConnectorDetails returns ConnectorDetails +func (m ExternalDatabaseLifecycleManagementFeatureDetails) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +func (m ExternalDatabaseLifecycleManagementFeatureDetails) 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 ExternalDatabaseLifecycleManagementFeatureDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ExternalDatabaseLifecycleManagementFeatureDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalDatabaseLifecycleManagementFeatureDetails ExternalDatabaseLifecycleManagementFeatureDetails + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeExternalDatabaseLifecycleManagementFeatureDetails + }{ + "DB_LIFECYCLE_MANAGEMENT", + (MarshalTypeExternalDatabaseLifecycleManagementFeatureDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *ExternalDatabaseLifecycleManagementFeatureDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + ConnectorDetails connectordetails `json:"connectorDetails"` + LicenseModel ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum `json:"licenseModel"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + m.LicenseModel = model.LicenseModel + + return +} + +// ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum Enum with underlying type: string +type ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum string + +// Set of constants representing the allowable values for ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum +const ( + ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelLicenseIncluded ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum = "LICENSE_INCLUDED" + ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelBringYourOwnLicense ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" +) + +var mappingExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum = map[string]ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum{ + "LICENSE_INCLUDED": ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelLicenseIncluded, + "BRING_YOUR_OWN_LICENSE": ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelBringYourOwnLicense, +} + +var mappingExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnumLowerCase = map[string]ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum{ + "license_included": ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelLicenseIncluded, + "bring_your_own_license": ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelBringYourOwnLicense, +} + +// GetExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnumValues Enumerates the set of values for ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum +func GetExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnumValues() []ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum { + values := make([]ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum, 0) + for _, v := range mappingExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum { + values = append(values, v) + } + return values +} + +// GetExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnumStringValues Enumerates the set of values in String for ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum +func GetExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnumStringValues() []string { + return []string{ + "LICENSE_INCLUDED", + "BRING_YOUR_OWN_LICENSE", + } +} + +// GetMappingExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum(val string) (ExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnum, bool) { + enum, ok := mappingExternalDatabaseLifecycleManagementFeatureDetailsLicenseModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/databasemanagement/external_database_sql_watch_feature_details.go b/databasemanagement/external_database_sql_watch_feature_details.go new file mode 100644 index 0000000000..8b0d4f819e --- /dev/null +++ b/databasemanagement/external_database_sql_watch_feature_details.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalDatabaseSqlWatchFeatureDetails The details required to enable the SQL Watch feature. +type ExternalDatabaseSqlWatchFeatureDetails struct { + ConnectorDetails ConnectorDetails `mandatory:"true" json:"connectorDetails"` +} + +// GetConnectorDetails returns ConnectorDetails +func (m ExternalDatabaseSqlWatchFeatureDetails) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +func (m ExternalDatabaseSqlWatchFeatureDetails) 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 ExternalDatabaseSqlWatchFeatureDetails) 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 ExternalDatabaseSqlWatchFeatureDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalDatabaseSqlWatchFeatureDetails ExternalDatabaseSqlWatchFeatureDetails + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeExternalDatabaseSqlWatchFeatureDetails + }{ + "SQLWATCH", + (MarshalTypeExternalDatabaseSqlWatchFeatureDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *ExternalDatabaseSqlWatchFeatureDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + ConnectorDetails connectordetails `json:"connectorDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + return +} diff --git a/databasemanagement/external_database_summary.go b/databasemanagement/external_database_summary.go index 7c0950dfc9..84624705b1 100644 --- a/databasemanagement/external_database_summary.go +++ b/databasemanagement/external_database_summary.go @@ -12,6 +12,7 @@ package databasemanagement import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -74,6 +75,15 @@ type ExternalDatabaseSummary struct { // 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"` + + // The list of feature configurations + DbmgmtFeatureConfigs []DatabaseFeatureConfiguration `mandatory:"false" json:"dbmgmtFeatureConfigs"` + + // The Oracle database version. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // The operating system of database. + DatabasePlatformName *string `mandatory:"false" json:"databasePlatformName"` } func (m ExternalDatabaseSummary) String() string { @@ -101,6 +111,86 @@ func (m ExternalDatabaseSummary) ValidateEnumValue() (bool, error) { return false, nil } +// UnmarshalJSON unmarshals from json +func (m *ExternalDatabaseSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + DbUniqueName *string `json:"dbUniqueName"` + DatabaseType DatabaseTypeEnum `json:"databaseType"` + DatabaseSubType DatabaseSubTypeEnum `json:"databaseSubType"` + ExternalContainerDatabaseId *string `json:"externalContainerDatabaseId"` + ExternalDbHomeId *string `json:"externalDbHomeId"` + DbSystemInfo *ExternalDbSystemBasicInfo `json:"dbSystemInfo"` + DbManagementConfig *DatabaseManagementConfig `json:"dbManagementConfig"` + InstanceDetails []ExternalDatabaseInstance `json:"instanceDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + DbmgmtFeatureConfigs []databasefeatureconfiguration `json:"dbmgmtFeatureConfigs"` + DatabaseVersion *string `json:"databaseVersion"` + DatabasePlatformName *string `json:"databasePlatformName"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + LifecycleState ExternalDatabaseSummaryLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DbUniqueName = model.DbUniqueName + + m.DatabaseType = model.DatabaseType + + m.DatabaseSubType = model.DatabaseSubType + + m.ExternalContainerDatabaseId = model.ExternalContainerDatabaseId + + m.ExternalDbHomeId = model.ExternalDbHomeId + + m.DbSystemInfo = model.DbSystemInfo + + m.DbManagementConfig = model.DbManagementConfig + + m.InstanceDetails = make([]ExternalDatabaseInstance, len(model.InstanceDetails)) + copy(m.InstanceDetails, model.InstanceDetails) + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.DbmgmtFeatureConfigs = make([]DatabaseFeatureConfiguration, len(model.DbmgmtFeatureConfigs)) + for i, n := range model.DbmgmtFeatureConfigs { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.DbmgmtFeatureConfigs[i] = nn.(DatabaseFeatureConfiguration) + } else { + m.DbmgmtFeatureConfigs[i] = nil + } + } + m.DatabaseVersion = model.DatabaseVersion + + m.DatabasePlatformName = model.DatabasePlatformName + + m.Id = model.Id + + m.DisplayName = model.DisplayName + + m.CompartmentId = model.CompartmentId + + m.LifecycleState = model.LifecycleState + + m.TimeCreated = model.TimeCreated + + return +} + // ExternalDatabaseSummaryLifecycleStateEnum Enum with underlying type: string type ExternalDatabaseSummaryLifecycleStateEnum string diff --git a/databasemanagement/external_pluggable_database_feature_details.go b/databasemanagement/external_pluggable_database_feature_details.go index 6f6c8df1bc..815e7b8dcf 100644 --- a/databasemanagement/external_pluggable_database_feature_details.go +++ b/databasemanagement/external_pluggable_database_feature_details.go @@ -59,6 +59,14 @@ func (m *externalpluggabledatabasefeaturedetails) UnmarshalPolymorphicJSON(data mm := ExternalPluggableDatabaseDiagnosticsAndManagementFeatureDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "DB_LIFECYCLE_MANAGEMENT": + mm := ExternalPluggableDatabaseLifecycleManagementFeatureDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SQLWATCH": + mm := ExternalPluggableDatabaseSqlWatchFeatureDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for ExternalPluggableDatabaseFeatureDetails: %s.", m.Feature) return *m, nil diff --git a/databasemanagement/external_pluggable_database_lifecycle_management_feature_details.go b/databasemanagement/external_pluggable_database_lifecycle_management_feature_details.go new file mode 100644 index 0000000000..000e8f3c1f --- /dev/null +++ b/databasemanagement/external_pluggable_database_lifecycle_management_feature_details.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalPluggableDatabaseLifecycleManagementFeatureDetails The details required to enable the Database Lifecycle Management feature. +type ExternalPluggableDatabaseLifecycleManagementFeatureDetails struct { + ConnectorDetails ConnectorDetails `mandatory:"true" json:"connectorDetails"` +} + +// GetConnectorDetails returns ConnectorDetails +func (m ExternalPluggableDatabaseLifecycleManagementFeatureDetails) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +func (m ExternalPluggableDatabaseLifecycleManagementFeatureDetails) 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 ExternalPluggableDatabaseLifecycleManagementFeatureDetails) 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 ExternalPluggableDatabaseLifecycleManagementFeatureDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalPluggableDatabaseLifecycleManagementFeatureDetails ExternalPluggableDatabaseLifecycleManagementFeatureDetails + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeExternalPluggableDatabaseLifecycleManagementFeatureDetails + }{ + "DB_LIFECYCLE_MANAGEMENT", + (MarshalTypeExternalPluggableDatabaseLifecycleManagementFeatureDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *ExternalPluggableDatabaseLifecycleManagementFeatureDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + ConnectorDetails connectordetails `json:"connectorDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + return +} diff --git a/databasemanagement/external_pluggable_database_sql_watch_feature_details.go b/databasemanagement/external_pluggable_database_sql_watch_feature_details.go new file mode 100644 index 0000000000..378e4854fd --- /dev/null +++ b/databasemanagement/external_pluggable_database_sql_watch_feature_details.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalPluggableDatabaseSqlWatchFeatureDetails The details required to enable the SQL watch feature. +type ExternalPluggableDatabaseSqlWatchFeatureDetails struct { + ConnectorDetails ConnectorDetails `mandatory:"true" json:"connectorDetails"` +} + +// GetConnectorDetails returns ConnectorDetails +func (m ExternalPluggableDatabaseSqlWatchFeatureDetails) GetConnectorDetails() ConnectorDetails { + return m.ConnectorDetails +} + +func (m ExternalPluggableDatabaseSqlWatchFeatureDetails) 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 ExternalPluggableDatabaseSqlWatchFeatureDetails) 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 ExternalPluggableDatabaseSqlWatchFeatureDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalPluggableDatabaseSqlWatchFeatureDetails ExternalPluggableDatabaseSqlWatchFeatureDetails + s := struct { + DiscriminatorParam string `json:"feature"` + MarshalTypeExternalPluggableDatabaseSqlWatchFeatureDetails + }{ + "SQLWATCH", + (MarshalTypeExternalPluggableDatabaseSqlWatchFeatureDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *ExternalPluggableDatabaseSqlWatchFeatureDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + ConnectorDetails connectordetails `json:"connectorDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ConnectorDetails.UnmarshalPolymorphicJSON(model.ConnectorDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConnectorDetails = nn.(ConnectorDetails) + } else { + m.ConnectorDetails = nil + } + + return +} diff --git a/databasemanagement/managed_database.go b/databasemanagement/managed_database.go index c14b1dd723..53a1d90ac4 100644 --- a/databasemanagement/managed_database.go +++ b/databasemanagement/managed_database.go @@ -12,6 +12,7 @@ package databasemanagement import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -111,6 +112,12 @@ type ManagedDatabase struct { // 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"` + + // The list of feature configurations + DbmgmtFeatureConfigs []DatabaseFeatureConfiguration `mandatory:"false" json:"dbmgmtFeatureConfigs"` + + // The operating system of database. + DatabasePlatformName *string `mandatory:"false" json:"databasePlatformName"` } func (m ManagedDatabase) String() string { @@ -146,3 +153,110 @@ func (m ManagedDatabase) ValidateEnumValue() (bool, error) { } return false, nil } + +// UnmarshalJSON unmarshals from json +func (m *ManagedDatabase) UnmarshalJSON(data []byte) (e error) { + model := struct { + DeploymentType DeploymentTypeEnum `json:"deploymentType"` + ManagementOption ManagementOptionEnum `json:"managementOption"` + WorkloadType WorkloadTypeEnum `json:"workloadType"` + ParentContainerId *string `json:"parentContainerId"` + ManagedDatabaseGroups []ParentGroup `json:"managedDatabaseGroups"` + DbSystemId *string `json:"dbSystemId"` + StorageSystemId *string `json:"storageSystemId"` + DatabaseVersion *string `json:"databaseVersion"` + DatabaseStatus DatabaseStatusEnum `json:"databaseStatus"` + ParentContainerName *string `json:"parentContainerName"` + ParentContainerCompartmentId *string `json:"parentContainerCompartmentId"` + InstanceCount *int `json:"instanceCount"` + InstanceDetails []InstanceDetails `json:"instanceDetails"` + PdbCount *int `json:"pdbCount"` + PdbStatus []PdbStatusDetails `json:"pdbStatus"` + AdditionalDetails map[string]string `json:"additionalDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + DbmgmtFeatureConfigs []databasefeatureconfiguration `json:"dbmgmtFeatureConfigs"` + DatabasePlatformName *string `json:"databasePlatformName"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + Name *string `json:"name"` + DatabaseType DatabaseTypeEnum `json:"databaseType"` + DatabaseSubType DatabaseSubTypeEnum `json:"databaseSubType"` + IsCluster *bool `json:"isCluster"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DeploymentType = model.DeploymentType + + m.ManagementOption = model.ManagementOption + + m.WorkloadType = model.WorkloadType + + m.ParentContainerId = model.ParentContainerId + + m.ManagedDatabaseGroups = make([]ParentGroup, len(model.ManagedDatabaseGroups)) + copy(m.ManagedDatabaseGroups, model.ManagedDatabaseGroups) + m.DbSystemId = model.DbSystemId + + m.StorageSystemId = model.StorageSystemId + + m.DatabaseVersion = model.DatabaseVersion + + m.DatabaseStatus = model.DatabaseStatus + + m.ParentContainerName = model.ParentContainerName + + m.ParentContainerCompartmentId = model.ParentContainerCompartmentId + + m.InstanceCount = model.InstanceCount + + m.InstanceDetails = make([]InstanceDetails, len(model.InstanceDetails)) + copy(m.InstanceDetails, model.InstanceDetails) + m.PdbCount = model.PdbCount + + m.PdbStatus = make([]PdbStatusDetails, len(model.PdbStatus)) + copy(m.PdbStatus, model.PdbStatus) + m.AdditionalDetails = model.AdditionalDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.DbmgmtFeatureConfigs = make([]DatabaseFeatureConfiguration, len(model.DbmgmtFeatureConfigs)) + for i, n := range model.DbmgmtFeatureConfigs { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.DbmgmtFeatureConfigs[i] = nn.(DatabaseFeatureConfiguration) + } else { + m.DbmgmtFeatureConfigs[i] = nil + } + } + m.DatabasePlatformName = model.DatabasePlatformName + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.Name = model.Name + + m.DatabaseType = model.DatabaseType + + m.DatabaseSubType = model.DatabaseSubType + + m.IsCluster = model.IsCluster + + m.TimeCreated = model.TimeCreated + + return +} diff --git a/databasemanagement/managed_database_summary.go b/databasemanagement/managed_database_summary.go index f6d62d6310..28e6033f19 100644 --- a/databasemanagement/managed_database_summary.go +++ b/databasemanagement/managed_database_summary.go @@ -12,6 +12,7 @@ package databasemanagement import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -80,6 +81,12 @@ type ManagedDatabaseSummary struct { // 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"` + + // The list of feature configurations + DbmgmtFeatureConfigs []DatabaseFeatureConfiguration `mandatory:"false" json:"dbmgmtFeatureConfigs"` + + // The operating system of database. + DatabasePlatformName *string `mandatory:"false" json:"databasePlatformName"` } func (m ManagedDatabaseSummary) String() string { @@ -112,3 +119,83 @@ func (m ManagedDatabaseSummary) ValidateEnumValue() (bool, error) { } return false, nil } + +// UnmarshalJSON unmarshals from json +func (m *ManagedDatabaseSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + DeploymentType DeploymentTypeEnum `json:"deploymentType"` + ManagementOption ManagementOptionEnum `json:"managementOption"` + WorkloadType WorkloadTypeEnum `json:"workloadType"` + ParentContainerId *string `json:"parentContainerId"` + DbSystemId *string `json:"dbSystemId"` + StorageSystemId *string `json:"storageSystemId"` + DatabaseVersion *string `json:"databaseVersion"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + DbmgmtFeatureConfigs []databasefeatureconfiguration `json:"dbmgmtFeatureConfigs"` + DatabasePlatformName *string `json:"databasePlatformName"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + Name *string `json:"name"` + DatabaseType DatabaseTypeEnum `json:"databaseType"` + DatabaseSubType DatabaseSubTypeEnum `json:"databaseSubType"` + IsCluster *bool `json:"isCluster"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DeploymentType = model.DeploymentType + + m.ManagementOption = model.ManagementOption + + m.WorkloadType = model.WorkloadType + + m.ParentContainerId = model.ParentContainerId + + m.DbSystemId = model.DbSystemId + + m.StorageSystemId = model.StorageSystemId + + m.DatabaseVersion = model.DatabaseVersion + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.DbmgmtFeatureConfigs = make([]DatabaseFeatureConfiguration, len(model.DbmgmtFeatureConfigs)) + for i, n := range model.DbmgmtFeatureConfigs { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.DbmgmtFeatureConfigs[i] = nn.(DatabaseFeatureConfiguration) + } else { + m.DbmgmtFeatureConfigs[i] = nil + } + } + m.DatabasePlatformName = model.DatabasePlatformName + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.Name = model.Name + + m.DatabaseType = model.DatabaseType + + m.DatabaseSubType = model.DatabaseSubType + + m.IsCluster = model.IsCluster + + m.TimeCreated = model.TimeCreated + + return +} diff --git a/disasterrecovery/autonomous_container_database_snapshot_standby_connection_string_type.go b/disasterrecovery/autonomous_container_database_snapshot_standby_connection_string_type.go new file mode 100644 index 0000000000..4ccc030e9e --- /dev/null +++ b/disasterrecovery/autonomous_container_database_snapshot_standby_connection_string_type.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "strings" +) + +// AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum Enum with underlying type: string +type AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum string + +// Set of constants representing the allowable values for AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum +const ( + AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeSnapshotService AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum = "SNAPSHOT_SERVICE" + AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypePrimaryService AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum = "PRIMARY_SERVICE" +) + +var mappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum = map[string]AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum{ + "SNAPSHOT_SERVICE": AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeSnapshotService, + "PRIMARY_SERVICE": AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypePrimaryService, +} + +var mappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumLowerCase = map[string]AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum{ + "snapshot_service": AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeSnapshotService, + "primary_service": AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypePrimaryService, +} + +// GetAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumValues Enumerates the set of values for AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum +func GetAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumValues() []AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum { + values := make([]AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum, 0) + for _, v := range mappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum { + values = append(values, v) + } + return values +} + +// GetAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumStringValues Enumerates the set of values in String for AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum +func GetAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumStringValues() []string { + return []string{ + "SNAPSHOT_SERVICE", + "PRIMARY_SERVICE", + } +} + +// GetMappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum(val string) (AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum, bool) { + enum, ok := mappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/disasterrecovery/autonomous_database_standby_type_for_dr_drills.go b/disasterrecovery/autonomous_database_standby_type_for_dr_drills.go new file mode 100644 index 0000000000..a5c9bd733b --- /dev/null +++ b/disasterrecovery/autonomous_database_standby_type_for_dr_drills.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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "strings" +) + +// AutonomousDatabaseStandbyTypeForDrDrillsEnum Enum with underlying type: string +type AutonomousDatabaseStandbyTypeForDrDrillsEnum string + +// Set of constants representing the allowable values for AutonomousDatabaseStandbyTypeForDrDrillsEnum +const ( + AutonomousDatabaseStandbyTypeForDrDrillsFullClone AutonomousDatabaseStandbyTypeForDrDrillsEnum = "FULL_CLONE" + AutonomousDatabaseStandbyTypeForDrDrillsRefreshableClone AutonomousDatabaseStandbyTypeForDrDrillsEnum = "REFRESHABLE_CLONE" + AutonomousDatabaseStandbyTypeForDrDrillsSnapshotStandby AutonomousDatabaseStandbyTypeForDrDrillsEnum = "SNAPSHOT_STANDBY" +) + +var mappingAutonomousDatabaseStandbyTypeForDrDrillsEnum = map[string]AutonomousDatabaseStandbyTypeForDrDrillsEnum{ + "FULL_CLONE": AutonomousDatabaseStandbyTypeForDrDrillsFullClone, + "REFRESHABLE_CLONE": AutonomousDatabaseStandbyTypeForDrDrillsRefreshableClone, + "SNAPSHOT_STANDBY": AutonomousDatabaseStandbyTypeForDrDrillsSnapshotStandby, +} + +var mappingAutonomousDatabaseStandbyTypeForDrDrillsEnumLowerCase = map[string]AutonomousDatabaseStandbyTypeForDrDrillsEnum{ + "full_clone": AutonomousDatabaseStandbyTypeForDrDrillsFullClone, + "refreshable_clone": AutonomousDatabaseStandbyTypeForDrDrillsRefreshableClone, + "snapshot_standby": AutonomousDatabaseStandbyTypeForDrDrillsSnapshotStandby, +} + +// GetAutonomousDatabaseStandbyTypeForDrDrillsEnumValues Enumerates the set of values for AutonomousDatabaseStandbyTypeForDrDrillsEnum +func GetAutonomousDatabaseStandbyTypeForDrDrillsEnumValues() []AutonomousDatabaseStandbyTypeForDrDrillsEnum { + values := make([]AutonomousDatabaseStandbyTypeForDrDrillsEnum, 0) + for _, v := range mappingAutonomousDatabaseStandbyTypeForDrDrillsEnum { + values = append(values, v) + } + return values +} + +// GetAutonomousDatabaseStandbyTypeForDrDrillsEnumStringValues Enumerates the set of values in String for AutonomousDatabaseStandbyTypeForDrDrillsEnum +func GetAutonomousDatabaseStandbyTypeForDrDrillsEnumStringValues() []string { + return []string{ + "FULL_CLONE", + "REFRESHABLE_CLONE", + "SNAPSHOT_STANDBY", + } +} + +// GetMappingAutonomousDatabaseStandbyTypeForDrDrillsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAutonomousDatabaseStandbyTypeForDrDrillsEnum(val string) (AutonomousDatabaseStandbyTypeForDrDrillsEnum, bool) { + enum, ok := mappingAutonomousDatabaseStandbyTypeForDrDrillsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/disasterrecovery/create_dr_protection_group_member_autonomous_container_database_details.go b/disasterrecovery/create_dr_protection_group_member_autonomous_container_database_details.go new file mode 100644 index 0000000000..93e8a70c05 --- /dev/null +++ b/disasterrecovery/create_dr_protection_group_member_autonomous_container_database_details.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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails Create properties for an Autonomous Container Database member. +type CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails struct { + + // The OCID of the member. + // Example: `ocid1.instance.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + ConnectionStringType AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum `mandatory:"false" json:"connectionStringType,omitempty"` +} + +// GetMemberId returns MemberId +func (m CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) GetMemberId() *string { + return m.MemberId +} + +func (m CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) 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 CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum(string(m.ConnectionStringType)); !ok && m.ConnectionStringType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConnectionStringType: %s. Supported values are: %s.", m.ConnectionStringType, strings.Join(GetAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeCreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails + }{ + "AUTONOMOUS_CONTAINER_DATABASE", + (MarshalTypeCreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go b/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go index 269286ed96..dba57a8414 100644 --- a/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go +++ b/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go @@ -25,6 +25,16 @@ type CreateDrProtectionGroupMemberAutonomousDatabaseDetails struct { // The OCID of the member. // Example: `ocid1.instance.oc1..uniqueID` MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the vault secret where the database SYSDBA password is stored. + // This password is required and used for performing database DR Drill operations when using full clone. + // Example: `ocid1.vaultsecret.oc1..uniqueID` + PasswordVaultSecretId *string `mandatory:"false" json:"passwordVaultSecretId"` + + // This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + AutonomousDatabaseStandbyTypeForDrDrills AutonomousDatabaseStandbyTypeForDrDrillsEnum `mandatory:"false" json:"autonomousDatabaseStandbyTypeForDrDrills,omitempty"` } // GetMemberId returns MemberId @@ -42,6 +52,9 @@ func (m CreateDrProtectionGroupMemberAutonomousDatabaseDetails) String() string func (m CreateDrProtectionGroupMemberAutonomousDatabaseDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingAutonomousDatabaseStandbyTypeForDrDrillsEnum(string(m.AutonomousDatabaseStandbyTypeForDrDrills)); !ok && m.AutonomousDatabaseStandbyTypeForDrDrills != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AutonomousDatabaseStandbyTypeForDrDrills: %s. Supported values are: %s.", m.AutonomousDatabaseStandbyTypeForDrDrills, strings.Join(GetAutonomousDatabaseStandbyTypeForDrDrillsEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/disasterrecovery/create_dr_protection_group_member_details.go b/disasterrecovery/create_dr_protection_group_member_details.go index 2e63d2ea3c..3e953e8237 100644 --- a/disasterrecovery/create_dr_protection_group_member_details.go +++ b/disasterrecovery/create_dr_protection_group_member_details.go @@ -63,6 +63,10 @@ func (m *createdrprotectiongroupmemberdetails) UnmarshalPolymorphicJSON(data []b mm := CreateDrProtectionGroupMemberComputeInstanceMovableDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AUTONOMOUS_CONTAINER_DATABASE": + mm := CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "COMPUTE_INSTANCE_NON_MOVABLE": mm := CreateDrProtectionGroupMemberComputeInstanceNonMovableDetails{} err = json.Unmarshal(data, &mm) @@ -91,6 +95,10 @@ func (m *createdrprotectiongroupmemberdetails) UnmarshalPolymorphicJSON(data []b mm := CreateDrProtectionGroupMemberFileSystemDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "OBJECT_STORAGE_BUCKET": + mm := CreateDrProtectionGroupMemberObjectStorageBucketDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "LOAD_BALANCER": mm := CreateDrProtectionGroupMemberLoadBalancerDetails{} err = json.Unmarshal(data, &mm) diff --git a/disasterrecovery/create_dr_protection_group_member_object_storage_bucket_details.go b/disasterrecovery/create_dr_protection_group_member_object_storage_bucket_details.go new file mode 100644 index 0000000000..777dcb4f31 --- /dev/null +++ b/disasterrecovery/create_dr_protection_group_member_object_storage_bucket_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrProtectionGroupMemberObjectStorageBucketDetails Create properties for a object storage bucket member. +type CreateDrProtectionGroupMemberObjectStorageBucketDetails struct { + + // The OCID of the member. + // Example: `ocid1.instance.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The namespace in object storage (Note - this is usually the tenancy name). + // Example: `myocitenancy` + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // The bucket name inside the object storage namespace. + // Example: `bucket_name` + BucketName *string `mandatory:"true" json:"bucketName"` +} + +// GetMemberId returns MemberId +func (m CreateDrProtectionGroupMemberObjectStorageBucketDetails) GetMemberId() *string { + return m.MemberId +} + +func (m CreateDrProtectionGroupMemberObjectStorageBucketDetails) 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 CreateDrProtectionGroupMemberObjectStorageBucketDetails) 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 CreateDrProtectionGroupMemberObjectStorageBucketDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDrProtectionGroupMemberObjectStorageBucketDetails CreateDrProtectionGroupMemberObjectStorageBucketDetails + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeCreateDrProtectionGroupMemberObjectStorageBucketDetails + }{ + "OBJECT_STORAGE_BUCKET", + (MarshalTypeCreateDrProtectionGroupMemberObjectStorageBucketDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/disasterrecovery/dr_plan_step_type.go b/disasterrecovery/dr_plan_step_type.go index f532d0808b..e9c90a5c01 100644 --- a/disasterrecovery/dr_plan_step_type.go +++ b/disasterrecovery/dr_plan_step_type.go @@ -21,219 +21,291 @@ type DrPlanStepTypeEnum string // Set of constants representing the allowable values for DrPlanStepTypeEnum const ( - DrPlanStepTypeComputeInstanceStopPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_STOP_PRECHECK" - DrPlanStepTypeComputeInstanceLaunchPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_LAUNCH_PRECHECK" - DrPlanStepTypeComputeInstanceTerminatePrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_TERMINATE_PRECHECK" - DrPlanStepTypeComputeInstanceRemovePrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_REMOVE_PRECHECK" - DrPlanStepTypeVolumeGroupRestoreSwitchoverPrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_SWITCHOVER_PRECHECK" - DrPlanStepTypeVolumeGroupRestoreFailoverPrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_FAILOVER_PRECHECK" - DrPlanStepTypeDatabaseSwitchoverPrecheck DrPlanStepTypeEnum = "DATABASE_SWITCHOVER_PRECHECK" - DrPlanStepTypeDatabaseFailoverPrecheck DrPlanStepTypeEnum = "DATABASE_FAILOVER_PRECHECK" - DrPlanStepTypeAutonomousDatabaseSwitchoverPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK" - DrPlanStepTypeAutonomousDatabaseFailoverPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_FAILOVER_PRECHECK" - DrPlanStepTypeUserDefinedPrecheck DrPlanStepTypeEnum = "USER_DEFINED_PRECHECK" - DrPlanStepTypeComputeInstanceLaunch DrPlanStepTypeEnum = "COMPUTE_INSTANCE_LAUNCH" - DrPlanStepTypeComputeInstanceStop DrPlanStepTypeEnum = "COMPUTE_INSTANCE_STOP" - DrPlanStepTypeComputeInstanceTerminate DrPlanStepTypeEnum = "COMPUTE_INSTANCE_TERMINATE" - DrPlanStepTypeComputeInstanceRemove DrPlanStepTypeEnum = "COMPUTE_INSTANCE_REMOVE" - DrPlanStepTypeDatabaseSwitchover DrPlanStepTypeEnum = "DATABASE_SWITCHOVER" - DrPlanStepTypeDatabaseFailover DrPlanStepTypeEnum = "DATABASE_FAILOVER" - DrPlanStepTypeAutonomousDatabaseSwitchover DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_SWITCHOVER" - DrPlanStepTypeAutonomousDatabaseFailover DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_FAILOVER" - DrPlanStepTypeVolumeGroupRestoreSwitchover DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_SWITCHOVER" - DrPlanStepTypeVolumeGroupRestoreFailover DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_FAILOVER" - DrPlanStepTypeVolumeGroupReverse DrPlanStepTypeEnum = "VOLUME_GROUP_REVERSE" - DrPlanStepTypeVolumeGroupDelete DrPlanStepTypeEnum = "VOLUME_GROUP_DELETE" - DrPlanStepTypeVolumeGroupRemove DrPlanStepTypeEnum = "VOLUME_GROUP_REMOVE" - DrPlanStepTypeVolumeGroupTerminate DrPlanStepTypeEnum = "VOLUME_GROUP_TERMINATE" - DrPlanStepTypeUserDefined DrPlanStepTypeEnum = "USER_DEFINED" - DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK" - DrPlanStepTypeVolumeGroupRemovePrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_REMOVE_PRECHECK" - DrPlanStepTypeVolumeGroupTerminatePrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_TERMINATE_PRECHECK" - DrPlanStepTypeVolumeGroupRestoreStartDrill DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_START_DRILL" - DrPlanStepTypeAutonomousDatabaseCreateClonePrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_CREATE_CLONE_PRECHECK" - DrPlanStepTypeAutonomousDatabaseDeleteClonePrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_DELETE_CLONE_PRECHECK" - DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSetPrecheck DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET_PRECHECK" - DrPlanStepTypeLoadBalancerUpdateStandbyBackendSetPrecheck DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET_PRECHECK" - DrPlanStepTypeFileSystemSwitchoverPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_SWITCHOVER_PRECHECK" - DrPlanStepTypeFileSystemFailoverPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_FAILOVER_PRECHECK" - DrPlanStepTypeFileSystemStartDrillPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_START_DRILL_PRECHECK" - DrPlanStepTypeFileSystemStopDrillPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_STOP_DRILL_PRECHECK" - DrPlanStepTypeFileSystemRemovePrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_REMOVE_PRECHECK" - DrPlanStepTypeFileSystemTerminatePrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_TERMINATE_PRECHECK" - DrPlanStepTypeFileSystemMountPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_MOUNT_PRECHECK" - DrPlanStepTypeFileSystemUnmountPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_UNMOUNT_PRECHECK" - DrPlanStepTypeComputeInstanceStartPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_START_PRECHECK" - DrPlanStepTypeComputeInstanceAttachBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES_PRECHECK" - DrPlanStepTypeComputeInstanceDetachBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES_PRECHECK" - DrPlanStepTypeComputeInstanceMountBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_MOUNT_BLOCK_VOLUMES_PRECHECK" - DrPlanStepTypeComputeInstanceUnmountBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_UNMOUNT_BLOCK_VOLUMES_PRECHECK" - DrPlanStepTypeComputeCapacityReservationStartDrillPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_RESERVATION_START_DRILL_PRECHECK" - DrPlanStepTypeComputeCapacityAvailabilityStartDrillPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_START_DRILL_PRECHECK" - DrPlanStepTypeAutonomousDatabaseCreateClone DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_CREATE_CLONE" - DrPlanStepTypeAutonomousDatabaseDeleteClone DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_DELETE_CLONE" - DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSet DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET" - DrPlanStepTypeLoadBalancerUpdateStandbyBackendSet DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET" - DrPlanStepTypeFileSystemSwitchover DrPlanStepTypeEnum = "FILE_SYSTEM_SWITCHOVER" - DrPlanStepTypeFileSystemFailover DrPlanStepTypeEnum = "FILE_SYSTEM_FAILOVER" - DrPlanStepTypeFileSystemRemove DrPlanStepTypeEnum = "FILE_SYSTEM_REMOVE" - DrPlanStepTypeFileSystemReverse DrPlanStepTypeEnum = "FILE_SYSTEM_REVERSE" - DrPlanStepTypeFileSystemTerminate DrPlanStepTypeEnum = "FILE_SYSTEM_TERMINATE" - DrPlanStepTypeFileSystemStartDrill DrPlanStepTypeEnum = "FILE_SYSTEM_START_DRILL" - DrPlanStepTypeFileSystemStopDrill DrPlanStepTypeEnum = "FILE_SYSTEM_STOP_DRILL" - DrPlanStepTypeComputeInstanceStart DrPlanStepTypeEnum = "COMPUTE_INSTANCE_START" - DrPlanStepTypeComputeInstanceAttachBlockVolumes DrPlanStepTypeEnum = "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES" - DrPlanStepTypeComputeInstanceDetachBlockVolumes DrPlanStepTypeEnum = "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES" - DrPlanStepTypeFileSystemMount DrPlanStepTypeEnum = "FILE_SYSTEM_MOUNT" - DrPlanStepTypeFileSystemUnmount DrPlanStepTypeEnum = "FILE_SYSTEM_UNMOUNT" - DrPlanStepTypeComputeCapacityReservationSwitchoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_RESERVATION_SWITCHOVER_PRECHECK" - DrPlanStepTypeComputeCapacityReservationFailoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK" - DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK" - DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK" + DrPlanStepTypeComputeInstanceStopPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_STOP_PRECHECK" + DrPlanStepTypeComputeInstanceLaunchPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_LAUNCH_PRECHECK" + DrPlanStepTypeComputeInstanceTerminatePrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_TERMINATE_PRECHECK" + DrPlanStepTypeComputeInstanceRemovePrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_REMOVE_PRECHECK" + DrPlanStepTypeVolumeGroupRestoreSwitchoverPrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_SWITCHOVER_PRECHECK" + DrPlanStepTypeVolumeGroupRestoreFailoverPrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_FAILOVER_PRECHECK" + DrPlanStepTypeDatabaseSwitchoverPrecheck DrPlanStepTypeEnum = "DATABASE_SWITCHOVER_PRECHECK" + DrPlanStepTypeDatabaseFailoverPrecheck DrPlanStepTypeEnum = "DATABASE_FAILOVER_PRECHECK" + DrPlanStepTypeAutonomousDatabaseSwitchoverPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK" + DrPlanStepTypeAutonomousDatabaseFailoverPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_FAILOVER_PRECHECK" + DrPlanStepTypeAutonomousContainerDatabaseSwitchoverPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER_PRECHECK" + DrPlanStepTypeAutonomousContainerDatabaseFailoverPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_FAILOVER_PRECHECK" + DrPlanStepTypeAutonomousContainerDatabaseStartDrillConvertToSnapshotStandbyPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK" + DrPlanStepTypeAutonomousContainerDatabaseStopDrillConvertToPhysicalStandbyPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK" + DrPlanStepTypeAutonomousContainerDatabaseSwitchover DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER" + DrPlanStepTypeAutonomousContainerDatabaseFailover DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_FAILOVER" + DrPlanStepTypeAutonomousContainerDatabaseStartDrillConvertToSnapshotStandby DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY" + DrPlanStepTypeAutonomousContainerDatabaseStopDrillConvertToPhysicalStandby DrPlanStepTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY" + DrPlanStepTypeAutonomousDatabaseStartDrillCreateCloneStandbyPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY_PRECHECK" + DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandbyPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY_PRECHECK" + DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandbyPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK" + DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandbyPrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK" + DrPlanStepTypeAutonomousDatabaseStartDrillCreateCloneStandby DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY" + DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandby DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY" + DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandby DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY" + DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandby DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY" + DrPlanStepTypeUserDefinedPrecheck DrPlanStepTypeEnum = "USER_DEFINED_PRECHECK" + DrPlanStepTypeComputeInstanceLaunch DrPlanStepTypeEnum = "COMPUTE_INSTANCE_LAUNCH" + DrPlanStepTypeComputeInstanceStop DrPlanStepTypeEnum = "COMPUTE_INSTANCE_STOP" + DrPlanStepTypeComputeInstanceTerminate DrPlanStepTypeEnum = "COMPUTE_INSTANCE_TERMINATE" + DrPlanStepTypeComputeInstanceRemove DrPlanStepTypeEnum = "COMPUTE_INSTANCE_REMOVE" + DrPlanStepTypeDatabaseSwitchover DrPlanStepTypeEnum = "DATABASE_SWITCHOVER" + DrPlanStepTypeDatabaseFailover DrPlanStepTypeEnum = "DATABASE_FAILOVER" + DrPlanStepTypeAutonomousDatabaseSwitchover DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_SWITCHOVER" + DrPlanStepTypeAutonomousDatabaseFailover DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_FAILOVER" + DrPlanStepTypeVolumeGroupRestoreSwitchover DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_SWITCHOVER" + DrPlanStepTypeVolumeGroupRestoreFailover DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_FAILOVER" + DrPlanStepTypeVolumeGroupReverse DrPlanStepTypeEnum = "VOLUME_GROUP_REVERSE" + DrPlanStepTypeVolumeGroupDelete DrPlanStepTypeEnum = "VOLUME_GROUP_DELETE" + DrPlanStepTypeVolumeGroupRemove DrPlanStepTypeEnum = "VOLUME_GROUP_REMOVE" + DrPlanStepTypeVolumeGroupTerminate DrPlanStepTypeEnum = "VOLUME_GROUP_TERMINATE" + DrPlanStepTypeUserDefined DrPlanStepTypeEnum = "USER_DEFINED" + DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK" + DrPlanStepTypeVolumeGroupRemovePrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_REMOVE_PRECHECK" + DrPlanStepTypeVolumeGroupTerminatePrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_TERMINATE_PRECHECK" + DrPlanStepTypeVolumeGroupRestoreStartDrill DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_START_DRILL" + DrPlanStepTypeAutonomousDatabaseCreateClonePrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_CREATE_CLONE_PRECHECK" + DrPlanStepTypeAutonomousDatabaseDeleteClonePrecheck DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_DELETE_CLONE_PRECHECK" + DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSetPrecheck DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET_PRECHECK" + DrPlanStepTypeLoadBalancerUpdateStandbyBackendSetPrecheck DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET_PRECHECK" + DrPlanStepTypeFileSystemSwitchoverPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_SWITCHOVER_PRECHECK" + DrPlanStepTypeFileSystemFailoverPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_FAILOVER_PRECHECK" + DrPlanStepTypeFileSystemStartDrillPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_START_DRILL_PRECHECK" + DrPlanStepTypeFileSystemStopDrillPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_STOP_DRILL_PRECHECK" + DrPlanStepTypeFileSystemRemovePrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_REMOVE_PRECHECK" + DrPlanStepTypeFileSystemTerminatePrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_TERMINATE_PRECHECK" + DrPlanStepTypeFileSystemMountPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_MOUNT_PRECHECK" + DrPlanStepTypeFileSystemUnmountPrecheck DrPlanStepTypeEnum = "FILE_SYSTEM_UNMOUNT_PRECHECK" + DrPlanStepTypeComputeInstanceStartPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_START_PRECHECK" + DrPlanStepTypeComputeInstanceAttachBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES_PRECHECK" + DrPlanStepTypeComputeInstanceDetachBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES_PRECHECK" + DrPlanStepTypeComputeInstanceMountBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_MOUNT_BLOCK_VOLUMES_PRECHECK" + DrPlanStepTypeComputeInstanceUnmountBlockVolumesPrecheck DrPlanStepTypeEnum = "COMPUTE_INSTANCE_UNMOUNT_BLOCK_VOLUMES_PRECHECK" + DrPlanStepTypeComputeCapacityReservationStartDrillPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_RESERVATION_START_DRILL_PRECHECK" + DrPlanStepTypeComputeCapacityAvailabilityStartDrillPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_START_DRILL_PRECHECK" + DrPlanStepTypeAutonomousDatabaseCreateClone DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_CREATE_CLONE" + DrPlanStepTypeAutonomousDatabaseDeleteClone DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_DELETE_CLONE" + DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSet DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET" + DrPlanStepTypeLoadBalancerUpdateStandbyBackendSet DrPlanStepTypeEnum = "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET" + DrPlanStepTypeFileSystemSwitchover DrPlanStepTypeEnum = "FILE_SYSTEM_SWITCHOVER" + DrPlanStepTypeFileSystemFailover DrPlanStepTypeEnum = "FILE_SYSTEM_FAILOVER" + DrPlanStepTypeFileSystemRemove DrPlanStepTypeEnum = "FILE_SYSTEM_REMOVE" + DrPlanStepTypeFileSystemReverse DrPlanStepTypeEnum = "FILE_SYSTEM_REVERSE" + DrPlanStepTypeFileSystemTerminate DrPlanStepTypeEnum = "FILE_SYSTEM_TERMINATE" + DrPlanStepTypeFileSystemStartDrill DrPlanStepTypeEnum = "FILE_SYSTEM_START_DRILL" + DrPlanStepTypeFileSystemStopDrill DrPlanStepTypeEnum = "FILE_SYSTEM_STOP_DRILL" + DrPlanStepTypeComputeInstanceStart DrPlanStepTypeEnum = "COMPUTE_INSTANCE_START" + DrPlanStepTypeComputeInstanceAttachBlockVolumes DrPlanStepTypeEnum = "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES" + DrPlanStepTypeComputeInstanceDetachBlockVolumes DrPlanStepTypeEnum = "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES" + DrPlanStepTypeFileSystemMount DrPlanStepTypeEnum = "FILE_SYSTEM_MOUNT" + DrPlanStepTypeFileSystemUnmount DrPlanStepTypeEnum = "FILE_SYSTEM_UNMOUNT" + DrPlanStepTypeComputeCapacityReservationSwitchoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_RESERVATION_SWITCHOVER_PRECHECK" + DrPlanStepTypeComputeCapacityReservationFailoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK" + DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK" + DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK" + DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimaryPrecheck DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK" + DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandbyPrecheck DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK" + DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandbyPrecheck DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK" + DrPlanStepTypeObjectStorageBucketFailoverSetupReverseReplicationStandbyPrecheck DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK" + DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimary DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY" + DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandby DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY" + DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandby DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY" + DrPlanStepTypeObjectStorageBucketFailoverSetupReverseReplicationStandby DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY" ) var mappingDrPlanStepTypeEnum = map[string]DrPlanStepTypeEnum{ - "COMPUTE_INSTANCE_STOP_PRECHECK": DrPlanStepTypeComputeInstanceStopPrecheck, - "COMPUTE_INSTANCE_LAUNCH_PRECHECK": DrPlanStepTypeComputeInstanceLaunchPrecheck, - "COMPUTE_INSTANCE_TERMINATE_PRECHECK": DrPlanStepTypeComputeInstanceTerminatePrecheck, - "COMPUTE_INSTANCE_REMOVE_PRECHECK": DrPlanStepTypeComputeInstanceRemovePrecheck, - "VOLUME_GROUP_RESTORE_SWITCHOVER_PRECHECK": DrPlanStepTypeVolumeGroupRestoreSwitchoverPrecheck, - "VOLUME_GROUP_RESTORE_FAILOVER_PRECHECK": DrPlanStepTypeVolumeGroupRestoreFailoverPrecheck, - "DATABASE_SWITCHOVER_PRECHECK": DrPlanStepTypeDatabaseSwitchoverPrecheck, - "DATABASE_FAILOVER_PRECHECK": DrPlanStepTypeDatabaseFailoverPrecheck, - "AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK": DrPlanStepTypeAutonomousDatabaseSwitchoverPrecheck, - "AUTONOMOUS_DATABASE_FAILOVER_PRECHECK": DrPlanStepTypeAutonomousDatabaseFailoverPrecheck, - "USER_DEFINED_PRECHECK": DrPlanStepTypeUserDefinedPrecheck, - "COMPUTE_INSTANCE_LAUNCH": DrPlanStepTypeComputeInstanceLaunch, - "COMPUTE_INSTANCE_STOP": DrPlanStepTypeComputeInstanceStop, - "COMPUTE_INSTANCE_TERMINATE": DrPlanStepTypeComputeInstanceTerminate, - "COMPUTE_INSTANCE_REMOVE": DrPlanStepTypeComputeInstanceRemove, - "DATABASE_SWITCHOVER": DrPlanStepTypeDatabaseSwitchover, - "DATABASE_FAILOVER": DrPlanStepTypeDatabaseFailover, - "AUTONOMOUS_DATABASE_SWITCHOVER": DrPlanStepTypeAutonomousDatabaseSwitchover, - "AUTONOMOUS_DATABASE_FAILOVER": DrPlanStepTypeAutonomousDatabaseFailover, - "VOLUME_GROUP_RESTORE_SWITCHOVER": DrPlanStepTypeVolumeGroupRestoreSwitchover, - "VOLUME_GROUP_RESTORE_FAILOVER": DrPlanStepTypeVolumeGroupRestoreFailover, - "VOLUME_GROUP_REVERSE": DrPlanStepTypeVolumeGroupReverse, - "VOLUME_GROUP_DELETE": DrPlanStepTypeVolumeGroupDelete, - "VOLUME_GROUP_REMOVE": DrPlanStepTypeVolumeGroupRemove, - "VOLUME_GROUP_TERMINATE": DrPlanStepTypeVolumeGroupTerminate, - "USER_DEFINED": DrPlanStepTypeUserDefined, - "VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK": DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck, - "VOLUME_GROUP_REMOVE_PRECHECK": DrPlanStepTypeVolumeGroupRemovePrecheck, - "VOLUME_GROUP_TERMINATE_PRECHECK": DrPlanStepTypeVolumeGroupTerminatePrecheck, - "VOLUME_GROUP_RESTORE_START_DRILL": DrPlanStepTypeVolumeGroupRestoreStartDrill, - "AUTONOMOUS_DATABASE_CREATE_CLONE_PRECHECK": DrPlanStepTypeAutonomousDatabaseCreateClonePrecheck, - "AUTONOMOUS_DATABASE_DELETE_CLONE_PRECHECK": DrPlanStepTypeAutonomousDatabaseDeleteClonePrecheck, - "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET_PRECHECK": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSetPrecheck, - "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET_PRECHECK": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSetPrecheck, - "FILE_SYSTEM_SWITCHOVER_PRECHECK": DrPlanStepTypeFileSystemSwitchoverPrecheck, - "FILE_SYSTEM_FAILOVER_PRECHECK": DrPlanStepTypeFileSystemFailoverPrecheck, - "FILE_SYSTEM_START_DRILL_PRECHECK": DrPlanStepTypeFileSystemStartDrillPrecheck, - "FILE_SYSTEM_STOP_DRILL_PRECHECK": DrPlanStepTypeFileSystemStopDrillPrecheck, - "FILE_SYSTEM_REMOVE_PRECHECK": DrPlanStepTypeFileSystemRemovePrecheck, - "FILE_SYSTEM_TERMINATE_PRECHECK": DrPlanStepTypeFileSystemTerminatePrecheck, - "FILE_SYSTEM_MOUNT_PRECHECK": DrPlanStepTypeFileSystemMountPrecheck, - "FILE_SYSTEM_UNMOUNT_PRECHECK": DrPlanStepTypeFileSystemUnmountPrecheck, - "COMPUTE_INSTANCE_START_PRECHECK": DrPlanStepTypeComputeInstanceStartPrecheck, - "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceAttachBlockVolumesPrecheck, - "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceDetachBlockVolumesPrecheck, - "COMPUTE_INSTANCE_MOUNT_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceMountBlockVolumesPrecheck, - "COMPUTE_INSTANCE_UNMOUNT_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceUnmountBlockVolumesPrecheck, - "COMPUTE_CAPACITY_RESERVATION_START_DRILL_PRECHECK": DrPlanStepTypeComputeCapacityReservationStartDrillPrecheck, - "COMPUTE_CAPACITY_AVAILABILITY_START_DRILL_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilityStartDrillPrecheck, - "AUTONOMOUS_DATABASE_CREATE_CLONE": DrPlanStepTypeAutonomousDatabaseCreateClone, - "AUTONOMOUS_DATABASE_DELETE_CLONE": DrPlanStepTypeAutonomousDatabaseDeleteClone, - "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSet, - "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSet, - "FILE_SYSTEM_SWITCHOVER": DrPlanStepTypeFileSystemSwitchover, - "FILE_SYSTEM_FAILOVER": DrPlanStepTypeFileSystemFailover, - "FILE_SYSTEM_REMOVE": DrPlanStepTypeFileSystemRemove, - "FILE_SYSTEM_REVERSE": DrPlanStepTypeFileSystemReverse, - "FILE_SYSTEM_TERMINATE": DrPlanStepTypeFileSystemTerminate, - "FILE_SYSTEM_START_DRILL": DrPlanStepTypeFileSystemStartDrill, - "FILE_SYSTEM_STOP_DRILL": DrPlanStepTypeFileSystemStopDrill, - "COMPUTE_INSTANCE_START": DrPlanStepTypeComputeInstanceStart, - "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES": DrPlanStepTypeComputeInstanceAttachBlockVolumes, - "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES": DrPlanStepTypeComputeInstanceDetachBlockVolumes, - "FILE_SYSTEM_MOUNT": DrPlanStepTypeFileSystemMount, - "FILE_SYSTEM_UNMOUNT": DrPlanStepTypeFileSystemUnmount, - "COMPUTE_CAPACITY_RESERVATION_SWITCHOVER_PRECHECK": DrPlanStepTypeComputeCapacityReservationSwitchoverPrecheck, - "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK": DrPlanStepTypeComputeCapacityReservationFailoverPrecheck, - "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck, - "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck, + "COMPUTE_INSTANCE_STOP_PRECHECK": DrPlanStepTypeComputeInstanceStopPrecheck, + "COMPUTE_INSTANCE_LAUNCH_PRECHECK": DrPlanStepTypeComputeInstanceLaunchPrecheck, + "COMPUTE_INSTANCE_TERMINATE_PRECHECK": DrPlanStepTypeComputeInstanceTerminatePrecheck, + "COMPUTE_INSTANCE_REMOVE_PRECHECK": DrPlanStepTypeComputeInstanceRemovePrecheck, + "VOLUME_GROUP_RESTORE_SWITCHOVER_PRECHECK": DrPlanStepTypeVolumeGroupRestoreSwitchoverPrecheck, + "VOLUME_GROUP_RESTORE_FAILOVER_PRECHECK": DrPlanStepTypeVolumeGroupRestoreFailoverPrecheck, + "DATABASE_SWITCHOVER_PRECHECK": DrPlanStepTypeDatabaseSwitchoverPrecheck, + "DATABASE_FAILOVER_PRECHECK": DrPlanStepTypeDatabaseFailoverPrecheck, + "AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK": DrPlanStepTypeAutonomousDatabaseSwitchoverPrecheck, + "AUTONOMOUS_DATABASE_FAILOVER_PRECHECK": DrPlanStepTypeAutonomousDatabaseFailoverPrecheck, + "AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER_PRECHECK": DrPlanStepTypeAutonomousContainerDatabaseSwitchoverPrecheck, + "AUTONOMOUS_CONTAINER_DATABASE_FAILOVER_PRECHECK": DrPlanStepTypeAutonomousContainerDatabaseFailoverPrecheck, + "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK": DrPlanStepTypeAutonomousContainerDatabaseStartDrillConvertToSnapshotStandbyPrecheck, + "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK": DrPlanStepTypeAutonomousContainerDatabaseStopDrillConvertToPhysicalStandbyPrecheck, + "AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER": DrPlanStepTypeAutonomousContainerDatabaseSwitchover, + "AUTONOMOUS_CONTAINER_DATABASE_FAILOVER": DrPlanStepTypeAutonomousContainerDatabaseFailover, + "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY": DrPlanStepTypeAutonomousContainerDatabaseStartDrillConvertToSnapshotStandby, + "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY": DrPlanStepTypeAutonomousContainerDatabaseStopDrillConvertToPhysicalStandby, + "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY_PRECHECK": DrPlanStepTypeAutonomousDatabaseStartDrillCreateCloneStandbyPrecheck, + "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY_PRECHECK": DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandbyPrecheck, + "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK": DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandbyPrecheck, + "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK": DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandbyPrecheck, + "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY": DrPlanStepTypeAutonomousDatabaseStartDrillCreateCloneStandby, + "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY": DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandby, + "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY": DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandby, + "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY": DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandby, + "USER_DEFINED_PRECHECK": DrPlanStepTypeUserDefinedPrecheck, + "COMPUTE_INSTANCE_LAUNCH": DrPlanStepTypeComputeInstanceLaunch, + "COMPUTE_INSTANCE_STOP": DrPlanStepTypeComputeInstanceStop, + "COMPUTE_INSTANCE_TERMINATE": DrPlanStepTypeComputeInstanceTerminate, + "COMPUTE_INSTANCE_REMOVE": DrPlanStepTypeComputeInstanceRemove, + "DATABASE_SWITCHOVER": DrPlanStepTypeDatabaseSwitchover, + "DATABASE_FAILOVER": DrPlanStepTypeDatabaseFailover, + "AUTONOMOUS_DATABASE_SWITCHOVER": DrPlanStepTypeAutonomousDatabaseSwitchover, + "AUTONOMOUS_DATABASE_FAILOVER": DrPlanStepTypeAutonomousDatabaseFailover, + "VOLUME_GROUP_RESTORE_SWITCHOVER": DrPlanStepTypeVolumeGroupRestoreSwitchover, + "VOLUME_GROUP_RESTORE_FAILOVER": DrPlanStepTypeVolumeGroupRestoreFailover, + "VOLUME_GROUP_REVERSE": DrPlanStepTypeVolumeGroupReverse, + "VOLUME_GROUP_DELETE": DrPlanStepTypeVolumeGroupDelete, + "VOLUME_GROUP_REMOVE": DrPlanStepTypeVolumeGroupRemove, + "VOLUME_GROUP_TERMINATE": DrPlanStepTypeVolumeGroupTerminate, + "USER_DEFINED": DrPlanStepTypeUserDefined, + "VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK": DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck, + "VOLUME_GROUP_REMOVE_PRECHECK": DrPlanStepTypeVolumeGroupRemovePrecheck, + "VOLUME_GROUP_TERMINATE_PRECHECK": DrPlanStepTypeVolumeGroupTerminatePrecheck, + "VOLUME_GROUP_RESTORE_START_DRILL": DrPlanStepTypeVolumeGroupRestoreStartDrill, + "AUTONOMOUS_DATABASE_CREATE_CLONE_PRECHECK": DrPlanStepTypeAutonomousDatabaseCreateClonePrecheck, + "AUTONOMOUS_DATABASE_DELETE_CLONE_PRECHECK": DrPlanStepTypeAutonomousDatabaseDeleteClonePrecheck, + "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET_PRECHECK": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSetPrecheck, + "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET_PRECHECK": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSetPrecheck, + "FILE_SYSTEM_SWITCHOVER_PRECHECK": DrPlanStepTypeFileSystemSwitchoverPrecheck, + "FILE_SYSTEM_FAILOVER_PRECHECK": DrPlanStepTypeFileSystemFailoverPrecheck, + "FILE_SYSTEM_START_DRILL_PRECHECK": DrPlanStepTypeFileSystemStartDrillPrecheck, + "FILE_SYSTEM_STOP_DRILL_PRECHECK": DrPlanStepTypeFileSystemStopDrillPrecheck, + "FILE_SYSTEM_REMOVE_PRECHECK": DrPlanStepTypeFileSystemRemovePrecheck, + "FILE_SYSTEM_TERMINATE_PRECHECK": DrPlanStepTypeFileSystemTerminatePrecheck, + "FILE_SYSTEM_MOUNT_PRECHECK": DrPlanStepTypeFileSystemMountPrecheck, + "FILE_SYSTEM_UNMOUNT_PRECHECK": DrPlanStepTypeFileSystemUnmountPrecheck, + "COMPUTE_INSTANCE_START_PRECHECK": DrPlanStepTypeComputeInstanceStartPrecheck, + "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceAttachBlockVolumesPrecheck, + "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceDetachBlockVolumesPrecheck, + "COMPUTE_INSTANCE_MOUNT_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceMountBlockVolumesPrecheck, + "COMPUTE_INSTANCE_UNMOUNT_BLOCK_VOLUMES_PRECHECK": DrPlanStepTypeComputeInstanceUnmountBlockVolumesPrecheck, + "COMPUTE_CAPACITY_RESERVATION_START_DRILL_PRECHECK": DrPlanStepTypeComputeCapacityReservationStartDrillPrecheck, + "COMPUTE_CAPACITY_AVAILABILITY_START_DRILL_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilityStartDrillPrecheck, + "AUTONOMOUS_DATABASE_CREATE_CLONE": DrPlanStepTypeAutonomousDatabaseCreateClone, + "AUTONOMOUS_DATABASE_DELETE_CLONE": DrPlanStepTypeAutonomousDatabaseDeleteClone, + "LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSet, + "LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSet, + "FILE_SYSTEM_SWITCHOVER": DrPlanStepTypeFileSystemSwitchover, + "FILE_SYSTEM_FAILOVER": DrPlanStepTypeFileSystemFailover, + "FILE_SYSTEM_REMOVE": DrPlanStepTypeFileSystemRemove, + "FILE_SYSTEM_REVERSE": DrPlanStepTypeFileSystemReverse, + "FILE_SYSTEM_TERMINATE": DrPlanStepTypeFileSystemTerminate, + "FILE_SYSTEM_START_DRILL": DrPlanStepTypeFileSystemStartDrill, + "FILE_SYSTEM_STOP_DRILL": DrPlanStepTypeFileSystemStopDrill, + "COMPUTE_INSTANCE_START": DrPlanStepTypeComputeInstanceStart, + "COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES": DrPlanStepTypeComputeInstanceAttachBlockVolumes, + "COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES": DrPlanStepTypeComputeInstanceDetachBlockVolumes, + "FILE_SYSTEM_MOUNT": DrPlanStepTypeFileSystemMount, + "FILE_SYSTEM_UNMOUNT": DrPlanStepTypeFileSystemUnmount, + "COMPUTE_CAPACITY_RESERVATION_SWITCHOVER_PRECHECK": DrPlanStepTypeComputeCapacityReservationSwitchoverPrecheck, + "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK": DrPlanStepTypeComputeCapacityReservationFailoverPrecheck, + "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck, + "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck, + "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK": DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimaryPrecheck, + "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK": DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandbyPrecheck, + "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK": DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandbyPrecheck, + "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK": DrPlanStepTypeObjectStorageBucketFailoverSetupReverseReplicationStandbyPrecheck, + "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY": DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimary, + "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY": DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandby, + "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY": DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandby, + "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY": DrPlanStepTypeObjectStorageBucketFailoverSetupReverseReplicationStandby, } var mappingDrPlanStepTypeEnumLowerCase = map[string]DrPlanStepTypeEnum{ - "compute_instance_stop_precheck": DrPlanStepTypeComputeInstanceStopPrecheck, - "compute_instance_launch_precheck": DrPlanStepTypeComputeInstanceLaunchPrecheck, - "compute_instance_terminate_precheck": DrPlanStepTypeComputeInstanceTerminatePrecheck, - "compute_instance_remove_precheck": DrPlanStepTypeComputeInstanceRemovePrecheck, - "volume_group_restore_switchover_precheck": DrPlanStepTypeVolumeGroupRestoreSwitchoverPrecheck, - "volume_group_restore_failover_precheck": DrPlanStepTypeVolumeGroupRestoreFailoverPrecheck, - "database_switchover_precheck": DrPlanStepTypeDatabaseSwitchoverPrecheck, - "database_failover_precheck": DrPlanStepTypeDatabaseFailoverPrecheck, - "autonomous_database_switchover_precheck": DrPlanStepTypeAutonomousDatabaseSwitchoverPrecheck, - "autonomous_database_failover_precheck": DrPlanStepTypeAutonomousDatabaseFailoverPrecheck, - "user_defined_precheck": DrPlanStepTypeUserDefinedPrecheck, - "compute_instance_launch": DrPlanStepTypeComputeInstanceLaunch, - "compute_instance_stop": DrPlanStepTypeComputeInstanceStop, - "compute_instance_terminate": DrPlanStepTypeComputeInstanceTerminate, - "compute_instance_remove": DrPlanStepTypeComputeInstanceRemove, - "database_switchover": DrPlanStepTypeDatabaseSwitchover, - "database_failover": DrPlanStepTypeDatabaseFailover, - "autonomous_database_switchover": DrPlanStepTypeAutonomousDatabaseSwitchover, - "autonomous_database_failover": DrPlanStepTypeAutonomousDatabaseFailover, - "volume_group_restore_switchover": DrPlanStepTypeVolumeGroupRestoreSwitchover, - "volume_group_restore_failover": DrPlanStepTypeVolumeGroupRestoreFailover, - "volume_group_reverse": DrPlanStepTypeVolumeGroupReverse, - "volume_group_delete": DrPlanStepTypeVolumeGroupDelete, - "volume_group_remove": DrPlanStepTypeVolumeGroupRemove, - "volume_group_terminate": DrPlanStepTypeVolumeGroupTerminate, - "user_defined": DrPlanStepTypeUserDefined, - "volume_group_restore_start_drill_precheck": DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck, - "volume_group_remove_precheck": DrPlanStepTypeVolumeGroupRemovePrecheck, - "volume_group_terminate_precheck": DrPlanStepTypeVolumeGroupTerminatePrecheck, - "volume_group_restore_start_drill": DrPlanStepTypeVolumeGroupRestoreStartDrill, - "autonomous_database_create_clone_precheck": DrPlanStepTypeAutonomousDatabaseCreateClonePrecheck, - "autonomous_database_delete_clone_precheck": DrPlanStepTypeAutonomousDatabaseDeleteClonePrecheck, - "load_balancer_update_primary_backend_set_precheck": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSetPrecheck, - "load_balancer_update_standby_backend_set_precheck": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSetPrecheck, - "file_system_switchover_precheck": DrPlanStepTypeFileSystemSwitchoverPrecheck, - "file_system_failover_precheck": DrPlanStepTypeFileSystemFailoverPrecheck, - "file_system_start_drill_precheck": DrPlanStepTypeFileSystemStartDrillPrecheck, - "file_system_stop_drill_precheck": DrPlanStepTypeFileSystemStopDrillPrecheck, - "file_system_remove_precheck": DrPlanStepTypeFileSystemRemovePrecheck, - "file_system_terminate_precheck": DrPlanStepTypeFileSystemTerminatePrecheck, - "file_system_mount_precheck": DrPlanStepTypeFileSystemMountPrecheck, - "file_system_unmount_precheck": DrPlanStepTypeFileSystemUnmountPrecheck, - "compute_instance_start_precheck": DrPlanStepTypeComputeInstanceStartPrecheck, - "compute_instance_attach_block_volumes_precheck": DrPlanStepTypeComputeInstanceAttachBlockVolumesPrecheck, - "compute_instance_detach_block_volumes_precheck": DrPlanStepTypeComputeInstanceDetachBlockVolumesPrecheck, - "compute_instance_mount_block_volumes_precheck": DrPlanStepTypeComputeInstanceMountBlockVolumesPrecheck, - "compute_instance_unmount_block_volumes_precheck": DrPlanStepTypeComputeInstanceUnmountBlockVolumesPrecheck, - "compute_capacity_reservation_start_drill_precheck": DrPlanStepTypeComputeCapacityReservationStartDrillPrecheck, - "compute_capacity_availability_start_drill_precheck": DrPlanStepTypeComputeCapacityAvailabilityStartDrillPrecheck, - "autonomous_database_create_clone": DrPlanStepTypeAutonomousDatabaseCreateClone, - "autonomous_database_delete_clone": DrPlanStepTypeAutonomousDatabaseDeleteClone, - "load_balancer_update_primary_backend_set": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSet, - "load_balancer_update_standby_backend_set": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSet, - "file_system_switchover": DrPlanStepTypeFileSystemSwitchover, - "file_system_failover": DrPlanStepTypeFileSystemFailover, - "file_system_remove": DrPlanStepTypeFileSystemRemove, - "file_system_reverse": DrPlanStepTypeFileSystemReverse, - "file_system_terminate": DrPlanStepTypeFileSystemTerminate, - "file_system_start_drill": DrPlanStepTypeFileSystemStartDrill, - "file_system_stop_drill": DrPlanStepTypeFileSystemStopDrill, - "compute_instance_start": DrPlanStepTypeComputeInstanceStart, - "compute_instance_attach_block_volumes": DrPlanStepTypeComputeInstanceAttachBlockVolumes, - "compute_instance_detach_block_volumes": DrPlanStepTypeComputeInstanceDetachBlockVolumes, - "file_system_mount": DrPlanStepTypeFileSystemMount, - "file_system_unmount": DrPlanStepTypeFileSystemUnmount, - "compute_capacity_reservation_switchover_precheck": DrPlanStepTypeComputeCapacityReservationSwitchoverPrecheck, - "compute_capacity_reservation_failover_precheck": DrPlanStepTypeComputeCapacityReservationFailoverPrecheck, - "compute_capacity_availability_switchover_precheck": DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck, - "compute_capacity_availability_failover_precheck": DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck, + "compute_instance_stop_precheck": DrPlanStepTypeComputeInstanceStopPrecheck, + "compute_instance_launch_precheck": DrPlanStepTypeComputeInstanceLaunchPrecheck, + "compute_instance_terminate_precheck": DrPlanStepTypeComputeInstanceTerminatePrecheck, + "compute_instance_remove_precheck": DrPlanStepTypeComputeInstanceRemovePrecheck, + "volume_group_restore_switchover_precheck": DrPlanStepTypeVolumeGroupRestoreSwitchoverPrecheck, + "volume_group_restore_failover_precheck": DrPlanStepTypeVolumeGroupRestoreFailoverPrecheck, + "database_switchover_precheck": DrPlanStepTypeDatabaseSwitchoverPrecheck, + "database_failover_precheck": DrPlanStepTypeDatabaseFailoverPrecheck, + "autonomous_database_switchover_precheck": DrPlanStepTypeAutonomousDatabaseSwitchoverPrecheck, + "autonomous_database_failover_precheck": DrPlanStepTypeAutonomousDatabaseFailoverPrecheck, + "autonomous_container_database_switchover_precheck": DrPlanStepTypeAutonomousContainerDatabaseSwitchoverPrecheck, + "autonomous_container_database_failover_precheck": DrPlanStepTypeAutonomousContainerDatabaseFailoverPrecheck, + "autonomous_container_database_start_drill_convert_to_snapshot_standby_precheck": DrPlanStepTypeAutonomousContainerDatabaseStartDrillConvertToSnapshotStandbyPrecheck, + "autonomous_container_database_stop_drill_convert_to_physical_standby_precheck": DrPlanStepTypeAutonomousContainerDatabaseStopDrillConvertToPhysicalStandbyPrecheck, + "autonomous_container_database_switchover": DrPlanStepTypeAutonomousContainerDatabaseSwitchover, + "autonomous_container_database_failover": DrPlanStepTypeAutonomousContainerDatabaseFailover, + "autonomous_container_database_start_drill_convert_to_snapshot_standby": DrPlanStepTypeAutonomousContainerDatabaseStartDrillConvertToSnapshotStandby, + "autonomous_container_database_stop_drill_convert_to_physical_standby": DrPlanStepTypeAutonomousContainerDatabaseStopDrillConvertToPhysicalStandby, + "autonomous_database_start_drill_create_clone_standby_precheck": DrPlanStepTypeAutonomousDatabaseStartDrillCreateCloneStandbyPrecheck, + "autonomous_database_stop_drill_delete_clone_standby_precheck": DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandbyPrecheck, + "autonomous_database_start_drill_convert_to_snapshot_standby_precheck": DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandbyPrecheck, + "autonomous_database_stop_drill_convert_to_physical_standby_precheck": DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandbyPrecheck, + "autonomous_database_start_drill_create_clone_standby": DrPlanStepTypeAutonomousDatabaseStartDrillCreateCloneStandby, + "autonomous_database_stop_drill_delete_clone_standby": DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandby, + "autonomous_database_start_drill_convert_to_snapshot_standby": DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandby, + "autonomous_database_stop_drill_convert_to_physical_standby": DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandby, + "user_defined_precheck": DrPlanStepTypeUserDefinedPrecheck, + "compute_instance_launch": DrPlanStepTypeComputeInstanceLaunch, + "compute_instance_stop": DrPlanStepTypeComputeInstanceStop, + "compute_instance_terminate": DrPlanStepTypeComputeInstanceTerminate, + "compute_instance_remove": DrPlanStepTypeComputeInstanceRemove, + "database_switchover": DrPlanStepTypeDatabaseSwitchover, + "database_failover": DrPlanStepTypeDatabaseFailover, + "autonomous_database_switchover": DrPlanStepTypeAutonomousDatabaseSwitchover, + "autonomous_database_failover": DrPlanStepTypeAutonomousDatabaseFailover, + "volume_group_restore_switchover": DrPlanStepTypeVolumeGroupRestoreSwitchover, + "volume_group_restore_failover": DrPlanStepTypeVolumeGroupRestoreFailover, + "volume_group_reverse": DrPlanStepTypeVolumeGroupReverse, + "volume_group_delete": DrPlanStepTypeVolumeGroupDelete, + "volume_group_remove": DrPlanStepTypeVolumeGroupRemove, + "volume_group_terminate": DrPlanStepTypeVolumeGroupTerminate, + "user_defined": DrPlanStepTypeUserDefined, + "volume_group_restore_start_drill_precheck": DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck, + "volume_group_remove_precheck": DrPlanStepTypeVolumeGroupRemovePrecheck, + "volume_group_terminate_precheck": DrPlanStepTypeVolumeGroupTerminatePrecheck, + "volume_group_restore_start_drill": DrPlanStepTypeVolumeGroupRestoreStartDrill, + "autonomous_database_create_clone_precheck": DrPlanStepTypeAutonomousDatabaseCreateClonePrecheck, + "autonomous_database_delete_clone_precheck": DrPlanStepTypeAutonomousDatabaseDeleteClonePrecheck, + "load_balancer_update_primary_backend_set_precheck": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSetPrecheck, + "load_balancer_update_standby_backend_set_precheck": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSetPrecheck, + "file_system_switchover_precheck": DrPlanStepTypeFileSystemSwitchoverPrecheck, + "file_system_failover_precheck": DrPlanStepTypeFileSystemFailoverPrecheck, + "file_system_start_drill_precheck": DrPlanStepTypeFileSystemStartDrillPrecheck, + "file_system_stop_drill_precheck": DrPlanStepTypeFileSystemStopDrillPrecheck, + "file_system_remove_precheck": DrPlanStepTypeFileSystemRemovePrecheck, + "file_system_terminate_precheck": DrPlanStepTypeFileSystemTerminatePrecheck, + "file_system_mount_precheck": DrPlanStepTypeFileSystemMountPrecheck, + "file_system_unmount_precheck": DrPlanStepTypeFileSystemUnmountPrecheck, + "compute_instance_start_precheck": DrPlanStepTypeComputeInstanceStartPrecheck, + "compute_instance_attach_block_volumes_precheck": DrPlanStepTypeComputeInstanceAttachBlockVolumesPrecheck, + "compute_instance_detach_block_volumes_precheck": DrPlanStepTypeComputeInstanceDetachBlockVolumesPrecheck, + "compute_instance_mount_block_volumes_precheck": DrPlanStepTypeComputeInstanceMountBlockVolumesPrecheck, + "compute_instance_unmount_block_volumes_precheck": DrPlanStepTypeComputeInstanceUnmountBlockVolumesPrecheck, + "compute_capacity_reservation_start_drill_precheck": DrPlanStepTypeComputeCapacityReservationStartDrillPrecheck, + "compute_capacity_availability_start_drill_precheck": DrPlanStepTypeComputeCapacityAvailabilityStartDrillPrecheck, + "autonomous_database_create_clone": DrPlanStepTypeAutonomousDatabaseCreateClone, + "autonomous_database_delete_clone": DrPlanStepTypeAutonomousDatabaseDeleteClone, + "load_balancer_update_primary_backend_set": DrPlanStepTypeLoadBalancerUpdatePrimaryBackendSet, + "load_balancer_update_standby_backend_set": DrPlanStepTypeLoadBalancerUpdateStandbyBackendSet, + "file_system_switchover": DrPlanStepTypeFileSystemSwitchover, + "file_system_failover": DrPlanStepTypeFileSystemFailover, + "file_system_remove": DrPlanStepTypeFileSystemRemove, + "file_system_reverse": DrPlanStepTypeFileSystemReverse, + "file_system_terminate": DrPlanStepTypeFileSystemTerminate, + "file_system_start_drill": DrPlanStepTypeFileSystemStartDrill, + "file_system_stop_drill": DrPlanStepTypeFileSystemStopDrill, + "compute_instance_start": DrPlanStepTypeComputeInstanceStart, + "compute_instance_attach_block_volumes": DrPlanStepTypeComputeInstanceAttachBlockVolumes, + "compute_instance_detach_block_volumes": DrPlanStepTypeComputeInstanceDetachBlockVolumes, + "file_system_mount": DrPlanStepTypeFileSystemMount, + "file_system_unmount": DrPlanStepTypeFileSystemUnmount, + "compute_capacity_reservation_switchover_precheck": DrPlanStepTypeComputeCapacityReservationSwitchoverPrecheck, + "compute_capacity_reservation_failover_precheck": DrPlanStepTypeComputeCapacityReservationFailoverPrecheck, + "compute_capacity_availability_switchover_precheck": DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck, + "compute_capacity_availability_failover_precheck": DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck, + "object_storage_bucket_switchover_delete_replication_primary_precheck": DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimaryPrecheck, + "object_storage_bucket_switchover_setup_reverse_replication_standby_precheck": DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandbyPrecheck, + "object_storage_bucket_failover_delete_replication_standby_precheck": DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandbyPrecheck, + "object_storage_bucket_failover_setup_reverse_replication_standby_precheck": DrPlanStepTypeObjectStorageBucketFailoverSetupReverseReplicationStandbyPrecheck, + "object_storage_bucket_switchover_delete_replication_primary": DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimary, + "object_storage_bucket_switchover_setup_reverse_replication_standby": DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandby, + "object_storage_bucket_failover_delete_replication_standby": DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandby, + "object_storage_bucket_failover_setup_reverse_replication_standby": DrPlanStepTypeObjectStorageBucketFailoverSetupReverseReplicationStandby, } // GetDrPlanStepTypeEnumValues Enumerates the set of values for DrPlanStepTypeEnum @@ -258,6 +330,22 @@ func GetDrPlanStepTypeEnumStringValues() []string { "DATABASE_FAILOVER_PRECHECK", "AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK", "AUTONOMOUS_DATABASE_FAILOVER_PRECHECK", + "AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER_PRECHECK", + "AUTONOMOUS_CONTAINER_DATABASE_FAILOVER_PRECHECK", + "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK", + "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK", + "AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER", + "AUTONOMOUS_CONTAINER_DATABASE_FAILOVER", + "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY", + "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY", + "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY_PRECHECK", + "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY_PRECHECK", + "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK", + "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK", + "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY", + "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY", + "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY", + "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY", "USER_DEFINED_PRECHECK", "COMPUTE_INSTANCE_LAUNCH", "COMPUTE_INSTANCE_STOP", @@ -317,6 +405,14 @@ func GetDrPlanStepTypeEnumStringValues() []string { "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK", "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK", "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK", + "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK", + "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK", + "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK", + "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK", + "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY", + "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY", + "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY", + "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY", } } diff --git a/disasterrecovery/dr_protection_group_member.go b/disasterrecovery/dr_protection_group_member.go index f0433cfda7..25b4823ea7 100644 --- a/disasterrecovery/dr_protection_group_member.go +++ b/disasterrecovery/dr_protection_group_member.go @@ -67,6 +67,10 @@ func (m *drprotectiongroupmember) UnmarshalPolymorphicJSON(data []byte) (interfa mm := DrProtectionGroupMemberNetworkLoadBalancer{} err = json.Unmarshal(data, &mm) return mm, err + case "OBJECT_STORAGE_BUCKET": + mm := DrProtectionGroupMemberObjectStorageBucket{} + err = json.Unmarshal(data, &mm) + return mm, err case "FILE_SYSTEM": mm := DrProtectionGroupMemberFileSystem{} err = json.Unmarshal(data, &mm) @@ -91,6 +95,10 @@ func (m *drprotectiongroupmember) UnmarshalPolymorphicJSON(data []byte) (interfa mm := DrProtectionGroupMemberComputeInstanceNonMovable{} err = json.Unmarshal(data, &mm) return mm, err + case "AUTONOMOUS_CONTAINER_DATABASE": + mm := DrProtectionGroupMemberAutonomousContainerDatabase{} + err = json.Unmarshal(data, &mm) + return mm, err case "DATABASE": mm := DrProtectionGroupMemberDatabase{} err = json.Unmarshal(data, &mm) diff --git a/disasterrecovery/dr_protection_group_member_autonomous_container_database.go b/disasterrecovery/dr_protection_group_member_autonomous_container_database.go new file mode 100644 index 0000000000..a55590b70e --- /dev/null +++ b/disasterrecovery/dr_protection_group_member_autonomous_container_database.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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrProtectionGroupMemberAutonomousContainerDatabase The properties for an Autonomous Container Database member of a DR protection group. +type DrProtectionGroupMemberAutonomousContainerDatabase struct { + + // The OCID of the member. + // Example: `ocid1.instance.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + ConnectionStringType AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum `mandatory:"false" json:"connectionStringType,omitempty"` +} + +// GetMemberId returns MemberId +func (m DrProtectionGroupMemberAutonomousContainerDatabase) GetMemberId() *string { + return m.MemberId +} + +func (m DrProtectionGroupMemberAutonomousContainerDatabase) 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 DrProtectionGroupMemberAutonomousContainerDatabase) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum(string(m.ConnectionStringType)); !ok && m.ConnectionStringType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConnectionStringType: %s. Supported values are: %s.", m.ConnectionStringType, strings.Join(GetAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DrProtectionGroupMemberAutonomousContainerDatabase) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDrProtectionGroupMemberAutonomousContainerDatabase DrProtectionGroupMemberAutonomousContainerDatabase + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeDrProtectionGroupMemberAutonomousContainerDatabase + }{ + "AUTONOMOUS_CONTAINER_DATABASE", + (MarshalTypeDrProtectionGroupMemberAutonomousContainerDatabase)(m), + } + + return json.Marshal(&s) +} diff --git a/disasterrecovery/dr_protection_group_member_autonomous_database.go b/disasterrecovery/dr_protection_group_member_autonomous_database.go index 76c4766281..d80b4b647e 100644 --- a/disasterrecovery/dr_protection_group_member_autonomous_database.go +++ b/disasterrecovery/dr_protection_group_member_autonomous_database.go @@ -25,6 +25,16 @@ type DrProtectionGroupMemberAutonomousDatabase struct { // The OCID of the member. // Example: `ocid1.instance.oc1..uniqueID` MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the vault secret where the database SYSDBA password is stored. + // This password is required and used for performing database DR Drill operations when using full clone. + // Example: `ocid1.vaultsecret.oc1..uniqueID` + PasswordVaultSecretId *string `mandatory:"false" json:"passwordVaultSecretId"` + + // This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + AutonomousDatabaseStandbyTypeForDrDrills AutonomousDatabaseStandbyTypeForDrDrillsEnum `mandatory:"false" json:"autonomousDatabaseStandbyTypeForDrDrills,omitempty"` } // GetMemberId returns MemberId @@ -42,6 +52,9 @@ func (m DrProtectionGroupMemberAutonomousDatabase) String() string { func (m DrProtectionGroupMemberAutonomousDatabase) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingAutonomousDatabaseStandbyTypeForDrDrillsEnum(string(m.AutonomousDatabaseStandbyTypeForDrDrills)); !ok && m.AutonomousDatabaseStandbyTypeForDrDrills != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AutonomousDatabaseStandbyTypeForDrDrills: %s. Supported values are: %s.", m.AutonomousDatabaseStandbyTypeForDrDrills, strings.Join(GetAutonomousDatabaseStandbyTypeForDrDrillsEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/disasterrecovery/dr_protection_group_member_object_storage_bucket.go b/disasterrecovery/dr_protection_group_member_object_storage_bucket.go new file mode 100644 index 0000000000..5790c1940a --- /dev/null +++ b/disasterrecovery/dr_protection_group_member_object_storage_bucket.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrProtectionGroupMemberObjectStorageBucket The properties for a object storage bucket member of a DR protection group. +type DrProtectionGroupMemberObjectStorageBucket struct { + + // The OCID of the member. + // Example: `ocid1.instance.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The namespace in object storage (Note - this is usually the tenancy name). + // Example: `myocitenancy` + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // The bucket name inside the object storage namespace. + // Example: `bucket_name` + BucketName *string `mandatory:"true" json:"bucketName"` +} + +// GetMemberId returns MemberId +func (m DrProtectionGroupMemberObjectStorageBucket) GetMemberId() *string { + return m.MemberId +} + +func (m DrProtectionGroupMemberObjectStorageBucket) 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 DrProtectionGroupMemberObjectStorageBucket) 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 DrProtectionGroupMemberObjectStorageBucket) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDrProtectionGroupMemberObjectStorageBucket DrProtectionGroupMemberObjectStorageBucket + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeDrProtectionGroupMemberObjectStorageBucket + }{ + "OBJECT_STORAGE_BUCKET", + (MarshalTypeDrProtectionGroupMemberObjectStorageBucket)(m), + } + + return json.Marshal(&s) +} diff --git a/disasterrecovery/dr_protection_group_member_type.go b/disasterrecovery/dr_protection_group_member_type.go index 8d81033b2d..171dffff4f 100644 --- a/disasterrecovery/dr_protection_group_member_type.go +++ b/disasterrecovery/dr_protection_group_member_type.go @@ -21,39 +21,45 @@ type DrProtectionGroupMemberTypeEnum string // Set of constants representing the allowable values for DrProtectionGroupMemberTypeEnum const ( - DrProtectionGroupMemberTypeComputeInstance DrProtectionGroupMemberTypeEnum = "COMPUTE_INSTANCE" - DrProtectionGroupMemberTypeComputeInstanceMovable DrProtectionGroupMemberTypeEnum = "COMPUTE_INSTANCE_MOVABLE" - DrProtectionGroupMemberTypeComputeInstanceNonMovable DrProtectionGroupMemberTypeEnum = "COMPUTE_INSTANCE_NON_MOVABLE" - DrProtectionGroupMemberTypeVolumeGroup DrProtectionGroupMemberTypeEnum = "VOLUME_GROUP" - DrProtectionGroupMemberTypeDatabase DrProtectionGroupMemberTypeEnum = "DATABASE" - DrProtectionGroupMemberTypeAutonomousDatabase DrProtectionGroupMemberTypeEnum = "AUTONOMOUS_DATABASE" - DrProtectionGroupMemberTypeLoadBalancer DrProtectionGroupMemberTypeEnum = "LOAD_BALANCER" - DrProtectionGroupMemberTypeNetworkLoadBalancer DrProtectionGroupMemberTypeEnum = "NETWORK_LOAD_BALANCER" - DrProtectionGroupMemberTypeFileSystem DrProtectionGroupMemberTypeEnum = "FILE_SYSTEM" + DrProtectionGroupMemberTypeComputeInstance DrProtectionGroupMemberTypeEnum = "COMPUTE_INSTANCE" + DrProtectionGroupMemberTypeComputeInstanceMovable DrProtectionGroupMemberTypeEnum = "COMPUTE_INSTANCE_MOVABLE" + DrProtectionGroupMemberTypeComputeInstanceNonMovable DrProtectionGroupMemberTypeEnum = "COMPUTE_INSTANCE_NON_MOVABLE" + DrProtectionGroupMemberTypeVolumeGroup DrProtectionGroupMemberTypeEnum = "VOLUME_GROUP" + DrProtectionGroupMemberTypeDatabase DrProtectionGroupMemberTypeEnum = "DATABASE" + DrProtectionGroupMemberTypeAutonomousDatabase DrProtectionGroupMemberTypeEnum = "AUTONOMOUS_DATABASE" + DrProtectionGroupMemberTypeAutonomousContainerDatabase DrProtectionGroupMemberTypeEnum = "AUTONOMOUS_CONTAINER_DATABASE" + DrProtectionGroupMemberTypeLoadBalancer DrProtectionGroupMemberTypeEnum = "LOAD_BALANCER" + DrProtectionGroupMemberTypeNetworkLoadBalancer DrProtectionGroupMemberTypeEnum = "NETWORK_LOAD_BALANCER" + DrProtectionGroupMemberTypeFileSystem DrProtectionGroupMemberTypeEnum = "FILE_SYSTEM" + DrProtectionGroupMemberTypeObjectStorageBucket DrProtectionGroupMemberTypeEnum = "OBJECT_STORAGE_BUCKET" ) var mappingDrProtectionGroupMemberTypeEnum = map[string]DrProtectionGroupMemberTypeEnum{ - "COMPUTE_INSTANCE": DrProtectionGroupMemberTypeComputeInstance, - "COMPUTE_INSTANCE_MOVABLE": DrProtectionGroupMemberTypeComputeInstanceMovable, - "COMPUTE_INSTANCE_NON_MOVABLE": DrProtectionGroupMemberTypeComputeInstanceNonMovable, - "VOLUME_GROUP": DrProtectionGroupMemberTypeVolumeGroup, - "DATABASE": DrProtectionGroupMemberTypeDatabase, - "AUTONOMOUS_DATABASE": DrProtectionGroupMemberTypeAutonomousDatabase, - "LOAD_BALANCER": DrProtectionGroupMemberTypeLoadBalancer, - "NETWORK_LOAD_BALANCER": DrProtectionGroupMemberTypeNetworkLoadBalancer, - "FILE_SYSTEM": DrProtectionGroupMemberTypeFileSystem, + "COMPUTE_INSTANCE": DrProtectionGroupMemberTypeComputeInstance, + "COMPUTE_INSTANCE_MOVABLE": DrProtectionGroupMemberTypeComputeInstanceMovable, + "COMPUTE_INSTANCE_NON_MOVABLE": DrProtectionGroupMemberTypeComputeInstanceNonMovable, + "VOLUME_GROUP": DrProtectionGroupMemberTypeVolumeGroup, + "DATABASE": DrProtectionGroupMemberTypeDatabase, + "AUTONOMOUS_DATABASE": DrProtectionGroupMemberTypeAutonomousDatabase, + "AUTONOMOUS_CONTAINER_DATABASE": DrProtectionGroupMemberTypeAutonomousContainerDatabase, + "LOAD_BALANCER": DrProtectionGroupMemberTypeLoadBalancer, + "NETWORK_LOAD_BALANCER": DrProtectionGroupMemberTypeNetworkLoadBalancer, + "FILE_SYSTEM": DrProtectionGroupMemberTypeFileSystem, + "OBJECT_STORAGE_BUCKET": DrProtectionGroupMemberTypeObjectStorageBucket, } var mappingDrProtectionGroupMemberTypeEnumLowerCase = map[string]DrProtectionGroupMemberTypeEnum{ - "compute_instance": DrProtectionGroupMemberTypeComputeInstance, - "compute_instance_movable": DrProtectionGroupMemberTypeComputeInstanceMovable, - "compute_instance_non_movable": DrProtectionGroupMemberTypeComputeInstanceNonMovable, - "volume_group": DrProtectionGroupMemberTypeVolumeGroup, - "database": DrProtectionGroupMemberTypeDatabase, - "autonomous_database": DrProtectionGroupMemberTypeAutonomousDatabase, - "load_balancer": DrProtectionGroupMemberTypeLoadBalancer, - "network_load_balancer": DrProtectionGroupMemberTypeNetworkLoadBalancer, - "file_system": DrProtectionGroupMemberTypeFileSystem, + "compute_instance": DrProtectionGroupMemberTypeComputeInstance, + "compute_instance_movable": DrProtectionGroupMemberTypeComputeInstanceMovable, + "compute_instance_non_movable": DrProtectionGroupMemberTypeComputeInstanceNonMovable, + "volume_group": DrProtectionGroupMemberTypeVolumeGroup, + "database": DrProtectionGroupMemberTypeDatabase, + "autonomous_database": DrProtectionGroupMemberTypeAutonomousDatabase, + "autonomous_container_database": DrProtectionGroupMemberTypeAutonomousContainerDatabase, + "load_balancer": DrProtectionGroupMemberTypeLoadBalancer, + "network_load_balancer": DrProtectionGroupMemberTypeNetworkLoadBalancer, + "file_system": DrProtectionGroupMemberTypeFileSystem, + "object_storage_bucket": DrProtectionGroupMemberTypeObjectStorageBucket, } // GetDrProtectionGroupMemberTypeEnumValues Enumerates the set of values for DrProtectionGroupMemberTypeEnum @@ -74,9 +80,11 @@ func GetDrProtectionGroupMemberTypeEnumStringValues() []string { "VOLUME_GROUP", "DATABASE", "AUTONOMOUS_DATABASE", + "AUTONOMOUS_CONTAINER_DATABASE", "LOAD_BALANCER", "NETWORK_LOAD_BALANCER", "FILE_SYSTEM", + "OBJECT_STORAGE_BUCKET", } } diff --git a/disasterrecovery/list_dr_plan_executions_request_response.go b/disasterrecovery/list_dr_plan_executions_request_response.go index a5a96e3c10..6874b0d453 100644 --- a/disasterrecovery/list_dr_plan_executions_request_response.go +++ b/disasterrecovery/list_dr_plan_executions_request_response.go @@ -29,9 +29,6 @@ type ListDrPlanExecutionsRequest struct { // Example: `ocid1.drplanexecution.oc1..uniqueID` DrPlanExecutionId *string `mandatory:"false" contributesTo:"query" name:"drPlanExecutionId"` - // The DR plan execution type. - DrPlanExecutionType ListDrPlanExecutionsDrPlanExecutionTypeEnum `mandatory:"false" contributesTo:"query" name:"drPlanExecutionType" omitEmpty:"true"` - // A filter to return only resources that match the given display name. // Example: `MyResourceDisplayName` DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` @@ -100,9 +97,6 @@ func (request ListDrPlanExecutionsRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingListDrPlanExecutionsLifecycleStateEnum(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(GetListDrPlanExecutionsLifecycleStateEnumStringValues(), ","))) } - if _, ok := GetMappingListDrPlanExecutionsDrPlanExecutionTypeEnum(string(request.DrPlanExecutionType)); !ok && request.DrPlanExecutionType != "" { - errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DrPlanExecutionType: %s. Supported values are: %s.", request.DrPlanExecutionType, strings.Join(GetListDrPlanExecutionsDrPlanExecutionTypeEnumStringValues(), ","))) - } if _, ok := GetMappingListDrPlanExecutionsSortOrderEnum(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(GetListDrPlanExecutionsSortOrderEnumStringValues(), ","))) } @@ -225,72 +219,6 @@ func GetMappingListDrPlanExecutionsLifecycleStateEnum(val string) (ListDrPlanExe return enum, ok } -// ListDrPlanExecutionsDrPlanExecutionTypeEnum Enum with underlying type: string -type ListDrPlanExecutionsDrPlanExecutionTypeEnum string - -// Set of constants representing the allowable values for ListDrPlanExecutionsDrPlanExecutionTypeEnum -const ( - ListDrPlanExecutionsDrPlanExecutionTypeSwitchover ListDrPlanExecutionsDrPlanExecutionTypeEnum = "SWITCHOVER" - ListDrPlanExecutionsDrPlanExecutionTypeSwitchoverPrecheck ListDrPlanExecutionsDrPlanExecutionTypeEnum = "SWITCHOVER_PRECHECK" - ListDrPlanExecutionsDrPlanExecutionTypeFailover ListDrPlanExecutionsDrPlanExecutionTypeEnum = "FAILOVER" - ListDrPlanExecutionsDrPlanExecutionTypeFailoverPrecheck ListDrPlanExecutionsDrPlanExecutionTypeEnum = "FAILOVER_PRECHECK" - ListDrPlanExecutionsDrPlanExecutionTypeStartDrill ListDrPlanExecutionsDrPlanExecutionTypeEnum = "START_DRILL" - ListDrPlanExecutionsDrPlanExecutionTypeStartDrillPrecheck ListDrPlanExecutionsDrPlanExecutionTypeEnum = "START_DRILL_PRECHECK" - ListDrPlanExecutionsDrPlanExecutionTypeStopDrill ListDrPlanExecutionsDrPlanExecutionTypeEnum = "STOP_DRILL" - ListDrPlanExecutionsDrPlanExecutionTypeStopDrillPrecheck ListDrPlanExecutionsDrPlanExecutionTypeEnum = "STOP_DRILL_PRECHECK" -) - -var mappingListDrPlanExecutionsDrPlanExecutionTypeEnum = map[string]ListDrPlanExecutionsDrPlanExecutionTypeEnum{ - "SWITCHOVER": ListDrPlanExecutionsDrPlanExecutionTypeSwitchover, - "SWITCHOVER_PRECHECK": ListDrPlanExecutionsDrPlanExecutionTypeSwitchoverPrecheck, - "FAILOVER": ListDrPlanExecutionsDrPlanExecutionTypeFailover, - "FAILOVER_PRECHECK": ListDrPlanExecutionsDrPlanExecutionTypeFailoverPrecheck, - "START_DRILL": ListDrPlanExecutionsDrPlanExecutionTypeStartDrill, - "START_DRILL_PRECHECK": ListDrPlanExecutionsDrPlanExecutionTypeStartDrillPrecheck, - "STOP_DRILL": ListDrPlanExecutionsDrPlanExecutionTypeStopDrill, - "STOP_DRILL_PRECHECK": ListDrPlanExecutionsDrPlanExecutionTypeStopDrillPrecheck, -} - -var mappingListDrPlanExecutionsDrPlanExecutionTypeEnumLowerCase = map[string]ListDrPlanExecutionsDrPlanExecutionTypeEnum{ - "switchover": ListDrPlanExecutionsDrPlanExecutionTypeSwitchover, - "switchover_precheck": ListDrPlanExecutionsDrPlanExecutionTypeSwitchoverPrecheck, - "failover": ListDrPlanExecutionsDrPlanExecutionTypeFailover, - "failover_precheck": ListDrPlanExecutionsDrPlanExecutionTypeFailoverPrecheck, - "start_drill": ListDrPlanExecutionsDrPlanExecutionTypeStartDrill, - "start_drill_precheck": ListDrPlanExecutionsDrPlanExecutionTypeStartDrillPrecheck, - "stop_drill": ListDrPlanExecutionsDrPlanExecutionTypeStopDrill, - "stop_drill_precheck": ListDrPlanExecutionsDrPlanExecutionTypeStopDrillPrecheck, -} - -// GetListDrPlanExecutionsDrPlanExecutionTypeEnumValues Enumerates the set of values for ListDrPlanExecutionsDrPlanExecutionTypeEnum -func GetListDrPlanExecutionsDrPlanExecutionTypeEnumValues() []ListDrPlanExecutionsDrPlanExecutionTypeEnum { - values := make([]ListDrPlanExecutionsDrPlanExecutionTypeEnum, 0) - for _, v := range mappingListDrPlanExecutionsDrPlanExecutionTypeEnum { - values = append(values, v) - } - return values -} - -// GetListDrPlanExecutionsDrPlanExecutionTypeEnumStringValues Enumerates the set of values in String for ListDrPlanExecutionsDrPlanExecutionTypeEnum -func GetListDrPlanExecutionsDrPlanExecutionTypeEnumStringValues() []string { - return []string{ - "SWITCHOVER", - "SWITCHOVER_PRECHECK", - "FAILOVER", - "FAILOVER_PRECHECK", - "START_DRILL", - "START_DRILL_PRECHECK", - "STOP_DRILL", - "STOP_DRILL_PRECHECK", - } -} - -// GetMappingListDrPlanExecutionsDrPlanExecutionTypeEnum performs case Insensitive comparison on enum value and return the desired enum -func GetMappingListDrPlanExecutionsDrPlanExecutionTypeEnum(val string) (ListDrPlanExecutionsDrPlanExecutionTypeEnum, bool) { - enum, ok := mappingListDrPlanExecutionsDrPlanExecutionTypeEnumLowerCase[strings.ToLower(val)] - return enum, ok -} - // ListDrPlanExecutionsSortOrderEnum Enum with underlying type: string type ListDrPlanExecutionsSortOrderEnum string diff --git a/disasterrecovery/update_dr_protection_group_member_autonomous_container_database_details.go b/disasterrecovery/update_dr_protection_group_member_autonomous_container_database_details.go new file mode 100644 index 0000000000..ee94ad7236 --- /dev/null +++ b/disasterrecovery/update_dr_protection_group_member_autonomous_container_database_details.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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails Update properties for an Autonomous Container Database member. +type UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails struct { + + // The OCID of the member. + // Example: `ocid1.database.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + ConnectionStringType AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum `mandatory:"false" json:"connectionStringType,omitempty"` +} + +// GetMemberId returns MemberId +func (m UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) GetMemberId() *string { + return m.MemberId +} + +func (m UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) 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 UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum(string(m.ConnectionStringType)); !ok && m.ConnectionStringType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConnectionStringType: %s. Supported values are: %s.", m.ConnectionStringType, strings.Join(GetAutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeUpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails + }{ + "AUTONOMOUS_CONTAINER_DATABASE", + (MarshalTypeUpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go b/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go index c99394ae0e..c6f149f38b 100644 --- a/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go +++ b/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go @@ -25,6 +25,16 @@ type UpdateDrProtectionGroupMemberAutonomousDatabaseDetails struct { // The OCID of the member. // Example: `ocid1.database.oc1..uniqueID` MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the vault secret where the database SYSDBA password is stored. + // This password is required and used for performing database DR Drill operations when using full clone. + // Example: `ocid1.vaultsecret.oc1..uniqueID` + PasswordVaultSecretId *string `mandatory:"false" json:"passwordVaultSecretId"` + + // This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + AutonomousDatabaseStandbyTypeForDrDrills AutonomousDatabaseStandbyTypeForDrDrillsEnum `mandatory:"false" json:"autonomousDatabaseStandbyTypeForDrDrills,omitempty"` } // GetMemberId returns MemberId @@ -42,6 +52,9 @@ func (m UpdateDrProtectionGroupMemberAutonomousDatabaseDetails) String() string func (m UpdateDrProtectionGroupMemberAutonomousDatabaseDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingAutonomousDatabaseStandbyTypeForDrDrillsEnum(string(m.AutonomousDatabaseStandbyTypeForDrDrills)); !ok && m.AutonomousDatabaseStandbyTypeForDrDrills != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AutonomousDatabaseStandbyTypeForDrDrills: %s. Supported values are: %s.", m.AutonomousDatabaseStandbyTypeForDrDrills, strings.Join(GetAutonomousDatabaseStandbyTypeForDrDrillsEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/disasterrecovery/update_dr_protection_group_member_details.go b/disasterrecovery/update_dr_protection_group_member_details.go index 9da6ae09a6..dcdc0a7856 100644 --- a/disasterrecovery/update_dr_protection_group_member_details.go +++ b/disasterrecovery/update_dr_protection_group_member_details.go @@ -83,10 +83,18 @@ func (m *updatedrprotectiongroupmemberdetails) UnmarshalPolymorphicJSON(data []b mm := UpdateDrProtectionGroupMemberComputeInstanceNonMovableDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AUTONOMOUS_CONTAINER_DATABASE": + mm := UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "LOAD_BALANCER": mm := UpdateDrProtectionGroupMemberLoadBalancerDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "OBJECT_STORAGE_BUCKET": + mm := UpdateDrProtectionGroupMemberObjectStorageBucketDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "COMPUTE_INSTANCE_MOVABLE": mm := UpdateDrProtectionGroupMemberComputeInstanceMovableDetails{} err = json.Unmarshal(data, &mm) diff --git a/disasterrecovery/update_dr_protection_group_member_object_storage_bucket_details.go b/disasterrecovery/update_dr_protection_group_member_object_storage_bucket_details.go new file mode 100644 index 0000000000..00acebe30e --- /dev/null +++ b/disasterrecovery/update_dr_protection_group_member_object_storage_bucket_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrProtectionGroupMemberObjectStorageBucketDetails Update properties for a object storage bucket member. +type UpdateDrProtectionGroupMemberObjectStorageBucketDetails struct { + + // The OCID of the member. + // Example: `ocid1.database.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The namespace in object storage (Note - this is usually the tenancy name). + // Example: `myocitenancy` + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // The bucket name inside the object storage namespace. + // Example: `bucket_name` + BucketName *string `mandatory:"true" json:"bucketName"` +} + +// GetMemberId returns MemberId +func (m UpdateDrProtectionGroupMemberObjectStorageBucketDetails) GetMemberId() *string { + return m.MemberId +} + +func (m UpdateDrProtectionGroupMemberObjectStorageBucketDetails) 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 UpdateDrProtectionGroupMemberObjectStorageBucketDetails) 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 UpdateDrProtectionGroupMemberObjectStorageBucketDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDrProtectionGroupMemberObjectStorageBucketDetails UpdateDrProtectionGroupMemberObjectStorageBucketDetails + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeUpdateDrProtectionGroupMemberObjectStorageBucketDetails + }{ + "OBJECT_STORAGE_BUCKET", + (MarshalTypeUpdateDrProtectionGroupMemberObjectStorageBucketDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/action_group.go b/fleetappsmanagement/action_group.go new file mode 100644 index 0000000000..2d8a10b484 --- /dev/null +++ b/fleetappsmanagement/action_group.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActionGroup Action Group. +type ActionGroup struct { + + // Provide the ID of the resource; Ex- fleetId. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // ID of the runbook + RunbookId *string `mandatory:"true" json:"runbookId"` + + // ActionGroup Type associated. + Type LifeCycleActionGroupTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Application Type associated. + // Only applicable if type is ENVIRONMENT. + ApplicationType *string `mandatory:"false" json:"applicationType"` + + // Product associated. + // Only applicable if type is PRODUCT. + Product *string `mandatory:"false" json:"product"` + + // LifeCycle Operation + LifecycleOperation *string `mandatory:"false" json:"lifecycleOperation"` + + // Provide the target if schedule is created against the target + TargetId *string `mandatory:"false" json:"targetId"` + + // Provide subjects that need to be considered for the schedule. + Subjects []string `mandatory:"false" json:"subjects"` +} + +func (m ActionGroup) 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 ActionGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLifeCycleActionGroupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetLifeCycleActionGroupTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/action_group_details.go b/fleetappsmanagement/action_group_details.go new file mode 100644 index 0000000000..41672a4153 --- /dev/null +++ b/fleetappsmanagement/action_group_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActionGroupDetails Action Group. +type ActionGroupDetails struct { + + // The ID of the ActionGroup resource . + // Ex:fleetId. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // ID of the runbook + RunbookId *string `mandatory:"true" json:"runbookId"` + + // Name of the ActionGroup. + Name *string `mandatory:"false" json:"name"` + + // Type of the ActionGroup + Type LifeCycleActionGroupTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Application Type associated. + // Only applicable if actionGroup type is ENVIRONMENT. + ApplicationType *string `mandatory:"false" json:"applicationType"` + + // Product associated. + // Only applicable if actionGroup type is PRODUCT. + Product *string `mandatory:"false" json:"product"` + + // LifeCycle Operation + LifecycleOperation *string `mandatory:"false" json:"lifecycleOperation"` + + // Unique producer Id at Action Group Level + ActivityId *string `mandatory:"false" json:"activityId"` + + // Status of the Job at Action Group Level + Status JobStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The time the the Scheduler Job started. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the Scheduler Job ended. An RFC3339 formatted datetime string + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` +} + +func (m ActionGroupDetails) 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 ActionGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLifeCycleActionGroupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetLifeCycleActionGroupTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingJobStatusEnum(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(GetJobStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/action_type.go b/fleetappsmanagement/action_type.go new file mode 100644 index 0000000000..12800a10a0 --- /dev/null +++ b/fleetappsmanagement/action_type.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// ActionTypeEnum Enum with underlying type: string +type ActionTypeEnum string + +// Set of constants representing the allowable values for ActionTypeEnum +const ( + ActionTypeCreated ActionTypeEnum = "CREATED" + ActionTypeUpdated ActionTypeEnum = "UPDATED" + ActionTypeDeleted ActionTypeEnum = "DELETED" + ActionTypeInProgress ActionTypeEnum = "IN_PROGRESS" + ActionTypeRelated ActionTypeEnum = "RELATED" + ActionTypeFailed ActionTypeEnum = "FAILED" +) + +var mappingActionTypeEnum = map[string]ActionTypeEnum{ + "CREATED": ActionTypeCreated, + "UPDATED": ActionTypeUpdated, + "DELETED": ActionTypeDeleted, + "IN_PROGRESS": ActionTypeInProgress, + "RELATED": ActionTypeRelated, + "FAILED": ActionTypeFailed, +} + +var mappingActionTypeEnumLowerCase = map[string]ActionTypeEnum{ + "created": ActionTypeCreated, + "updated": ActionTypeUpdated, + "deleted": ActionTypeDeleted, + "in_progress": ActionTypeInProgress, + "related": ActionTypeRelated, + "failed": ActionTypeFailed, +} + +// GetActionTypeEnumValues Enumerates the set of values for ActionTypeEnum +func GetActionTypeEnumValues() []ActionTypeEnum { + values := make([]ActionTypeEnum, 0) + for _, v := range mappingActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetActionTypeEnumStringValues Enumerates the set of values in String for ActionTypeEnum +func GetActionTypeEnumStringValues() []string { + return []string{ + "CREATED", + "UPDATED", + "DELETED", + "IN_PROGRESS", + "RELATED", + "FAILED", + } +} + +// GetMappingActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingActionTypeEnum(val string) (ActionTypeEnum, bool) { + enum, ok := mappingActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/activity_resource_target.go b/fleetappsmanagement/activity_resource_target.go new file mode 100644 index 0000000000..f22d71f902 --- /dev/null +++ b/fleetappsmanagement/activity_resource_target.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActivityResourceTarget Activity Resource Target. +type ActivityResourceTarget struct { + + // Target Name. + TargetName *string `mandatory:"true" json:"targetName"` + + // Status of the Job at Resource Target Level. + Status JobStatusEnum `mandatory:"false" json:"status,omitempty"` +} + +func (m ActivityResourceTarget) 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 ActivityResourceTarget) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingJobStatusEnum(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(GetJobStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/announcement_collection.go b/fleetappsmanagement/announcement_collection.go new file mode 100644 index 0000000000..b82eae86e1 --- /dev/null +++ b/fleetappsmanagement/announcement_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AnnouncementCollection Results of list announcements . Contains AnnouncementSummary items +type AnnouncementCollection struct { + + // List of AnnouncementSummary items + Items []AnnouncementSummary `mandatory:"true" json:"items"` +} + +func (m AnnouncementCollection) 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 AnnouncementCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/announcement_sort_by.go b/fleetappsmanagement/announcement_sort_by.go new file mode 100644 index 0000000000..58104db6ec --- /dev/null +++ b/fleetappsmanagement/announcement_sort_by.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// AnnouncementSortByEnum Enum with underlying type: string +type AnnouncementSortByEnum string + +// Set of constants representing the allowable values for AnnouncementSortByEnum +const ( + AnnouncementSortByTimeReleased AnnouncementSortByEnum = "timeReleased" + AnnouncementSortBySummary AnnouncementSortByEnum = "summary" +) + +var mappingAnnouncementSortByEnum = map[string]AnnouncementSortByEnum{ + "timeReleased": AnnouncementSortByTimeReleased, + "summary": AnnouncementSortBySummary, +} + +var mappingAnnouncementSortByEnumLowerCase = map[string]AnnouncementSortByEnum{ + "timereleased": AnnouncementSortByTimeReleased, + "summary": AnnouncementSortBySummary, +} + +// GetAnnouncementSortByEnumValues Enumerates the set of values for AnnouncementSortByEnum +func GetAnnouncementSortByEnumValues() []AnnouncementSortByEnum { + values := make([]AnnouncementSortByEnum, 0) + for _, v := range mappingAnnouncementSortByEnum { + values = append(values, v) + } + return values +} + +// GetAnnouncementSortByEnumStringValues Enumerates the set of values in String for AnnouncementSortByEnum +func GetAnnouncementSortByEnumStringValues() []string { + return []string{ + "timeReleased", + "summary", + } +} + +// GetMappingAnnouncementSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAnnouncementSortByEnum(val string) (AnnouncementSortByEnum, bool) { + enum, ok := mappingAnnouncementSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/announcement_summary.go b/fleetappsmanagement/announcement_summary.go new file mode 100644 index 0000000000..c3aa9de7f2 --- /dev/null +++ b/fleetappsmanagement/announcement_summary.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AnnouncementSummary An summary of announcements for Fleet Application Management Service +type AnnouncementSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Type of announcement + Type *string `mandatory:"true" json:"type"` + + // Summary of the announcement + Summary *string `mandatory:"true" json:"summary"` + + // Date to start displaying announcement to user + AnnouncementStart *common.SDKTime `mandatory:"true" json:"announcementStart"` + + // Date to end displaying annonucement to user + AnnouncementEnd *common.SDKTime `mandatory:"true" json:"announcementEnd"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Details of the announcement + Details *string `mandatory:"false" json:"details"` + + // URL to the announcement + Url *string `mandatory:"false" json:"url"` + + // The lifecycle state of the announcement. + LifecycleState AnnouncementSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m AnnouncementSummary) 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 AnnouncementSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAnnouncementSummaryLifecycleStateEnum(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(GetAnnouncementSummaryLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AnnouncementSummaryLifecycleStateEnum Enum with underlying type: string +type AnnouncementSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for AnnouncementSummaryLifecycleStateEnum +const ( + AnnouncementSummaryLifecycleStateActive AnnouncementSummaryLifecycleStateEnum = "ACTIVE" + AnnouncementSummaryLifecycleStateInactive AnnouncementSummaryLifecycleStateEnum = "INACTIVE" + AnnouncementSummaryLifecycleStateDeleted AnnouncementSummaryLifecycleStateEnum = "DELETED" + AnnouncementSummaryLifecycleStateFailed AnnouncementSummaryLifecycleStateEnum = "FAILED" +) + +var mappingAnnouncementSummaryLifecycleStateEnum = map[string]AnnouncementSummaryLifecycleStateEnum{ + "ACTIVE": AnnouncementSummaryLifecycleStateActive, + "INACTIVE": AnnouncementSummaryLifecycleStateInactive, + "DELETED": AnnouncementSummaryLifecycleStateDeleted, + "FAILED": AnnouncementSummaryLifecycleStateFailed, +} + +var mappingAnnouncementSummaryLifecycleStateEnumLowerCase = map[string]AnnouncementSummaryLifecycleStateEnum{ + "active": AnnouncementSummaryLifecycleStateActive, + "inactive": AnnouncementSummaryLifecycleStateInactive, + "deleted": AnnouncementSummaryLifecycleStateDeleted, + "failed": AnnouncementSummaryLifecycleStateFailed, +} + +// GetAnnouncementSummaryLifecycleStateEnumValues Enumerates the set of values for AnnouncementSummaryLifecycleStateEnum +func GetAnnouncementSummaryLifecycleStateEnumValues() []AnnouncementSummaryLifecycleStateEnum { + values := make([]AnnouncementSummaryLifecycleStateEnum, 0) + for _, v := range mappingAnnouncementSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetAnnouncementSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for AnnouncementSummaryLifecycleStateEnum +func GetAnnouncementSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingAnnouncementSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAnnouncementSummaryLifecycleStateEnum(val string) (AnnouncementSummaryLifecycleStateEnum, bool) { + enum, ok := mappingAnnouncementSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/api_based_execution_details.go b/fleetappsmanagement/api_based_execution_details.go new file mode 100644 index 0000000000..d4ac5ae67b --- /dev/null +++ b/fleetappsmanagement/api_based_execution_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApiBasedExecutionDetails Details for API based execution +type ApiBasedExecutionDetails struct { + + // Endpoint to be invoked. + Endpoint *string `mandatory:"true" json:"endpoint"` +} + +func (m ApiBasedExecutionDetails) 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 ApiBasedExecutionDetails) 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 ApiBasedExecutionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeApiBasedExecutionDetails ApiBasedExecutionDetails + s := struct { + DiscriminatorParam string `json:"executionType"` + MarshalTypeApiBasedExecutionDetails + }{ + "API", + (MarshalTypeApiBasedExecutionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/associated_fleet_credential_details.go b/fleetappsmanagement/associated_fleet_credential_details.go new file mode 100644 index 0000000000..3dcf0bd0d9 --- /dev/null +++ b/fleetappsmanagement/associated_fleet_credential_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AssociatedFleetCredentialDetails The information about new FleetCredential. +type AssociatedFleetCredentialDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + EntitySpecifics CredentialEntitySpecificDetails `mandatory:"true" json:"entitySpecifics"` + + User CredentialDetails `mandatory:"true" json:"user"` + + Password CredentialDetails `mandatory:"true" json:"password"` +} + +func (m AssociatedFleetCredentialDetails) 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 AssociatedFleetCredentialDetails) 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 *AssociatedFleetCredentialDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + EntitySpecifics credentialentityspecificdetails `json:"entitySpecifics"` + User credentialdetails `json:"user"` + Password credentialdetails `json:"password"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.CompartmentId = model.CompartmentId + + nn, e = model.EntitySpecifics.UnmarshalPolymorphicJSON(model.EntitySpecifics.JsonData) + if e != nil { + return + } + if nn != nil { + m.EntitySpecifics = nn.(CredentialEntitySpecificDetails) + } else { + m.EntitySpecifics = nil + } + + nn, e = model.User.UnmarshalPolymorphicJSON(model.User.JsonData) + if e != nil { + return + } + if nn != nil { + m.User = nn.(CredentialDetails) + } else { + m.User = nil + } + + nn, e = model.Password.UnmarshalPolymorphicJSON(model.Password.JsonData) + if e != nil { + return + } + if nn != nil { + m.Password = nn.(CredentialDetails) + } else { + m.Password = nil + } + + return +} diff --git a/fleetappsmanagement/associated_fleet_property_details.go b/fleetappsmanagement/associated_fleet_property_details.go new file mode 100644 index 0000000000..1ce98c8beb --- /dev/null +++ b/fleetappsmanagement/associated_fleet_property_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AssociatedFleetPropertyDetails The information about new FleetProperty. +type AssociatedFleetPropertyDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Type of the FleetProperty. + FleetPropertyType AssociatedFleetPropertyDetailsFleetPropertyTypeEnum `mandatory:"true" json:"fleetPropertyType"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Value of the Property + Value *string `mandatory:"false" json:"value"` + + // Property is required or not + IsRequired *bool `mandatory:"false" json:"isRequired"` +} + +func (m AssociatedFleetPropertyDetails) 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 AssociatedFleetPropertyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAssociatedFleetPropertyDetailsFleetPropertyTypeEnum(string(m.FleetPropertyType)); !ok && m.FleetPropertyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FleetPropertyType: %s. Supported values are: %s.", m.FleetPropertyType, strings.Join(GetAssociatedFleetPropertyDetailsFleetPropertyTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AssociatedFleetPropertyDetailsFleetPropertyTypeEnum Enum with underlying type: string +type AssociatedFleetPropertyDetailsFleetPropertyTypeEnum string + +// Set of constants representing the allowable values for AssociatedFleetPropertyDetailsFleetPropertyTypeEnum +const ( + AssociatedFleetPropertyDetailsFleetPropertyTypeString AssociatedFleetPropertyDetailsFleetPropertyTypeEnum = "STRING" + AssociatedFleetPropertyDetailsFleetPropertyTypeNumber AssociatedFleetPropertyDetailsFleetPropertyTypeEnum = "NUMBER" +) + +var mappingAssociatedFleetPropertyDetailsFleetPropertyTypeEnum = map[string]AssociatedFleetPropertyDetailsFleetPropertyTypeEnum{ + "STRING": AssociatedFleetPropertyDetailsFleetPropertyTypeString, + "NUMBER": AssociatedFleetPropertyDetailsFleetPropertyTypeNumber, +} + +var mappingAssociatedFleetPropertyDetailsFleetPropertyTypeEnumLowerCase = map[string]AssociatedFleetPropertyDetailsFleetPropertyTypeEnum{ + "string": AssociatedFleetPropertyDetailsFleetPropertyTypeString, + "number": AssociatedFleetPropertyDetailsFleetPropertyTypeNumber, +} + +// GetAssociatedFleetPropertyDetailsFleetPropertyTypeEnumValues Enumerates the set of values for AssociatedFleetPropertyDetailsFleetPropertyTypeEnum +func GetAssociatedFleetPropertyDetailsFleetPropertyTypeEnumValues() []AssociatedFleetPropertyDetailsFleetPropertyTypeEnum { + values := make([]AssociatedFleetPropertyDetailsFleetPropertyTypeEnum, 0) + for _, v := range mappingAssociatedFleetPropertyDetailsFleetPropertyTypeEnum { + values = append(values, v) + } + return values +} + +// GetAssociatedFleetPropertyDetailsFleetPropertyTypeEnumStringValues Enumerates the set of values in String for AssociatedFleetPropertyDetailsFleetPropertyTypeEnum +func GetAssociatedFleetPropertyDetailsFleetPropertyTypeEnumStringValues() []string { + return []string{ + "STRING", + "NUMBER", + } +} + +// GetMappingAssociatedFleetPropertyDetailsFleetPropertyTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAssociatedFleetPropertyDetailsFleetPropertyTypeEnum(val string) (AssociatedFleetPropertyDetailsFleetPropertyTypeEnum, bool) { + enum, ok := mappingAssociatedFleetPropertyDetailsFleetPropertyTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/associated_fleet_resource_details.go b/fleetappsmanagement/associated_fleet_resource_details.go new file mode 100644 index 0000000000..c59f612f42 --- /dev/null +++ b/fleetappsmanagement/associated_fleet_resource_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AssociatedFleetResourceDetails The information about associated FleetResource. +type AssociatedFleetResourceDetails struct { + + // OCID of the reosurce. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Compartment Identifier. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Tenancy Identifier. + TenancyId *string `mandatory:"true" json:"tenancyId"` + + // Type of the FleetResource. + FleetResourceType *string `mandatory:"false" json:"fleetResourceType"` +} + +func (m AssociatedFleetResourceDetails) 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 AssociatedFleetResourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/associated_local_task_details.go b/fleetappsmanagement/associated_local_task_details.go new file mode 100644 index 0000000000..fd9b5c9293 --- /dev/null +++ b/fleetappsmanagement/associated_local_task_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AssociatedLocalTaskDetails The details of the task. +type AssociatedLocalTaskDetails struct { + ExecutionDetails ExecutionDetails `mandatory:"true" json:"executionDetails"` + + // The description of the task. + Description *string `mandatory:"false" json:"description"` + + // The platform of the runbook. + Platform *string `mandatory:"false" json:"platform"` + + // Make a copy of this task in Library + IsCopyToLibraryEnabled *bool `mandatory:"false" json:"isCopyToLibraryEnabled"` + + Properties *Properties `mandatory:"false" json:"properties"` + + // The name of the task + Name *string `mandatory:"false" json:"name"` + + // The OS for the task. + OsType OsTypeEnum `mandatory:"true" json:"osType"` +} + +func (m AssociatedLocalTaskDetails) 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 AssociatedLocalTaskDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingOsTypeEnum(string(m.OsType)); !ok && m.OsType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsType: %s. Supported values are: %s.", m.OsType, strings.Join(GetOsTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AssociatedLocalTaskDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAssociatedLocalTaskDetails AssociatedLocalTaskDetails + s := struct { + DiscriminatorParam string `json:"scope"` + MarshalTypeAssociatedLocalTaskDetails + }{ + "LOCAL", + (MarshalTypeAssociatedLocalTaskDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *AssociatedLocalTaskDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + Platform *string `json:"platform"` + IsCopyToLibraryEnabled *bool `json:"isCopyToLibraryEnabled"` + Properties *Properties `json:"properties"` + Name *string `json:"name"` + ExecutionDetails executiondetails `json:"executionDetails"` + OsType OsTypeEnum `json:"osType"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.Platform = model.Platform + + m.IsCopyToLibraryEnabled = model.IsCopyToLibraryEnabled + + m.Properties = model.Properties + + m.Name = model.Name + + nn, e = model.ExecutionDetails.UnmarshalPolymorphicJSON(model.ExecutionDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ExecutionDetails = nn.(ExecutionDetails) + } else { + m.ExecutionDetails = nil + } + + m.OsType = model.OsType + + return +} diff --git a/fleetappsmanagement/associated_scheduler_definition.go b/fleetappsmanagement/associated_scheduler_definition.go new file mode 100644 index 0000000000..9d15059a13 --- /dev/null +++ b/fleetappsmanagement/associated_scheduler_definition.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AssociatedSchedulerDefinition Associated SchedulerDefinition with the job. +type AssociatedSchedulerDefinition struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // OCID of the tenancy to which the resource belongs to. + TenancyId *string `mandatory:"true" json:"tenancyId"` + + // Is this recurring schedule? + IsRecurring *bool `mandatory:"true" json:"isRecurring"` +} + +func (m AssociatedSchedulerDefinition) 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 AssociatedSchedulerDefinition) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/associated_shared_task_details.go b/fleetappsmanagement/associated_shared_task_details.go new file mode 100644 index 0000000000..6e13f86b8f --- /dev/null +++ b/fleetappsmanagement/associated_shared_task_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AssociatedSharedTaskDetails The details of the task. +type AssociatedSharedTaskDetails struct { + + // The ID of taskRecord. + TaskRecordId *string `mandatory:"true" json:"taskRecordId"` +} + +func (m AssociatedSharedTaskDetails) 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 AssociatedSharedTaskDetails) 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 AssociatedSharedTaskDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAssociatedSharedTaskDetails AssociatedSharedTaskDetails + s := struct { + DiscriminatorParam string `json:"scope"` + MarshalTypeAssociatedSharedTaskDetails + }{ + "SHARED", + (MarshalTypeAssociatedSharedTaskDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/associated_task_details.go b/fleetappsmanagement/associated_task_details.go new file mode 100644 index 0000000000..c346ff7a83 --- /dev/null +++ b/fleetappsmanagement/associated_task_details.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AssociatedTaskDetails The details of the task. +type AssociatedTaskDetails interface { +} + +type associatedtaskdetails struct { + JsonData []byte + Scope string `json:"scope"` +} + +// UnmarshalJSON unmarshals json +func (m *associatedtaskdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerassociatedtaskdetails associatedtaskdetails + s := struct { + Model Unmarshalerassociatedtaskdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Scope = s.Model.Scope + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *associatedtaskdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Scope { + case "LOCAL": + mm := AssociatedLocalTaskDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SHARED": + mm := AssociatedSharedTaskDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for AssociatedTaskDetails: %s.", m.Scope) + return *m, nil + } +} + +func (m associatedtaskdetails) 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 associatedtaskdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/associations.go b/fleetappsmanagement/associations.go new file mode 100644 index 0000000000..b7860db3e7 --- /dev/null +++ b/fleetappsmanagement/associations.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Associations JSON content with required associations +type Associations struct { + + // A set of tasks to execute in the runbook + Tasks []Task `mandatory:"true" json:"tasks"` + + // The groups of the runbook + Groups []Group `mandatory:"true" json:"groups"` + + ExecutionWorkflowDetails *ExecutionWorkflowDetails `mandatory:"true" json:"executionWorkflowDetails"` + + // The version of the runbook. + Version *string `mandatory:"false" json:"version"` +} + +func (m Associations) 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 Associations) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/check_resource_tagging_details.go b/fleetappsmanagement/check_resource_tagging_details.go new file mode 100644 index 0000000000..7638f5bfcc --- /dev/null +++ b/fleetappsmanagement/check_resource_tagging_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CheckResourceTaggingDetails Request to check resource tagging +type CheckResourceTaggingDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Resource OCIDS that need to be verified if tag can be enabled + ResourceIds []string `mandatory:"true" json:"resourceIds"` + + // Fleet Name + FleetDisplayName *string `mandatory:"false" json:"fleetDisplayName"` +} + +func (m CheckResourceTaggingDetails) 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 CheckResourceTaggingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/check_resource_tagging_request_response.go b/fleetappsmanagement/check_resource_tagging_request_response.go new file mode 100644 index 0000000000..9cc41e99f4 --- /dev/null +++ b/fleetappsmanagement/check_resource_tagging_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CheckResourceTaggingRequest wrapper for the CheckResourceTagging operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CheckResourceTagging.go.html to see an example of how to use CheckResourceTaggingRequest. +type CheckResourceTaggingRequest struct { + + // Details for Checking if FAMS tags can be added for the resources + CheckResourceTaggingDetails `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 CheckResourceTaggingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CheckResourceTaggingRequest) 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 CheckResourceTaggingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CheckResourceTaggingRequest) 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 CheckResourceTaggingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CheckResourceTaggingResponse wrapper for the CheckResourceTagging operation +type CheckResourceTaggingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ResourceTagCheckDetails instance + ResourceTagCheckDetails `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CheckResourceTaggingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CheckResourceTaggingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/compliance_report.go b/fleetappsmanagement/compliance_report.go new file mode 100644 index 0000000000..c56189ff0d --- /dev/null +++ b/fleetappsmanagement/compliance_report.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceReport Summary of a compliance report. +type ComplianceReport struct { + + // Compliance Report Identifier + Id *string `mandatory:"true" json:"id"` + + // The fleet OCID. + FleetId *string `mandatory:"true" json:"fleetId"` + + // Last known compliance state of fleet. + ComplianceState ComplianceStateEnum `mandatory:"true" json:"complianceState"` + + // Resources assocaited with the Fleet. + Resources []ComplianceReportResource `mandatory:"false" json:"resources"` +} + +func (m ComplianceReport) 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 ComplianceReport) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/compliance_report_patch_detail.go b/fleetappsmanagement/compliance_report_patch_detail.go new file mode 100644 index 0000000000..b97f7821fa --- /dev/null +++ b/fleetappsmanagement/compliance_report_patch_detail.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceReportPatchDetail Details of the Patch +type ComplianceReportPatchDetail struct { + + // The OCID to identify this analysis results. + PatchName *string `mandatory:"true" json:"patchName"` + + // Type of patch. + PatchType *string `mandatory:"true" json:"patchType"` + + // The OCID of the work request to start the analysis. + PatchDescription *string `mandatory:"false" json:"patchDescription"` + + // Time the patch was applied + TimeApplied *common.SDKTime `mandatory:"false" json:"timeApplied"` + + // Date on which patch was released. + TimeReleased *common.SDKTime `mandatory:"false" json:"timeReleased"` +} + +func (m ComplianceReportPatchDetail) 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 ComplianceReportPatchDetail) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/compliance_report_product.go b/fleetappsmanagement/compliance_report_product.go new file mode 100644 index 0000000000..09110bdff6 --- /dev/null +++ b/fleetappsmanagement/compliance_report_product.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceReportProduct Details of the Product +type ComplianceReportProduct struct { + + // Product Name + ProductName *string `mandatory:"true" json:"productName"` + + // Managed Targets associated with the Product. + Targets []ComplianceReportTarget `mandatory:"false" json:"targets"` +} + +func (m ComplianceReportProduct) 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 ComplianceReportProduct) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/compliance_report_resource.go b/fleetappsmanagement/compliance_report_resource.go new file mode 100644 index 0000000000..0acb4feff2 --- /dev/null +++ b/fleetappsmanagement/compliance_report_resource.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceReportResource Details of the Resource +type ComplianceReportResource struct { + + // The OCID to identify the resource. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Display name of the resource. + ResourceName *string `mandatory:"true" json:"resourceName"` + + // Type of the resource. + ResourceType *string `mandatory:"true" json:"resourceType"` + + // Last known compliance state of fleet. + ComplianceState ComplianceStateEnum `mandatory:"true" json:"complianceState"` + + // TenancyId of the resource. + TenancyId *string `mandatory:"false" json:"tenancyId"` + + // Tenancy the resource belongs to. + TenancyName *string `mandatory:"false" json:"tenancyName"` + + // Compartment the resource belongs to. + Compartment *string `mandatory:"false" json:"compartment"` + + // Region the resource belongs to. + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // Products assocaited with the Fleet.Only products belonging to managed targets will be shown. + Products []ComplianceReportProduct `mandatory:"false" json:"products"` +} + +func (m ComplianceReportResource) 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 ComplianceReportResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/compliance_report_target.go b/fleetappsmanagement/compliance_report_target.go new file mode 100644 index 0000000000..750f79a0bb --- /dev/null +++ b/fleetappsmanagement/compliance_report_target.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceReportTarget Details of the Patch. +type ComplianceReportTarget struct { + + // Target Identifier. + TargetId *string `mandatory:"true" json:"targetId"` + + // Target Name. + TargetName *string `mandatory:"true" json:"targetName"` + + // Last known compliance state of target. + ComplianceState ComplianceStateEnum `mandatory:"true" json:"complianceState"` + + // Current version. + Version *string `mandatory:"false" json:"version"` + + // Installed Patches for the Target. + InstalledPatches []ComplianceReportPatchDetail `mandatory:"false" json:"installedPatches"` + + // Recommended Patches for the Target. + RecommendedPatches []ComplianceReportPatchDetail `mandatory:"false" json:"recommendedPatches"` +} + +func (m ComplianceReportTarget) 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 ComplianceReportTarget) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/compliance_state.go b/fleetappsmanagement/compliance_state.go new file mode 100644 index 0000000000..4a3bb43bc1 --- /dev/null +++ b/fleetappsmanagement/compliance_state.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// ComplianceStateEnum Enum with underlying type: string +type ComplianceStateEnum string + +// Set of constants representing the allowable values for ComplianceStateEnum +const ( + ComplianceStateUnknown ComplianceStateEnum = "UNKNOWN" + ComplianceStateCompliant ComplianceStateEnum = "COMPLIANT" + ComplianceStateNonCompliant ComplianceStateEnum = "NON_COMPLIANT" + ComplianceStateWarning ComplianceStateEnum = "WARNING" +) + +var mappingComplianceStateEnum = map[string]ComplianceStateEnum{ + "UNKNOWN": ComplianceStateUnknown, + "COMPLIANT": ComplianceStateCompliant, + "NON_COMPLIANT": ComplianceStateNonCompliant, + "WARNING": ComplianceStateWarning, +} + +var mappingComplianceStateEnumLowerCase = map[string]ComplianceStateEnum{ + "unknown": ComplianceStateUnknown, + "compliant": ComplianceStateCompliant, + "non_compliant": ComplianceStateNonCompliant, + "warning": ComplianceStateWarning, +} + +// GetComplianceStateEnumValues Enumerates the set of values for ComplianceStateEnum +func GetComplianceStateEnumValues() []ComplianceStateEnum { + values := make([]ComplianceStateEnum, 0) + for _, v := range mappingComplianceStateEnum { + values = append(values, v) + } + return values +} + +// GetComplianceStateEnumStringValues Enumerates the set of values in String for ComplianceStateEnum +func GetComplianceStateEnumStringValues() []string { + return []string{ + "UNKNOWN", + "COMPLIANT", + "NON_COMPLIANT", + "WARNING", + } +} + +// GetMappingComplianceStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComplianceStateEnum(val string) (ComplianceStateEnum, bool) { + enum, ok := mappingComplianceStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/component_properties.go b/fleetappsmanagement/component_properties.go new file mode 100644 index 0000000000..acc443e930 --- /dev/null +++ b/fleetappsmanagement/component_properties.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComponentProperties The properties of the task. +type ComponentProperties struct { + + // The action to be taken in case of task failure. + ActionOnFailure ComponentPropertiesActionOnFailureEnum `mandatory:"true" json:"actionOnFailure"` + + // The hosts to execute on. + RunOn *string `mandatory:"false" json:"runOn"` + + // The condition in which the task is to be executed. + Condition *string `mandatory:"false" json:"condition"` +} + +func (m ComponentProperties) 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 ComponentProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComponentPropertiesActionOnFailureEnum(string(m.ActionOnFailure)); !ok && m.ActionOnFailure != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionOnFailure: %s. Supported values are: %s.", m.ActionOnFailure, strings.Join(GetComponentPropertiesActionOnFailureEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComponentPropertiesActionOnFailureEnum Enum with underlying type: string +type ComponentPropertiesActionOnFailureEnum string + +// Set of constants representing the allowable values for ComponentPropertiesActionOnFailureEnum +const ( + ComponentPropertiesActionOnFailureAbort ComponentPropertiesActionOnFailureEnum = "ABORT" + ComponentPropertiesActionOnFailureContinue ComponentPropertiesActionOnFailureEnum = "CONTINUE" + ComponentPropertiesActionOnFailureRollback ComponentPropertiesActionOnFailureEnum = "ROLLBACK" +) + +var mappingComponentPropertiesActionOnFailureEnum = map[string]ComponentPropertiesActionOnFailureEnum{ + "ABORT": ComponentPropertiesActionOnFailureAbort, + "CONTINUE": ComponentPropertiesActionOnFailureContinue, + "ROLLBACK": ComponentPropertiesActionOnFailureRollback, +} + +var mappingComponentPropertiesActionOnFailureEnumLowerCase = map[string]ComponentPropertiesActionOnFailureEnum{ + "abort": ComponentPropertiesActionOnFailureAbort, + "continue": ComponentPropertiesActionOnFailureContinue, + "rollback": ComponentPropertiesActionOnFailureRollback, +} + +// GetComponentPropertiesActionOnFailureEnumValues Enumerates the set of values for ComponentPropertiesActionOnFailureEnum +func GetComponentPropertiesActionOnFailureEnumValues() []ComponentPropertiesActionOnFailureEnum { + values := make([]ComponentPropertiesActionOnFailureEnum, 0) + for _, v := range mappingComponentPropertiesActionOnFailureEnum { + values = append(values, v) + } + return values +} + +// GetComponentPropertiesActionOnFailureEnumStringValues Enumerates the set of values in String for ComponentPropertiesActionOnFailureEnum +func GetComponentPropertiesActionOnFailureEnumStringValues() []string { + return []string{ + "ABORT", + "CONTINUE", + "ROLLBACK", + } +} + +// GetMappingComponentPropertiesActionOnFailureEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComponentPropertiesActionOnFailureEnum(val string) (ComponentPropertiesActionOnFailureEnum, bool) { + enum, ok := mappingComponentPropertiesActionOnFailureEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/condition.go b/fleetappsmanagement/condition.go new file mode 100644 index 0000000000..4f3bb1a9d6 --- /dev/null +++ b/fleetappsmanagement/condition.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Condition Rule condition +type Condition struct { + + // Attribute Group. + AttrGroup *string `mandatory:"true" json:"attrGroup"` + + // Attribute Key. + AttrKey *string `mandatory:"true" json:"attrKey"` + + // Attribute Value. + AttrValue *string `mandatory:"true" json:"attrValue"` +} + +func (m Condition) 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 Condition) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/confirm_targets_details.go b/fleetappsmanagement/confirm_targets_details.go new file mode 100644 index 0000000000..3dc7cda7da --- /dev/null +++ b/fleetappsmanagement/confirm_targets_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfirmTargetsDetails Details of the targets that needs to be confirmed for FAMS management +type ConfirmTargetsDetails struct { + + // The targets to confirm. + Targets []DiscoveredTarget `mandatory:"true" json:"targets"` +} + +func (m ConfirmTargetsDetails) 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 ConfirmTargetsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/confirm_targets_request_response.go b/fleetappsmanagement/confirm_targets_request_response.go new file mode 100644 index 0000000000..5c1ffad211 --- /dev/null +++ b/fleetappsmanagement/confirm_targets_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ConfirmTargetsRequest wrapper for the ConfirmTargets operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ConfirmTargets.go.html to see an example of how to use ConfirmTargetsRequest. +type ConfirmTargetsRequest struct { + + // Details for confirming Targets. + ConfirmTargetsDetails `contributesTo:"body"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 ConfirmTargetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConfirmTargetsRequest) 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 ConfirmTargetsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConfirmTargetsRequest) 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 ConfirmTargetsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfirmTargetsResponse wrapper for the ConfirmTargets operation +type ConfirmTargetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ConfirmTargetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConfirmTargetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/content_details.go b/fleetappsmanagement/content_details.go new file mode 100644 index 0000000000..a569a523d0 --- /dev/null +++ b/fleetappsmanagement/content_details.go @@ -0,0 +1,116 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ContentDetails Content Source Details. +type ContentDetails interface { +} + +type contentdetails struct { + JsonData []byte + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *contentdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercontentdetails contentdetails + s := struct { + Model Unmarshalercontentdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *contentdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "OBJECT_STORAGE_BUCKET": + mm := ObjectStorageBucketContentDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ContentDetails: %s.", m.SourceType) + return *m, nil + } +} + +func (m contentdetails) 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 contentdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ContentDetailsSourceTypeEnum Enum with underlying type: string +type ContentDetailsSourceTypeEnum string + +// Set of constants representing the allowable values for ContentDetailsSourceTypeEnum +const ( + ContentDetailsSourceTypeObjectStorageBucket ContentDetailsSourceTypeEnum = "OBJECT_STORAGE_BUCKET" +) + +var mappingContentDetailsSourceTypeEnum = map[string]ContentDetailsSourceTypeEnum{ + "OBJECT_STORAGE_BUCKET": ContentDetailsSourceTypeObjectStorageBucket, +} + +var mappingContentDetailsSourceTypeEnumLowerCase = map[string]ContentDetailsSourceTypeEnum{ + "object_storage_bucket": ContentDetailsSourceTypeObjectStorageBucket, +} + +// GetContentDetailsSourceTypeEnumValues Enumerates the set of values for ContentDetailsSourceTypeEnum +func GetContentDetailsSourceTypeEnumValues() []ContentDetailsSourceTypeEnum { + values := make([]ContentDetailsSourceTypeEnum, 0) + for _, v := range mappingContentDetailsSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetContentDetailsSourceTypeEnumStringValues Enumerates the set of values in String for ContentDetailsSourceTypeEnum +func GetContentDetailsSourceTypeEnumStringValues() []string { + return []string{ + "OBJECT_STORAGE_BUCKET", + } +} + +// GetMappingContentDetailsSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingContentDetailsSourceTypeEnum(val string) (ContentDetailsSourceTypeEnum, bool) { + enum, ok := mappingContentDetailsSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/create_fleet_credential_details.go b/fleetappsmanagement/create_fleet_credential_details.go new file mode 100644 index 0000000000..f092efdd34 --- /dev/null +++ b/fleetappsmanagement/create_fleet_credential_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateFleetCredentialDetails The information about new FleetCredential. +type CreateFleetCredentialDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + EntitySpecifics CredentialEntitySpecificDetails `mandatory:"true" json:"entitySpecifics"` + + User CredentialDetails `mandatory:"true" json:"user"` + + Password CredentialDetails `mandatory:"true" json:"password"` +} + +func (m CreateFleetCredentialDetails) 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 CreateFleetCredentialDetails) 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 *CreateFleetCredentialDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + EntitySpecifics credentialentityspecificdetails `json:"entitySpecifics"` + User credentialdetails `json:"user"` + Password credentialdetails `json:"password"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.CompartmentId = model.CompartmentId + + nn, e = model.EntitySpecifics.UnmarshalPolymorphicJSON(model.EntitySpecifics.JsonData) + if e != nil { + return + } + if nn != nil { + m.EntitySpecifics = nn.(CredentialEntitySpecificDetails) + } else { + m.EntitySpecifics = nil + } + + nn, e = model.User.UnmarshalPolymorphicJSON(model.User.JsonData) + if e != nil { + return + } + if nn != nil { + m.User = nn.(CredentialDetails) + } else { + m.User = nil + } + + nn, e = model.Password.UnmarshalPolymorphicJSON(model.Password.JsonData) + if e != nil { + return + } + if nn != nil { + m.Password = nn.(CredentialDetails) + } else { + m.Password = nil + } + + return +} diff --git a/fleetappsmanagement/create_fleet_credential_request_response.go b/fleetappsmanagement/create_fleet_credential_request_response.go new file mode 100644 index 0000000000..6af78f11dc --- /dev/null +++ b/fleetappsmanagement/create_fleet_credential_request_response.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateFleetCredentialRequest wrapper for the CreateFleetCredential operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleetCredential.go.html to see an example of how to use CreateFleetCredentialRequest. +type CreateFleetCredentialRequest struct { + + // Details for the new FleetCredential. + CreateFleetCredentialDetails `contributesTo:"body"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 CreateFleetCredentialRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateFleetCredentialRequest) 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 CreateFleetCredentialRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateFleetCredentialRequest) 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 CreateFleetCredentialRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateFleetCredentialResponse wrapper for the CreateFleetCredential operation +type CreateFleetCredentialResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FleetCredential instance + FleetCredential `presentIn:"body"` + + // URL for the created fleetCredential, the fleetCredential id will be generated after this request is sent. + Location *string `presentIn:"header" name:"location"` + + // Same as location + 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 work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateFleetCredentialResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateFleetCredentialResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/create_fleet_details.go b/fleetappsmanagement/create_fleet_details.go new file mode 100644 index 0000000000..983948f4ce --- /dev/null +++ b/fleetappsmanagement/create_fleet_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateFleetDetails The information about new Fleet. +type CreateFleetDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Type of the Fleet + FleetType FleetFleetTypeEnum `mandatory:"true" json:"fleetType"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Products associated with the Fleet + Products []string `mandatory:"false" json:"products"` + + // Application Type associated with the Fleet.Applicable for Environment fleet types. + ApplicationType *string `mandatory:"false" json:"applicationType"` + + // Environment Type associated with the Fleet.Applicable for Environment fleet types. + EnvironmentType *string `mandatory:"false" json:"environmentType"` + + // Group Type associated with Group Fleet.Applicable for Group fleet types. + GroupType FleetGroupTypeEnum `mandatory:"false" json:"groupType,omitempty"` + + // Type of resource selection in a fleet + ResourceSelectionType FleetResourceSelectionTypeEnum `mandatory:"false" json:"resourceSelectionType,omitempty"` + + RuleSelectionCriteria *SelectionCriteria `mandatory:"false" json:"ruleSelectionCriteria"` + + NotificationPreferences *NotificationPreferences `mandatory:"false" json:"notificationPreferences"` + + // Resources to be added during fleet creation when Resource selection type is Manual. + Resources []AssociatedFleetResourceDetails `mandatory:"false" json:"resources"` + + // A value which represents if auto confirming of the targets can be enabled + IsTargetAutoConfirm *bool `mandatory:"false" json:"isTargetAutoConfirm"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateFleetDetails) 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 CreateFleetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetFleetTypeEnum(string(m.FleetType)); !ok && m.FleetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FleetType: %s. Supported values are: %s.", m.FleetType, strings.Join(GetFleetFleetTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingFleetGroupTypeEnum(string(m.GroupType)); !ok && m.GroupType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for GroupType: %s. Supported values are: %s.", m.GroupType, strings.Join(GetFleetGroupTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetResourceSelectionTypeEnum(string(m.ResourceSelectionType)); !ok && m.ResourceSelectionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceSelectionType: %s. Supported values are: %s.", m.ResourceSelectionType, strings.Join(GetFleetResourceSelectionTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/create_fleet_property_details.go b/fleetappsmanagement/create_fleet_property_details.go new file mode 100644 index 0000000000..fcd5133703 --- /dev/null +++ b/fleetappsmanagement/create_fleet_property_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateFleetPropertyDetails The information about new FleetProperty. +type CreateFleetPropertyDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Value of the Property + Value *string `mandatory:"true" json:"value"` + + // Property Id. + PropertyId *string `mandatory:"true" json:"propertyId"` +} + +func (m CreateFleetPropertyDetails) 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 CreateFleetPropertyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/create_fleet_property_request_response.go b/fleetappsmanagement/create_fleet_property_request_response.go new file mode 100644 index 0000000000..a51d14bbd1 --- /dev/null +++ b/fleetappsmanagement/create_fleet_property_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateFleetPropertyRequest wrapper for the CreateFleetProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleetProperty.go.html to see an example of how to use CreateFleetPropertyRequest. +type CreateFleetPropertyRequest struct { + + // Details for the new FleetProperty. + CreateFleetPropertyDetails `contributesTo:"body"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 CreateFleetPropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateFleetPropertyRequest) 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 CreateFleetPropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateFleetPropertyRequest) 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 CreateFleetPropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateFleetPropertyResponse wrapper for the CreateFleetProperty operation +type CreateFleetPropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FleetProperty instance + FleetProperty `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateFleetPropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateFleetPropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/create_fleet_request_response.go b/fleetappsmanagement/create_fleet_request_response.go new file mode 100644 index 0000000000..4c8ee9ac3e --- /dev/null +++ b/fleetappsmanagement/create_fleet_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateFleetRequest wrapper for the CreateFleet operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleet.go.html to see an example of how to use CreateFleetRequest. +type CreateFleetRequest struct { + + // Details for the new Fleet. + CreateFleetDetails `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 CreateFleetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateFleetRequest) 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 CreateFleetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateFleetRequest) 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 CreateFleetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateFleetResponse wrapper for the CreateFleet operation +type CreateFleetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Fleet instance + Fleet `presentIn:"body"` + + // URL for the created fleet, the fleet id will be generated after this request is sent. + Location *string `presentIn:"header" name:"location"` + + // Same as location + 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 work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateFleetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateFleetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/create_fleet_resource_details.go b/fleetappsmanagement/create_fleet_resource_details.go new file mode 100644 index 0000000000..116e587e9a --- /dev/null +++ b/fleetappsmanagement/create_fleet_resource_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateFleetResourceDetails The information about new FleetResource. +type CreateFleetResourceDetails struct { + + // The OCID of the resource. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // OCID of the tenancy to which the resource belongs to. + TenancyId *string `mandatory:"true" json:"tenancyId"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // Type of the Resource. + ResourceType *string `mandatory:"false" json:"resourceType"` +} + +func (m CreateFleetResourceDetails) 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 CreateFleetResourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/create_fleet_resource_request_response.go b/fleetappsmanagement/create_fleet_resource_request_response.go new file mode 100644 index 0000000000..8bdaaca021 --- /dev/null +++ b/fleetappsmanagement/create_fleet_resource_request_response.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateFleetResourceRequest wrapper for the CreateFleetResource operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleetResource.go.html to see an example of how to use CreateFleetResourceRequest. +type CreateFleetResourceRequest struct { + + // Details for the new FleetResource. + CreateFleetResourceDetails `contributesTo:"body"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 CreateFleetResourceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateFleetResourceRequest) 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 CreateFleetResourceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateFleetResourceRequest) 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 CreateFleetResourceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateFleetResourceResponse wrapper for the CreateFleetResource operation +type CreateFleetResourceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FleetResource instance + FleetResource `presentIn:"body"` + + // URL for the created fleetResource, the fleetResource id will be generated after this request is sent. + Location *string `presentIn:"header" name:"location"` + + // Same as location + 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 work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateFleetResourceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateFleetResourceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/create_maintenance_window_details.go b/fleetappsmanagement/create_maintenance_window_details.go new file mode 100644 index 0000000000..83f7717dfa --- /dev/null +++ b/fleetappsmanagement/create_maintenance_window_details.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateMaintenanceWindowDetails The information about new MaintenanceWindow. +type CreateMaintenanceWindowDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Duration if schedule type is Custom + Duration *string `mandatory:"true" json:"duration"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Does the maintenenace window cause outage? + IsOutage *bool `mandatory:"false" json:"isOutage"` + + // Type of maintenenace window + MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` + + // Start time of schedule + TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` + + // Is this is a recurring maintenance window + IsRecurring *bool `mandatory:"false" json:"isRecurring"` + + // Recurrence rule specification if recurring + Recurrences *string `mandatory:"false" json:"recurrences"` + + // Task initiation cutoff + TaskInitiationCutoff *int `mandatory:"false" json:"taskInitiationCutoff"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateMaintenanceWindowDetails) 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 CreateMaintenanceWindowDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingMaintenanceWindowTypeEnum(string(m.MaintenanceWindowType)); !ok && m.MaintenanceWindowType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceWindowType: %s. Supported values are: %s.", m.MaintenanceWindowType, strings.Join(GetMaintenanceWindowTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/create_maintenance_window_request_response.go b/fleetappsmanagement/create_maintenance_window_request_response.go new file mode 100644 index 0000000000..6a00d8732a --- /dev/null +++ b/fleetappsmanagement/create_maintenance_window_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateMaintenanceWindowRequest wrapper for the CreateMaintenanceWindow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateMaintenanceWindow.go.html to see an example of how to use CreateMaintenanceWindowRequest. +type CreateMaintenanceWindowRequest struct { + + // Details for the new MaintenanceWindow. + CreateMaintenanceWindowDetails `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 CreateMaintenanceWindowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateMaintenanceWindowRequest) 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 CreateMaintenanceWindowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateMaintenanceWindowRequest) 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 CreateMaintenanceWindowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateMaintenanceWindowResponse wrapper for the CreateMaintenanceWindow operation +type CreateMaintenanceWindowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MaintenanceWindow instance + MaintenanceWindow `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateMaintenanceWindowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateMaintenanceWindowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/create_onboarding_details.go b/fleetappsmanagement/create_onboarding_details.go new file mode 100644 index 0000000000..ad71dbc07a --- /dev/null +++ b/fleetappsmanagement/create_onboarding_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOnboardingDetails The information about enabling onboarding. +type CreateOnboardingDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A value determining FAMS tag is enabled or not + IsFamsTagEnabled *bool `mandatory:"false" json:"isFamsTagEnabled"` + + // A value determining if cost tracking tag is enabled or not + IsCostTrackingTagEnabled *bool `mandatory:"false" json:"isCostTrackingTagEnabled"` +} + +func (m CreateOnboardingDetails) 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 CreateOnboardingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/create_onboarding_request_response.go b/fleetappsmanagement/create_onboarding_request_response.go new file mode 100644 index 0000000000..5882698375 --- /dev/null +++ b/fleetappsmanagement/create_onboarding_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateOnboardingRequest wrapper for the CreateOnboarding operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateOnboarding.go.html to see an example of how to use CreateOnboardingRequest. +type CreateOnboardingRequest struct { + + // Details for onboarding FAMS. + CreateOnboardingDetails `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 CreateOnboardingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateOnboardingRequest) 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 CreateOnboardingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateOnboardingRequest) 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 CreateOnboardingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateOnboardingResponse wrapper for the CreateOnboarding operation +type CreateOnboardingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Onboarding instance + Onboarding `presentIn:"body"` + + // URL for the created Onboarding, the Onboarding id will be generated after this request is sent. + Location *string `presentIn:"header" name:"location"` + + // Same as location + 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 work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateOnboardingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateOnboardingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/create_property_details.go b/fleetappsmanagement/create_property_details.go new file mode 100644 index 0000000000..591e545472 --- /dev/null +++ b/fleetappsmanagement/create_property_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePropertyDetails The information about new Property. +type CreatePropertyDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Text selection of the category + Selection SelectionEnum `mandatory:"true" json:"selection"` + + // Format of the value + ValueType ValueTypeEnum `mandatory:"true" json:"valueType"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Values of the property (must be a single value if selection = 'single choice') + Values []string `mandatory:"false" json:"values"` +} + +func (m CreatePropertyDetails) 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 CreatePropertyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSelectionEnum(string(m.Selection)); !ok && m.Selection != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Selection: %s. Supported values are: %s.", m.Selection, strings.Join(GetSelectionEnumStringValues(), ","))) + } + if _, ok := GetMappingValueTypeEnum(string(m.ValueType)); !ok && m.ValueType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ValueType: %s. Supported values are: %s.", m.ValueType, strings.Join(GetValueTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/create_property_request_response.go b/fleetappsmanagement/create_property_request_response.go new file mode 100644 index 0000000000..af7f1442c3 --- /dev/null +++ b/fleetappsmanagement/create_property_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePropertyRequest wrapper for the CreateProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateProperty.go.html to see an example of how to use CreatePropertyRequest. +type CreatePropertyRequest struct { + + // Details for the new Property. + CreatePropertyDetails `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 CreatePropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePropertyRequest) 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 CreatePropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePropertyRequest) 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 CreatePropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePropertyResponse wrapper for the CreateProperty operation +type CreatePropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Property instance + Property `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/create_scheduler_definition_details.go b/fleetappsmanagement/create_scheduler_definition_details.go new file mode 100644 index 0000000000..ce3849586e --- /dev/null +++ b/fleetappsmanagement/create_scheduler_definition_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateSchedulerDefinitionDetails The information about new SchedulerDefinition. +type CreateSchedulerDefinitionDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + Schedule *Schedule `mandatory:"true" json:"schedule"` + + // Action Groups associated with the Schedule. + ActionGroups []ActionGroup `mandatory:"true" json:"actionGroups"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Activity Initiation Cut Off + ActivityInitiationCutOff *int `mandatory:"false" json:"activityInitiationCutOff"` + + // Runbooks. + RunBooks []OperationRunbook `mandatory:"false" json:"runBooks"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateSchedulerDefinitionDetails) 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 CreateSchedulerDefinitionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/create_scheduler_definition_request_response.go b/fleetappsmanagement/create_scheduler_definition_request_response.go new file mode 100644 index 0000000000..05e8c5e04d --- /dev/null +++ b/fleetappsmanagement/create_scheduler_definition_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateSchedulerDefinitionRequest wrapper for the CreateSchedulerDefinition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateSchedulerDefinition.go.html to see an example of how to use CreateSchedulerDefinitionRequest. +type CreateSchedulerDefinitionRequest struct { + + // Details for the new SchedulerDefinition. + CreateSchedulerDefinitionDetails `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 CreateSchedulerDefinitionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSchedulerDefinitionRequest) 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 CreateSchedulerDefinitionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSchedulerDefinitionRequest) 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 CreateSchedulerDefinitionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateSchedulerDefinitionResponse wrapper for the CreateSchedulerDefinition operation +type CreateSchedulerDefinitionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SchedulerDefinition instance + SchedulerDefinition `presentIn:"body"` + + // URL for the created schedulerDefinition, the schedulerDefinition id will be generated after this request is sent. + Location *string `presentIn:"header" name:"location"` + + // Same as location + 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 work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateSchedulerDefinitionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSchedulerDefinitionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/credential_details.go b/fleetappsmanagement/credential_details.go new file mode 100644 index 0000000000..75c2de0000 --- /dev/null +++ b/fleetappsmanagement/credential_details.go @@ -0,0 +1,132 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CredentialDetails Credential Details +type CredentialDetails interface { +} + +type credentialdetails struct { + JsonData []byte + CredentialType string `json:"credentialType"` +} + +// UnmarshalJSON unmarshals json +func (m *credentialdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercredentialdetails credentialdetails + s := struct { + Model Unmarshalercredentialdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CredentialType = s.Model.CredentialType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *credentialdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CredentialType { + case "PLAIN_TEXT": + mm := PlainTextCredentialDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "KEY_ENCRYPTION": + mm := KeyEncryptionCredentialDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "VAULT_SECRET": + mm := VaultSecretCredentialDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CredentialDetails: %s.", m.CredentialType) + return *m, nil + } +} + +func (m credentialdetails) 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 credentialdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CredentialDetailsCredentialTypeEnum Enum with underlying type: string +type CredentialDetailsCredentialTypeEnum string + +// Set of constants representing the allowable values for CredentialDetailsCredentialTypeEnum +const ( + CredentialDetailsCredentialTypePlainText CredentialDetailsCredentialTypeEnum = "PLAIN_TEXT" + CredentialDetailsCredentialTypeVaultSecret CredentialDetailsCredentialTypeEnum = "VAULT_SECRET" + CredentialDetailsCredentialTypeKeyEncryption CredentialDetailsCredentialTypeEnum = "KEY_ENCRYPTION" +) + +var mappingCredentialDetailsCredentialTypeEnum = map[string]CredentialDetailsCredentialTypeEnum{ + "PLAIN_TEXT": CredentialDetailsCredentialTypePlainText, + "VAULT_SECRET": CredentialDetailsCredentialTypeVaultSecret, + "KEY_ENCRYPTION": CredentialDetailsCredentialTypeKeyEncryption, +} + +var mappingCredentialDetailsCredentialTypeEnumLowerCase = map[string]CredentialDetailsCredentialTypeEnum{ + "plain_text": CredentialDetailsCredentialTypePlainText, + "vault_secret": CredentialDetailsCredentialTypeVaultSecret, + "key_encryption": CredentialDetailsCredentialTypeKeyEncryption, +} + +// GetCredentialDetailsCredentialTypeEnumValues Enumerates the set of values for CredentialDetailsCredentialTypeEnum +func GetCredentialDetailsCredentialTypeEnumValues() []CredentialDetailsCredentialTypeEnum { + values := make([]CredentialDetailsCredentialTypeEnum, 0) + for _, v := range mappingCredentialDetailsCredentialTypeEnum { + values = append(values, v) + } + return values +} + +// GetCredentialDetailsCredentialTypeEnumStringValues Enumerates the set of values in String for CredentialDetailsCredentialTypeEnum +func GetCredentialDetailsCredentialTypeEnumStringValues() []string { + return []string{ + "PLAIN_TEXT", + "VAULT_SECRET", + "KEY_ENCRYPTION", + } +} + +// GetMappingCredentialDetailsCredentialTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCredentialDetailsCredentialTypeEnum(val string) (CredentialDetailsCredentialTypeEnum, bool) { + enum, ok := mappingCredentialDetailsCredentialTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/credential_entity_specific_details.go b/fleetappsmanagement/credential_entity_specific_details.go new file mode 100644 index 0000000000..30e58c1f03 --- /dev/null +++ b/fleetappsmanagement/credential_entity_specific_details.go @@ -0,0 +1,116 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CredentialEntitySpecificDetails Credential Details +type CredentialEntitySpecificDetails interface { +} + +type credentialentityspecificdetails struct { + JsonData []byte + CredentialLevel string `json:"credentialLevel"` +} + +// UnmarshalJSON unmarshals json +func (m *credentialentityspecificdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercredentialentityspecificdetails credentialentityspecificdetails + s := struct { + Model Unmarshalercredentialentityspecificdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CredentialLevel = s.Model.CredentialLevel + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *credentialentityspecificdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CredentialLevel { + case "TARGET": + mm := TargetCredentialEntitySpecificDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CredentialEntitySpecificDetails: %s.", m.CredentialLevel) + return *m, nil + } +} + +func (m credentialentityspecificdetails) 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 credentialentityspecificdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CredentialEntitySpecificDetailsCredentialLevelEnum Enum with underlying type: string +type CredentialEntitySpecificDetailsCredentialLevelEnum string + +// Set of constants representing the allowable values for CredentialEntitySpecificDetailsCredentialLevelEnum +const ( + CredentialEntitySpecificDetailsCredentialLevelTarget CredentialEntitySpecificDetailsCredentialLevelEnum = "TARGET" +) + +var mappingCredentialEntitySpecificDetailsCredentialLevelEnum = map[string]CredentialEntitySpecificDetailsCredentialLevelEnum{ + "TARGET": CredentialEntitySpecificDetailsCredentialLevelTarget, +} + +var mappingCredentialEntitySpecificDetailsCredentialLevelEnumLowerCase = map[string]CredentialEntitySpecificDetailsCredentialLevelEnum{ + "target": CredentialEntitySpecificDetailsCredentialLevelTarget, +} + +// GetCredentialEntitySpecificDetailsCredentialLevelEnumValues Enumerates the set of values for CredentialEntitySpecificDetailsCredentialLevelEnum +func GetCredentialEntitySpecificDetailsCredentialLevelEnumValues() []CredentialEntitySpecificDetailsCredentialLevelEnum { + values := make([]CredentialEntitySpecificDetailsCredentialLevelEnum, 0) + for _, v := range mappingCredentialEntitySpecificDetailsCredentialLevelEnum { + values = append(values, v) + } + return values +} + +// GetCredentialEntitySpecificDetailsCredentialLevelEnumStringValues Enumerates the set of values in String for CredentialEntitySpecificDetailsCredentialLevelEnum +func GetCredentialEntitySpecificDetailsCredentialLevelEnumStringValues() []string { + return []string{ + "TARGET", + } +} + +// GetMappingCredentialEntitySpecificDetailsCredentialLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCredentialEntitySpecificDetailsCredentialLevelEnum(val string) (CredentialEntitySpecificDetailsCredentialLevelEnum, bool) { + enum, ok := mappingCredentialEntitySpecificDetailsCredentialLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/delete_fleet_credential_request_response.go b/fleetappsmanagement/delete_fleet_credential_request_response.go new file mode 100644 index 0000000000..e55a86f06c --- /dev/null +++ b/fleetappsmanagement/delete_fleet_credential_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteFleetCredentialRequest wrapper for the DeleteFleetCredential operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleetCredential.go.html to see an example of how to use DeleteFleetCredentialRequest. +type DeleteFleetCredentialRequest struct { + + // unique FleetCredential identifier + FleetCredentialId *string `mandatory:"true" contributesTo:"path" name:"fleetCredentialId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 DeleteFleetCredentialRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteFleetCredentialRequest) 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 DeleteFleetCredentialRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteFleetCredentialRequest) 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 DeleteFleetCredentialRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteFleetCredentialResponse wrapper for the DeleteFleetCredential operation +type DeleteFleetCredentialResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteFleetCredentialResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteFleetCredentialResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/delete_fleet_property_request_response.go b/fleetappsmanagement/delete_fleet_property_request_response.go new file mode 100644 index 0000000000..474447f9b9 --- /dev/null +++ b/fleetappsmanagement/delete_fleet_property_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteFleetPropertyRequest wrapper for the DeleteFleetProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleetProperty.go.html to see an example of how to use DeleteFleetPropertyRequest. +type DeleteFleetPropertyRequest struct { + + // unique FleetProperty identifier + FleetPropertyId *string `mandatory:"true" contributesTo:"path" name:"fleetPropertyId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 DeleteFleetPropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteFleetPropertyRequest) 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 DeleteFleetPropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteFleetPropertyRequest) 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 DeleteFleetPropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteFleetPropertyResponse wrapper for the DeleteFleetProperty operation +type DeleteFleetPropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteFleetPropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteFleetPropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/delete_fleet_request_response.go b/fleetappsmanagement/delete_fleet_request_response.go new file mode 100644 index 0000000000..45078cd58d --- /dev/null +++ b/fleetappsmanagement/delete_fleet_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteFleetRequest wrapper for the DeleteFleet operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleet.go.html to see an example of how to use DeleteFleetRequest. +type DeleteFleetRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 DeleteFleetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteFleetRequest) 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 DeleteFleetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteFleetRequest) 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 DeleteFleetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteFleetResponse wrapper for the DeleteFleet operation +type DeleteFleetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteFleetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteFleetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/delete_fleet_resource_request_response.go b/fleetappsmanagement/delete_fleet_resource_request_response.go new file mode 100644 index 0000000000..98e2363b58 --- /dev/null +++ b/fleetappsmanagement/delete_fleet_resource_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteFleetResourceRequest wrapper for the DeleteFleetResource operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleetResource.go.html to see an example of how to use DeleteFleetResourceRequest. +type DeleteFleetResourceRequest struct { + + // unique FleetResource identifier + FleetResourceId *string `mandatory:"true" contributesTo:"path" name:"fleetResourceId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 DeleteFleetResourceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteFleetResourceRequest) 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 DeleteFleetResourceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteFleetResourceRequest) 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 DeleteFleetResourceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteFleetResourceResponse wrapper for the DeleteFleetResource operation +type DeleteFleetResourceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteFleetResourceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteFleetResourceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/delete_maintenance_window_request_response.go b/fleetappsmanagement/delete_maintenance_window_request_response.go new file mode 100644 index 0000000000..9bd823458a --- /dev/null +++ b/fleetappsmanagement/delete_maintenance_window_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteMaintenanceWindowRequest wrapper for the DeleteMaintenanceWindow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteMaintenanceWindow.go.html to see an example of how to use DeleteMaintenanceWindowRequest. +type DeleteMaintenanceWindowRequest struct { + + // unique MaintenanceWindow identifier + MaintenanceWindowId *string `mandatory:"true" contributesTo:"path" name:"maintenanceWindowId"` + + // 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 DeleteMaintenanceWindowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteMaintenanceWindowRequest) 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 DeleteMaintenanceWindowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteMaintenanceWindowRequest) 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 DeleteMaintenanceWindowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteMaintenanceWindowResponse wrapper for the DeleteMaintenanceWindow operation +type DeleteMaintenanceWindowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteMaintenanceWindowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteMaintenanceWindowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/delete_property_request_response.go b/fleetappsmanagement/delete_property_request_response.go new file mode 100644 index 0000000000..36ac0f6fcf --- /dev/null +++ b/fleetappsmanagement/delete_property_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePropertyRequest wrapper for the DeleteProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteProperty.go.html to see an example of how to use DeletePropertyRequest. +type DeletePropertyRequest struct { + + // unique Property identifier + PropertyId *string `mandatory:"true" contributesTo:"path" name:"propertyId"` + + // 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 DeletePropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePropertyRequest) 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 DeletePropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePropertyRequest) 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 DeletePropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePropertyResponse wrapper for the DeleteProperty operation +type DeletePropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/delete_scheduler_definition_request_response.go b/fleetappsmanagement/delete_scheduler_definition_request_response.go new file mode 100644 index 0000000000..d55372ae97 --- /dev/null +++ b/fleetappsmanagement/delete_scheduler_definition_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteSchedulerDefinitionRequest wrapper for the DeleteSchedulerDefinition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteSchedulerDefinition.go.html to see an example of how to use DeleteSchedulerDefinitionRequest. +type DeleteSchedulerDefinitionRequest struct { + + // unique SchedulerDefinition identifier + SchedulerDefinitionId *string `mandatory:"true" contributesTo:"path" name:"schedulerDefinitionId"` + + // 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 DeleteSchedulerDefinitionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSchedulerDefinitionRequest) 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 DeleteSchedulerDefinitionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSchedulerDefinitionRequest) 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 DeleteSchedulerDefinitionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteSchedulerDefinitionResponse wrapper for the DeleteSchedulerDefinition operation +type DeleteSchedulerDefinitionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSchedulerDefinitionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSchedulerDefinitionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/delete_scheduler_job_request_response.go b/fleetappsmanagement/delete_scheduler_job_request_response.go new file mode 100644 index 0000000000..3e83240004 --- /dev/null +++ b/fleetappsmanagement/delete_scheduler_job_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteSchedulerJobRequest wrapper for the DeleteSchedulerJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteSchedulerJob.go.html to see an example of how to use DeleteSchedulerJobRequest. +type DeleteSchedulerJobRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // 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 DeleteSchedulerJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSchedulerJobRequest) 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 DeleteSchedulerJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSchedulerJobRequest) 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 DeleteSchedulerJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteSchedulerJobResponse wrapper for the DeleteSchedulerJob operation +type DeleteSchedulerJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSchedulerJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSchedulerJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/details.go b/fleetappsmanagement/details.go new file mode 100644 index 0000000000..9deaaacaa2 --- /dev/null +++ b/fleetappsmanagement/details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Details The details of the task. +type Details struct { + + // The OS for the task + OsType OsTypeEnum `mandatory:"true" json:"osType"` + + // The scope of the task + Scope TaskScopeEnum `mandatory:"true" json:"scope"` + + ExecutionDetails ExecutionDetails `mandatory:"false" json:"executionDetails"` + + // The platform of the runbook. + Platform *string `mandatory:"false" json:"platform"` + + Properties *Properties `mandatory:"false" json:"properties"` +} + +func (m Details) 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 Details) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOsTypeEnum(string(m.OsType)); !ok && m.OsType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsType: %s. Supported values are: %s.", m.OsType, strings.Join(GetOsTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingTaskScopeEnum(string(m.Scope)); !ok && m.Scope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Scope: %s. Supported values are: %s.", m.Scope, strings.Join(GetTaskScopeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *Details) UnmarshalJSON(data []byte) (e error) { + model := struct { + ExecutionDetails executiondetails `json:"executionDetails"` + Platform *string `json:"platform"` + Properties *Properties `json:"properties"` + OsType OsTypeEnum `json:"osType"` + Scope TaskScopeEnum `json:"scope"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ExecutionDetails.UnmarshalPolymorphicJSON(model.ExecutionDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ExecutionDetails = nn.(ExecutionDetails) + } else { + m.ExecutionDetails = nil + } + + m.Platform = model.Platform + + m.Properties = model.Properties + + m.OsType = model.OsType + + m.Scope = model.Scope + + return +} diff --git a/fleetappsmanagement/discovered_target.go b/fleetappsmanagement/discovered_target.go new file mode 100644 index 0000000000..1235e0b6a7 --- /dev/null +++ b/fleetappsmanagement/discovered_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DiscoveredTarget A target that is discovered by the Software discovery process. +type DiscoveredTarget struct { + + // OCID of the Target. + TargetId *string `mandatory:"true" json:"targetId"` + + // Target Name. + TargetName *string `mandatory:"true" json:"targetName"` + + // Product that the target belongs to. + Product *string `mandatory:"true" json:"product"` + + // Unique key that identify the resource that target belongs to. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Current version of Target + Version *string `mandatory:"false" json:"version"` +} + +func (m DiscoveredTarget) 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 DiscoveredTarget) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/entity_execution_details.go b/fleetappsmanagement/entity_execution_details.go new file mode 100644 index 0000000000..78f6f21605 --- /dev/null +++ b/fleetappsmanagement/entity_execution_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EntityExecutionDetails Activity Resource and execution details including outcome. +type EntityExecutionDetails struct { + + // Resource Identifier associated with the Work Request + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Status of the Job at Resource Level + Status JobStatusEnum `mandatory:"true" json:"status"` + + // Resource Display Name + ResourceDisplayName *string `mandatory:"false" json:"resourceDisplayName"` + + // Description of the Work Request + Description *string `mandatory:"false" json:"description"` + + // The sequence of the Resource + Sequence *string `mandatory:"false" json:"sequence"` + + // Targets associated. + Targets []ActivityResourceTarget `mandatory:"false" json:"targets"` + + // The time the task started for the resource. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the task ended for the resource. An RFC3339 formatted datetime string + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` +} + +func (m EntityExecutionDetails) 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 EntityExecutionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJobStatusEnum(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(GetJobStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/execution.go b/fleetappsmanagement/execution.go new file mode 100644 index 0000000000..e874e70f48 --- /dev/null +++ b/fleetappsmanagement/execution.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Execution Task Execution associated with the Job. +type Execution struct { + + // Unique Id assocaited with the Task Execution + Id *string `mandatory:"true" json:"id"` + + // Status of the Task + Status JobStatusEnum `mandatory:"true" json:"status"` + + // The OCID of taskRecord + TaskRecordId *string `mandatory:"false" json:"taskRecordId"` + + // Name of the step + StepName *string `mandatory:"false" json:"stepName"` + + // Unique process reference identifier returned by the execution client + ProcessReferenceId *string `mandatory:"false" json:"processReferenceId"` + + // The sequence of the task + Sequence *string `mandatory:"false" json:"sequence"` + + // Subjects which are tied to the task + Subjects []string `mandatory:"false" json:"subjects"` + + Outcome *Outcome `mandatory:"false" json:"outcome"` + + // Target associated with the execution + TargetId *string `mandatory:"false" json:"targetId"` + + // The time the task started. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the task ended. An RFC3339 formatted datetime string + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Execution) 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 Execution) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJobStatusEnum(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(GetJobStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/execution_collection.go b/fleetappsmanagement/execution_collection.go new file mode 100644 index 0000000000..9ba7c482df --- /dev/null +++ b/fleetappsmanagement/execution_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExecutionCollection Results of a +type ExecutionCollection struct { + + // List of Resource Level Executions. + Items []ExecutionSummary `mandatory:"true" json:"items"` +} + +func (m ExecutionCollection) 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 ExecutionCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/execution_details.go b/fleetappsmanagement/execution_details.go new file mode 100644 index 0000000000..1e32a036ae --- /dev/null +++ b/fleetappsmanagement/execution_details.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExecutionDetails Content Source Details +type ExecutionDetails interface { +} + +type executiondetails struct { + JsonData []byte + ExecutionType string `json:"executionType"` +} + +// UnmarshalJSON unmarshals json +func (m *executiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerexecutiondetails executiondetails + s := struct { + Model Unmarshalerexecutiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.ExecutionType = s.Model.ExecutionType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *executiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ExecutionType { + case "SCRIPT": + mm := ScriptBasedExecutionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "API": + mm := ApiBasedExecutionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ExecutionDetails: %s.", m.ExecutionType) + return *m, nil + } +} + +func (m executiondetails) 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 executiondetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/execution_summary.go b/fleetappsmanagement/execution_summary.go new file mode 100644 index 0000000000..93d708c7b5 --- /dev/null +++ b/fleetappsmanagement/execution_summary.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExecutionSummary Task associated with the Job. +type ExecutionSummary struct { + + // Unique Id assocaited with the Task Execution + Id *string `mandatory:"true" json:"id"` + + // Status of the Task + Status JobStatusEnum `mandatory:"true" json:"status"` + + // The OCID of taskRecord + TaskRecordId *string `mandatory:"false" json:"taskRecordId"` + + // Name of the Step + StepName *string `mandatory:"false" json:"stepName"` + + // Unique process reference identifier returned by the execution client + ProcessReferenceId *string `mandatory:"false" json:"processReferenceId"` + + // The sequence of the task + Sequence *string `mandatory:"false" json:"sequence"` + + // Target associated with the execution + TargetId *string `mandatory:"false" json:"targetId"` + + // The time the task started. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the task ended. An RFC3339 formatted datetime string + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m ExecutionSummary) 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 ExecutionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJobStatusEnum(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(GetJobStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/execution_workflow_details.go b/fleetappsmanagement/execution_workflow_details.go new file mode 100644 index 0000000000..37a8e6c1dc --- /dev/null +++ b/fleetappsmanagement/execution_workflow_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExecutionWorkflowDetails Execution Workflow. +type ExecutionWorkflowDetails struct { + + // Execution Workflow for the runbook. + Workflow []WorkflowGroup `mandatory:"true" json:"workflow"` +} + +func (m ExecutionWorkflowDetails) 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 ExecutionWorkflowDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet.go b/fleetappsmanagement/fleet.go new file mode 100644 index 0000000000..83c37ec8d4 --- /dev/null +++ b/fleetappsmanagement/fleet.go @@ -0,0 +1,325 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Fleet Description of Fleet. +type Fleet struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Type of the Fleet. + FleetType FleetFleetTypeEnum `mandatory:"true" json:"fleetType"` + + // The lifecycle state of the Fleet. + LifecycleState FleetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // 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:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Products associated with the Fleet + Products []string `mandatory:"false" json:"products"` + + // Application Type associated with the Fleet.Applicable for ENVIRONMENT fleet types. + ApplicationType *string `mandatory:"false" json:"applicationType"` + + // Environment Type associated with the Fleet.Applicable for ENVIRONMENT fleet types. + EnvironmentType *string `mandatory:"false" json:"environmentType"` + + // Group Type associated with Group Fleet.Applicable for GROUP fleet types. + GroupType FleetGroupTypeEnum `mandatory:"false" json:"groupType,omitempty"` + + // Type of resource selection in a fleet. + ResourceSelectionType FleetResourceSelectionTypeEnum `mandatory:"false" json:"resourceSelectionType,omitempty"` + + RuleSelectionCriteria *SelectionCriteria `mandatory:"false" json:"ruleSelectionCriteria"` + + NotificationPreferences *NotificationPreferences `mandatory:"false" json:"notificationPreferences"` + + // Resources to be added during fleet creation when Resource selection type is Manual. + Resources []AssociatedFleetResourceDetails `mandatory:"false" json:"resources"` + + // Properties to be added during fleet creation. + Properties []AssociatedFleetPropertyDetails `mandatory:"false" json:"properties"` + + // Credentials to be added during fleet creation. + Credentials []AssociatedFleetCredentialDetails `mandatory:"false" json:"credentials"` + + // A value which represents if auto confirming of the targets can be enabled + IsTargetAutoConfirm *bool `mandatory:"false" json:"isTargetAutoConfirm"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Fleet) 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 Fleet) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetFleetTypeEnum(string(m.FleetType)); !ok && m.FleetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FleetType: %s. Supported values are: %s.", m.FleetType, strings.Join(GetFleetFleetTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetLifecycleStateEnum(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(GetFleetLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingFleetGroupTypeEnum(string(m.GroupType)); !ok && m.GroupType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for GroupType: %s. Supported values are: %s.", m.GroupType, strings.Join(GetFleetGroupTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetResourceSelectionTypeEnum(string(m.ResourceSelectionType)); !ok && m.ResourceSelectionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceSelectionType: %s. Supported values are: %s.", m.ResourceSelectionType, strings.Join(GetFleetResourceSelectionTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FleetFleetTypeEnum Enum with underlying type: string +type FleetFleetTypeEnum string + +// Set of constants representing the allowable values for FleetFleetTypeEnum +const ( + FleetFleetTypeProduct FleetFleetTypeEnum = "PRODUCT" + FleetFleetTypeEnvironment FleetFleetTypeEnum = "ENVIRONMENT" + FleetFleetTypeGeneric FleetFleetTypeEnum = "GENERIC" + FleetFleetTypeGroup FleetFleetTypeEnum = "GROUP" +) + +var mappingFleetFleetTypeEnum = map[string]FleetFleetTypeEnum{ + "PRODUCT": FleetFleetTypeProduct, + "ENVIRONMENT": FleetFleetTypeEnvironment, + "GENERIC": FleetFleetTypeGeneric, + "GROUP": FleetFleetTypeGroup, +} + +var mappingFleetFleetTypeEnumLowerCase = map[string]FleetFleetTypeEnum{ + "product": FleetFleetTypeProduct, + "environment": FleetFleetTypeEnvironment, + "generic": FleetFleetTypeGeneric, + "group": FleetFleetTypeGroup, +} + +// GetFleetFleetTypeEnumValues Enumerates the set of values for FleetFleetTypeEnum +func GetFleetFleetTypeEnumValues() []FleetFleetTypeEnum { + values := make([]FleetFleetTypeEnum, 0) + for _, v := range mappingFleetFleetTypeEnum { + values = append(values, v) + } + return values +} + +// GetFleetFleetTypeEnumStringValues Enumerates the set of values in String for FleetFleetTypeEnum +func GetFleetFleetTypeEnumStringValues() []string { + return []string{ + "PRODUCT", + "ENVIRONMENT", + "GENERIC", + "GROUP", + } +} + +// GetMappingFleetFleetTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetFleetTypeEnum(val string) (FleetFleetTypeEnum, bool) { + enum, ok := mappingFleetFleetTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FleetGroupTypeEnum Enum with underlying type: string +type FleetGroupTypeEnum string + +// Set of constants representing the allowable values for FleetGroupTypeEnum +const ( + FleetGroupTypeEnvironment FleetGroupTypeEnum = "ENVIRONMENT" + FleetGroupTypeProduct FleetGroupTypeEnum = "PRODUCT" +) + +var mappingFleetGroupTypeEnum = map[string]FleetGroupTypeEnum{ + "ENVIRONMENT": FleetGroupTypeEnvironment, + "PRODUCT": FleetGroupTypeProduct, +} + +var mappingFleetGroupTypeEnumLowerCase = map[string]FleetGroupTypeEnum{ + "environment": FleetGroupTypeEnvironment, + "product": FleetGroupTypeProduct, +} + +// GetFleetGroupTypeEnumValues Enumerates the set of values for FleetGroupTypeEnum +func GetFleetGroupTypeEnumValues() []FleetGroupTypeEnum { + values := make([]FleetGroupTypeEnum, 0) + for _, v := range mappingFleetGroupTypeEnum { + values = append(values, v) + } + return values +} + +// GetFleetGroupTypeEnumStringValues Enumerates the set of values in String for FleetGroupTypeEnum +func GetFleetGroupTypeEnumStringValues() []string { + return []string{ + "ENVIRONMENT", + "PRODUCT", + } +} + +// GetMappingFleetGroupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetGroupTypeEnum(val string) (FleetGroupTypeEnum, bool) { + enum, ok := mappingFleetGroupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FleetResourceSelectionTypeEnum Enum with underlying type: string +type FleetResourceSelectionTypeEnum string + +// Set of constants representing the allowable values for FleetResourceSelectionTypeEnum +const ( + FleetResourceSelectionTypeDynamic FleetResourceSelectionTypeEnum = "DYNAMIC" + FleetResourceSelectionTypeManual FleetResourceSelectionTypeEnum = "MANUAL" +) + +var mappingFleetResourceSelectionTypeEnum = map[string]FleetResourceSelectionTypeEnum{ + "DYNAMIC": FleetResourceSelectionTypeDynamic, + "MANUAL": FleetResourceSelectionTypeManual, +} + +var mappingFleetResourceSelectionTypeEnumLowerCase = map[string]FleetResourceSelectionTypeEnum{ + "dynamic": FleetResourceSelectionTypeDynamic, + "manual": FleetResourceSelectionTypeManual, +} + +// GetFleetResourceSelectionTypeEnumValues Enumerates the set of values for FleetResourceSelectionTypeEnum +func GetFleetResourceSelectionTypeEnumValues() []FleetResourceSelectionTypeEnum { + values := make([]FleetResourceSelectionTypeEnum, 0) + for _, v := range mappingFleetResourceSelectionTypeEnum { + values = append(values, v) + } + return values +} + +// GetFleetResourceSelectionTypeEnumStringValues Enumerates the set of values in String for FleetResourceSelectionTypeEnum +func GetFleetResourceSelectionTypeEnumStringValues() []string { + return []string{ + "DYNAMIC", + "MANUAL", + } +} + +// GetMappingFleetResourceSelectionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetResourceSelectionTypeEnum(val string) (FleetResourceSelectionTypeEnum, bool) { + enum, ok := mappingFleetResourceSelectionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FleetLifecycleStateEnum Enum with underlying type: string +type FleetLifecycleStateEnum string + +// Set of constants representing the allowable values for FleetLifecycleStateEnum +const ( + FleetLifecycleStateActive FleetLifecycleStateEnum = "ACTIVE" + FleetLifecycleStateInactive FleetLifecycleStateEnum = "INACTIVE" + FleetLifecycleStateCreating FleetLifecycleStateEnum = "CREATING" + FleetLifecycleStateDeleted FleetLifecycleStateEnum = "DELETED" + FleetLifecycleStateDeleting FleetLifecycleStateEnum = "DELETING" + FleetLifecycleStateFailed FleetLifecycleStateEnum = "FAILED" + FleetLifecycleStateUpdating FleetLifecycleStateEnum = "UPDATING" + FleetLifecycleStateNeedsAttention FleetLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingFleetLifecycleStateEnum = map[string]FleetLifecycleStateEnum{ + "ACTIVE": FleetLifecycleStateActive, + "INACTIVE": FleetLifecycleStateInactive, + "CREATING": FleetLifecycleStateCreating, + "DELETED": FleetLifecycleStateDeleted, + "DELETING": FleetLifecycleStateDeleting, + "FAILED": FleetLifecycleStateFailed, + "UPDATING": FleetLifecycleStateUpdating, + "NEEDS_ATTENTION": FleetLifecycleStateNeedsAttention, +} + +var mappingFleetLifecycleStateEnumLowerCase = map[string]FleetLifecycleStateEnum{ + "active": FleetLifecycleStateActive, + "inactive": FleetLifecycleStateInactive, + "creating": FleetLifecycleStateCreating, + "deleted": FleetLifecycleStateDeleted, + "deleting": FleetLifecycleStateDeleting, + "failed": FleetLifecycleStateFailed, + "updating": FleetLifecycleStateUpdating, + "needs_attention": FleetLifecycleStateNeedsAttention, +} + +// GetFleetLifecycleStateEnumValues Enumerates the set of values for FleetLifecycleStateEnum +func GetFleetLifecycleStateEnumValues() []FleetLifecycleStateEnum { + values := make([]FleetLifecycleStateEnum, 0) + for _, v := range mappingFleetLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetFleetLifecycleStateEnumStringValues Enumerates the set of values in String for FleetLifecycleStateEnum +func GetFleetLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "CREATING", + "DELETED", + "DELETING", + "FAILED", + "UPDATING", + "NEEDS_ATTENTION", + } +} + +// GetMappingFleetLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetLifecycleStateEnum(val string) (FleetLifecycleStateEnum, bool) { + enum, ok := mappingFleetLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/fleet_collection.go b/fleetappsmanagement/fleet_collection.go new file mode 100644 index 0000000000..f1f28b3508 --- /dev/null +++ b/fleetappsmanagement/fleet_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetCollection Results of a fleet search. Contains both FleetSummary items and other information, such as metadata. +type FleetCollection struct { + + // List of fleets. + Items []FleetSummary `mandatory:"true" json:"items"` +} + +func (m FleetCollection) 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 FleetCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_credential.go b/fleetappsmanagement/fleet_credential.go new file mode 100644 index 0000000000..c42d7d0e87 --- /dev/null +++ b/fleetappsmanagement/fleet_credential.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetCredential Description of FleetCredential. +type FleetCredential struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + EntitySpecifics CredentialEntitySpecificDetails `mandatory:"true" json:"entitySpecifics"` + + // The current state of the FleetCredential. + LifecycleState FleetCredentialLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + User CredentialDetails `mandatory:"false" json:"user"` + + Password CredentialDetails `mandatory:"false" json:"password"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetCredential) 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 FleetCredential) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetCredentialLifecycleStateEnum(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(GetFleetCredentialLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *FleetCredential) UnmarshalJSON(data []byte) (e error) { + model := struct { + TimeUpdated *common.SDKTime `json:"timeUpdated"` + User credentialdetails `json:"user"` + Password credentialdetails `json:"password"` + LifecycleDetails *string `json:"lifecycleDetails"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + TimeCreated *common.SDKTime `json:"timeCreated"` + EntitySpecifics credentialentityspecificdetails `json:"entitySpecifics"` + LifecycleState FleetCredentialLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.TimeUpdated = model.TimeUpdated + + nn, e = model.User.UnmarshalPolymorphicJSON(model.User.JsonData) + if e != nil { + return + } + if nn != nil { + m.User = nn.(CredentialDetails) + } else { + m.User = nil + } + + nn, e = model.Password.UnmarshalPolymorphicJSON(model.Password.JsonData) + if e != nil { + return + } + if nn != nil { + m.Password = nn.(CredentialDetails) + } else { + m.Password = nil + } + + m.LifecycleDetails = model.LifecycleDetails + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.DisplayName = model.DisplayName + + m.CompartmentId = model.CompartmentId + + m.TimeCreated = model.TimeCreated + + nn, e = model.EntitySpecifics.UnmarshalPolymorphicJSON(model.EntitySpecifics.JsonData) + if e != nil { + return + } + if nn != nil { + m.EntitySpecifics = nn.(CredentialEntitySpecificDetails) + } else { + m.EntitySpecifics = nil + } + + m.LifecycleState = model.LifecycleState + + return +} + +// FleetCredentialLifecycleStateEnum Enum with underlying type: string +type FleetCredentialLifecycleStateEnum string + +// Set of constants representing the allowable values for FleetCredentialLifecycleStateEnum +const ( + FleetCredentialLifecycleStateActive FleetCredentialLifecycleStateEnum = "ACTIVE" + FleetCredentialLifecycleStateDeleted FleetCredentialLifecycleStateEnum = "DELETED" + FleetCredentialLifecycleStateFailed FleetCredentialLifecycleStateEnum = "FAILED" +) + +var mappingFleetCredentialLifecycleStateEnum = map[string]FleetCredentialLifecycleStateEnum{ + "ACTIVE": FleetCredentialLifecycleStateActive, + "DELETED": FleetCredentialLifecycleStateDeleted, + "FAILED": FleetCredentialLifecycleStateFailed, +} + +var mappingFleetCredentialLifecycleStateEnumLowerCase = map[string]FleetCredentialLifecycleStateEnum{ + "active": FleetCredentialLifecycleStateActive, + "deleted": FleetCredentialLifecycleStateDeleted, + "failed": FleetCredentialLifecycleStateFailed, +} + +// GetFleetCredentialLifecycleStateEnumValues Enumerates the set of values for FleetCredentialLifecycleStateEnum +func GetFleetCredentialLifecycleStateEnumValues() []FleetCredentialLifecycleStateEnum { + values := make([]FleetCredentialLifecycleStateEnum, 0) + for _, v := range mappingFleetCredentialLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetFleetCredentialLifecycleStateEnumStringValues Enumerates the set of values in String for FleetCredentialLifecycleStateEnum +func GetFleetCredentialLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingFleetCredentialLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetCredentialLifecycleStateEnum(val string) (FleetCredentialLifecycleStateEnum, bool) { + enum, ok := mappingFleetCredentialLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/fleet_credential_collection.go b/fleetappsmanagement/fleet_credential_collection.go new file mode 100644 index 0000000000..68f13dd23b --- /dev/null +++ b/fleetappsmanagement/fleet_credential_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetCredentialCollection Results of a fleetCredential search. Contains boh FleetCredentialSummary items and other information, such as metadata. +type FleetCredentialCollection struct { + + // List of fleetCredentials. + Items []FleetCredentialSummary `mandatory:"true" json:"items"` +} + +func (m FleetCredentialCollection) 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 FleetCredentialCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_credential_summary.go b/fleetappsmanagement/fleet_credential_summary.go new file mode 100644 index 0000000000..5abfc59df7 --- /dev/null +++ b/fleetappsmanagement/fleet_credential_summary.go @@ -0,0 +1,144 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetCredentialSummary Summary of the FleetCredential. +type FleetCredentialSummary struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + EntitySpecifics CredentialEntitySpecificDetails `mandatory:"true" json:"entitySpecifics"` + + // The current state of the FleetCredential. + LifecycleState FleetCredentialLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Tenancy OCID + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + User CredentialDetails `mandatory:"false" json:"user"` + + Password CredentialDetails `mandatory:"false" json:"password"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetCredentialSummary) 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 FleetCredentialSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetCredentialLifecycleStateEnum(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(GetFleetCredentialLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *FleetCredentialSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompartmentId *string `json:"compartmentId"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + User credentialdetails `json:"user"` + Password credentialdetails `json:"password"` + LifecycleDetails *string `json:"lifecycleDetails"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + TimeCreated *common.SDKTime `json:"timeCreated"` + EntitySpecifics credentialentityspecificdetails `json:"entitySpecifics"` + LifecycleState FleetCredentialLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompartmentId = model.CompartmentId + + m.TimeUpdated = model.TimeUpdated + + nn, e = model.User.UnmarshalPolymorphicJSON(model.User.JsonData) + if e != nil { + return + } + if nn != nil { + m.User = nn.(CredentialDetails) + } else { + m.User = nil + } + + nn, e = model.Password.UnmarshalPolymorphicJSON(model.Password.JsonData) + if e != nil { + return + } + if nn != nil { + m.Password = nn.(CredentialDetails) + } else { + m.Password = nil + } + + m.LifecycleDetails = model.LifecycleDetails + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.DisplayName = model.DisplayName + + m.TimeCreated = model.TimeCreated + + nn, e = model.EntitySpecifics.UnmarshalPolymorphicJSON(model.EntitySpecifics.JsonData) + if e != nil { + return + } + if nn != nil { + m.EntitySpecifics = nn.(CredentialEntitySpecificDetails) + } else { + m.EntitySpecifics = nil + } + + m.LifecycleState = model.LifecycleState + + return +} diff --git a/fleetappsmanagement/fleet_product_collection.go b/fleetappsmanagement/fleet_product_collection.go new file mode 100644 index 0000000000..37f27fb237 --- /dev/null +++ b/fleetappsmanagement/fleet_product_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetProductCollection Results of a fleetProduct search. Contains boh FleetProductSummary items and other information, such as metadata. +type FleetProductCollection struct { + + // List of fleetProducts. + Items []FleetProductSummary `mandatory:"true" json:"items"` +} + +func (m FleetProductCollection) 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 FleetProductCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_product_summary.go b/fleetappsmanagement/fleet_product_summary.go new file mode 100644 index 0000000000..49d8277c6f --- /dev/null +++ b/fleetappsmanagement/fleet_product_summary.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetProductSummary Summary of the FleetProduct. +type FleetProductSummary struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + Resource *TargetResource `mandatory:"true" json:"resource"` + + // Root Compartment Id. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Count of targets associated with the Product + TargetCount *int `mandatory:"false" json:"targetCount"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetProductSummary) 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 FleetProductSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_property.go b/fleetappsmanagement/fleet_property.go new file mode 100644 index 0000000000..dfc60d74db --- /dev/null +++ b/fleetappsmanagement/fleet_property.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetProperty Property associated with a Fleet. +type FleetProperty struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Text selection of the category + SelectionType SelectionEnum `mandatory:"true" json:"selectionType"` + + // Format of the value + ValueType ValueTypeEnum `mandatory:"true" json:"valueType"` + + // The current state of the FleetProperty. + LifecycleState FleetPropertyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Value of the Property + Value *string `mandatory:"false" json:"value"` + + // Property Id Ocid. + PropertyId *string `mandatory:"false" json:"propertyId"` + + // Values of the category (must be a single value if selection = 'single choice') + AllowedValues []string `mandatory:"false" json:"allowedValues"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetProperty) 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 FleetProperty) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSelectionEnum(string(m.SelectionType)); !ok && m.SelectionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SelectionType: %s. Supported values are: %s.", m.SelectionType, strings.Join(GetSelectionEnumStringValues(), ","))) + } + if _, ok := GetMappingValueTypeEnum(string(m.ValueType)); !ok && m.ValueType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ValueType: %s. Supported values are: %s.", m.ValueType, strings.Join(GetValueTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetPropertyLifecycleStateEnum(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(GetFleetPropertyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FleetPropertyLifecycleStateEnum Enum with underlying type: string +type FleetPropertyLifecycleStateEnum string + +// Set of constants representing the allowable values for FleetPropertyLifecycleStateEnum +const ( + FleetPropertyLifecycleStateActive FleetPropertyLifecycleStateEnum = "ACTIVE" + FleetPropertyLifecycleStateDeleted FleetPropertyLifecycleStateEnum = "DELETED" + FleetPropertyLifecycleStateFailed FleetPropertyLifecycleStateEnum = "FAILED" +) + +var mappingFleetPropertyLifecycleStateEnum = map[string]FleetPropertyLifecycleStateEnum{ + "ACTIVE": FleetPropertyLifecycleStateActive, + "DELETED": FleetPropertyLifecycleStateDeleted, + "FAILED": FleetPropertyLifecycleStateFailed, +} + +var mappingFleetPropertyLifecycleStateEnumLowerCase = map[string]FleetPropertyLifecycleStateEnum{ + "active": FleetPropertyLifecycleStateActive, + "deleted": FleetPropertyLifecycleStateDeleted, + "failed": FleetPropertyLifecycleStateFailed, +} + +// GetFleetPropertyLifecycleStateEnumValues Enumerates the set of values for FleetPropertyLifecycleStateEnum +func GetFleetPropertyLifecycleStateEnumValues() []FleetPropertyLifecycleStateEnum { + values := make([]FleetPropertyLifecycleStateEnum, 0) + for _, v := range mappingFleetPropertyLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetFleetPropertyLifecycleStateEnumStringValues Enumerates the set of values in String for FleetPropertyLifecycleStateEnum +func GetFleetPropertyLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingFleetPropertyLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetPropertyLifecycleStateEnum(val string) (FleetPropertyLifecycleStateEnum, bool) { + enum, ok := mappingFleetPropertyLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/fleet_property_collection.go b/fleetappsmanagement/fleet_property_collection.go new file mode 100644 index 0000000000..6e4a37e0cc --- /dev/null +++ b/fleetappsmanagement/fleet_property_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetPropertyCollection Results of a fleetProperty search. Contains boh FleetPropertySummary items and other information, such as metadata. +type FleetPropertyCollection struct { + + // List of fleetPropertys. + Items []FleetPropertySummary `mandatory:"true" json:"items"` +} + +func (m FleetPropertyCollection) 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 FleetPropertyCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_property_summary.go b/fleetappsmanagement/fleet_property_summary.go new file mode 100644 index 0000000000..dd4d0ba7cf --- /dev/null +++ b/fleetappsmanagement/fleet_property_summary.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetPropertySummary Summary of the FleetProperty. +type FleetPropertySummary struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Property Id. + PropertyId *string `mandatory:"true" json:"propertyId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Type of the FleetProperty. + ValueType ValueTypeEnum `mandatory:"true" json:"valueType"` + + // The current state of the FleetProperty. + LifecycleState FleetPropertyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Value of the Property + Value *string `mandatory:"false" json:"value"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetPropertySummary) 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 FleetPropertySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingValueTypeEnum(string(m.ValueType)); !ok && m.ValueType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ValueType: %s. Supported values are: %s.", m.ValueType, strings.Join(GetValueTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetPropertyLifecycleStateEnum(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(GetFleetPropertyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_resource.go b/fleetappsmanagement/fleet_resource.go new file mode 100644 index 0000000000..07fede5914 --- /dev/null +++ b/fleetappsmanagement/fleet_resource.go @@ -0,0 +1,156 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetResource Resource added to a Fleet. +type FleetResource struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // OCID of the tenancy to which the resource belongs to. + TenancyId *string `mandatory:"true" json:"tenancyId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the resource. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Type of the Resource. + ResourceType *string `mandatory:"true" json:"resourceType"` + + // The current state of the FleetResource. + LifecycleState FleetResourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Resource Compartment + Compartment *string `mandatory:"false" json:"compartment"` + + // Compliance State of the Resource + ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + + // Resource Tenancy Name + TenancyName *string `mandatory:"false" json:"tenancyName"` + + // Count of products within the resource. + ProductCount *int `mandatory:"false" json:"productCount"` + + // Count of targets within the resource. + TargetCount *int `mandatory:"false" json:"targetCount"` + + // Product associated with the resource when resource type is fleet.Will only be returned for PRODUCT fleets that are part of a GROUP Fleet + Product *string `mandatory:"false" json:"product"` + + // Application Type associated with the resource when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + ApplicationType *string `mandatory:"false" json:"applicationType"` + + // Environment Type associated with the Fleet when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + EnvironmentType *string `mandatory:"false" json:"environmentType"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetResource) 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 FleetResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetResourceLifecycleStateEnum(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(GetFleetResourceLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FleetResourceLifecycleStateEnum Enum with underlying type: string +type FleetResourceLifecycleStateEnum string + +// Set of constants representing the allowable values for FleetResourceLifecycleStateEnum +const ( + FleetResourceLifecycleStateActive FleetResourceLifecycleStateEnum = "ACTIVE" + FleetResourceLifecycleStateDeleted FleetResourceLifecycleStateEnum = "DELETED" + FleetResourceLifecycleStateFailed FleetResourceLifecycleStateEnum = "FAILED" + FleetResourceLifecycleStateNeedsAttention FleetResourceLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingFleetResourceLifecycleStateEnum = map[string]FleetResourceLifecycleStateEnum{ + "ACTIVE": FleetResourceLifecycleStateActive, + "DELETED": FleetResourceLifecycleStateDeleted, + "FAILED": FleetResourceLifecycleStateFailed, + "NEEDS_ATTENTION": FleetResourceLifecycleStateNeedsAttention, +} + +var mappingFleetResourceLifecycleStateEnumLowerCase = map[string]FleetResourceLifecycleStateEnum{ + "active": FleetResourceLifecycleStateActive, + "deleted": FleetResourceLifecycleStateDeleted, + "failed": FleetResourceLifecycleStateFailed, + "needs_attention": FleetResourceLifecycleStateNeedsAttention, +} + +// GetFleetResourceLifecycleStateEnumValues Enumerates the set of values for FleetResourceLifecycleStateEnum +func GetFleetResourceLifecycleStateEnumValues() []FleetResourceLifecycleStateEnum { + values := make([]FleetResourceLifecycleStateEnum, 0) + for _, v := range mappingFleetResourceLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetFleetResourceLifecycleStateEnumStringValues Enumerates the set of values in String for FleetResourceLifecycleStateEnum +func GetFleetResourceLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + "NEEDS_ATTENTION", + } +} + +// GetMappingFleetResourceLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetResourceLifecycleStateEnum(val string) (FleetResourceLifecycleStateEnum, bool) { + enum, ok := mappingFleetResourceLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/fleet_resource_collection.go b/fleetappsmanagement/fleet_resource_collection.go new file mode 100644 index 0000000000..b627d4cfdc --- /dev/null +++ b/fleetappsmanagement/fleet_resource_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetResourceCollection Results of a fleetResource search. Contains boh FleetResourceSummary items and other information, such as metadata. +type FleetResourceCollection struct { + + // List of fleetResources. + Items []FleetResourceSummary `mandatory:"true" json:"items"` +} + +func (m FleetResourceCollection) 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 FleetResourceCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_resource_summary.go b/fleetappsmanagement/fleet_resource_summary.go new file mode 100644 index 0000000000..2e37120156 --- /dev/null +++ b/fleetappsmanagement/fleet_resource_summary.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetResourceSummary Summary of the FleetResource. +type FleetResourceSummary struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // OCID of the tenancy to which the resource belongs to. + TenancyId *string `mandatory:"true" json:"tenancyId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the resource. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Type of the Resource. + ResourceType *string `mandatory:"true" json:"resourceType"` + + // The current state of the FleetResource. + LifecycleState FleetResourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Compliance State of the Resource + ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + + // Resource Tenancy Name + TenancyName *string `mandatory:"false" json:"tenancyName"` + + // Resource Compartment + Compartment *string `mandatory:"false" json:"compartment"` + + // Count of products within the resource. + ProductCount *int `mandatory:"false" json:"productCount"` + + // Count of targets within the resource. + TargetCount *int `mandatory:"false" json:"targetCount"` + + // Product associated with the resource when resource type is fleet.Will only be returned for PRODUCT fleets that are part of a GROUP Fleet + Product *string `mandatory:"false" json:"product"` + + // Application Type associated with the resource when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + ApplicationType *string `mandatory:"false" json:"applicationType"` + + // Environment Type associated with the Fleet when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + EnvironmentType *string `mandatory:"false" json:"environmentType"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetResourceSummary) 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 FleetResourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetResourceLifecycleStateEnum(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(GetFleetResourceLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_summary.go b/fleetappsmanagement/fleet_summary.go new file mode 100644 index 0000000000..10f53e0da6 --- /dev/null +++ b/fleetappsmanagement/fleet_summary.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetSummary Summary of the Fleet. +type FleetSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Type of the Fleet. + FleetType FleetFleetTypeEnum `mandatory:"true" json:"fleetType"` + + // The current state of the Fleet. + LifecycleState FleetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Environment Type associated with the Fleet.Applicable for ENVIRONMENT fleet types. + EnvironmentType *string `mandatory:"false" json:"environmentType"` + + // 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"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetSummary) 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 FleetSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetFleetTypeEnum(string(m.FleetType)); !ok && m.FleetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FleetType: %s. Supported values are: %s.", m.FleetType, strings.Join(GetFleetFleetTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetLifecycleStateEnum(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(GetFleetLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_target.go b/fleetappsmanagement/fleet_target.go new file mode 100644 index 0000000000..9816329a02 --- /dev/null +++ b/fleetappsmanagement/fleet_target.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetTarget Description of FleetTarget. +type FleetTarget struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Current version of Target + Version *string `mandatory:"false" json:"version"` + + // Product to which the target belongs to. + Product *string `mandatory:"false" json:"product"` + + Resource *TargetResource `mandatory:"false" json:"resource"` + + // Last known compliance state of Target. + ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + + // The current state of the FleetTarget. + LifecycleState FleetTargetLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetTarget) 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 FleetTarget) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetTargetLifecycleStateEnum(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(GetFleetTargetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FleetTargetLifecycleStateEnum Enum with underlying type: string +type FleetTargetLifecycleStateEnum string + +// Set of constants representing the allowable values for FleetTargetLifecycleStateEnum +const ( + FleetTargetLifecycleStateActive FleetTargetLifecycleStateEnum = "ACTIVE" + FleetTargetLifecycleStateDeleted FleetTargetLifecycleStateEnum = "DELETED" + FleetTargetLifecycleStateFailed FleetTargetLifecycleStateEnum = "FAILED" +) + +var mappingFleetTargetLifecycleStateEnum = map[string]FleetTargetLifecycleStateEnum{ + "ACTIVE": FleetTargetLifecycleStateActive, + "DELETED": FleetTargetLifecycleStateDeleted, + "FAILED": FleetTargetLifecycleStateFailed, +} + +var mappingFleetTargetLifecycleStateEnumLowerCase = map[string]FleetTargetLifecycleStateEnum{ + "active": FleetTargetLifecycleStateActive, + "deleted": FleetTargetLifecycleStateDeleted, + "failed": FleetTargetLifecycleStateFailed, +} + +// GetFleetTargetLifecycleStateEnumValues Enumerates the set of values for FleetTargetLifecycleStateEnum +func GetFleetTargetLifecycleStateEnumValues() []FleetTargetLifecycleStateEnum { + values := make([]FleetTargetLifecycleStateEnum, 0) + for _, v := range mappingFleetTargetLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetFleetTargetLifecycleStateEnumStringValues Enumerates the set of values in String for FleetTargetLifecycleStateEnum +func GetFleetTargetLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingFleetTargetLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFleetTargetLifecycleStateEnum(val string) (FleetTargetLifecycleStateEnum, bool) { + enum, ok := mappingFleetTargetLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/fleet_target_collection.go b/fleetappsmanagement/fleet_target_collection.go new file mode 100644 index 0000000000..2d66561c68 --- /dev/null +++ b/fleetappsmanagement/fleet_target_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetTargetCollection Results of a fleetTarget search. Contains both FleetTargetSummary items and other information, such as metadata. +type FleetTargetCollection struct { + + // List of fleetTargets. + Items []FleetTargetSummary `mandatory:"true" json:"items"` +} + +func (m FleetTargetCollection) 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 FleetTargetCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleet_target_summary.go b/fleetappsmanagement/fleet_target_summary.go new file mode 100644 index 0000000000..5919a85a67 --- /dev/null +++ b/fleetappsmanagement/fleet_target_summary.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetTargetSummary Summary of the FleetTarget. +type FleetTargetSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Current version of Target + Version *string `mandatory:"false" json:"version"` + + // Product to which the target belongs to. + Product *string `mandatory:"false" json:"product"` + + Resource *TargetResource `mandatory:"false" json:"resource"` + + // Last known compliance state of Target. + ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + + // The current state of the FleetTarget. + LifecycleState FleetTargetLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m FleetTargetSummary) 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 FleetTargetSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetTargetLifecycleStateEnum(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(GetFleetTargetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/fleetappsmanagement_client.go b/fleetappsmanagement/fleetappsmanagement_client.go new file mode 100644 index 0000000000..a982c2cd4d --- /dev/null +++ b/fleetappsmanagement/fleetappsmanagement_client.go @@ -0,0 +1,2169 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// FleetAppsManagementClient a client for FleetAppsManagement +type FleetAppsManagementClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewFleetAppsManagementClientWithConfigurationProvider Creates a new default FleetAppsManagement client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewFleetAppsManagementClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FleetAppsManagementClient, err error) { + if enabled := common.CheckForEnabledServices("fleetappsmanagement"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newFleetAppsManagementClientFromBaseClient(baseClient, provider) +} + +// NewFleetAppsManagementClientWithOboToken Creates a new default FleetAppsManagement client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewFleetAppsManagementClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client FleetAppsManagementClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newFleetAppsManagementClientFromBaseClient(baseClient, configProvider) +} + +func newFleetAppsManagementClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client FleetAppsManagementClient, err error) { + // FleetAppsManagement service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("FleetAppsManagement")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = FleetAppsManagementClient{BaseClient: baseClient} + client.BasePath = "20230831" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *FleetAppsManagementClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("fleetappsmanagement", "https://fams.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *FleetAppsManagementClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *FleetAppsManagementClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CheckResourceTagging Check if FAMS tags can be added for the resources +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CheckResourceTagging.go.html to see an example of how to use CheckResourceTagging API. +// A default retry strategy applies to this operation CheckResourceTagging() +func (client FleetAppsManagementClient) CheckResourceTagging(ctx context.Context, request CheckResourceTaggingRequest) (response CheckResourceTaggingResponse, 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.checkResourceTagging, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CheckResourceTaggingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CheckResourceTaggingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CheckResourceTaggingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CheckResourceTaggingResponse") + } + return +} + +// checkResourceTagging implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) checkResourceTagging(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets/actions/checkResourceTagging", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CheckResourceTaggingResponse + 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, "FleetAppsManagement", "CheckResourceTagging", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ConfirmTargets Confirm targets to be managed for a Fleet.Only targets that are confirmed will be managed by FAMS +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ConfirmTargets.go.html to see an example of how to use ConfirmTargets API. +// A default retry strategy applies to this operation ConfirmTargets() +func (client FleetAppsManagementClient) ConfirmTargets(ctx context.Context, request ConfirmTargetsRequest) (response ConfirmTargetsResponse, 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.confirmTargets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ConfirmTargetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ConfirmTargetsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ConfirmTargetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConfirmTargetsResponse") + } + return +} + +// confirmTargets implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) confirmTargets(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/confirmTargets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ConfirmTargetsResponse + 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, "FleetAppsManagement", "ConfirmTargets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateFleet Creates a new fleet instance that includes fleet resources and properties. +// For more information, please see the documentation. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleet.go.html to see an example of how to use CreateFleet API. +// A default retry strategy applies to this operation CreateFleet() +func (client FleetAppsManagementClient) CreateFleet(ctx context.Context, request CreateFleetRequest) (response CreateFleetResponse, 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.createFleet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateFleetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateFleetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateFleetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateFleetResponse") + } + return +} + +// createFleet implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) createFleet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateFleetResponse + 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, "FleetAppsManagement", "CreateFleet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateFleetCredential Creates a new FleetCredential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleetCredential.go.html to see an example of how to use CreateFleetCredential API. +// A default retry strategy applies to this operation CreateFleetCredential() +func (client FleetAppsManagementClient) CreateFleetCredential(ctx context.Context, request CreateFleetCredentialRequest) (response CreateFleetCredentialResponse, 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.createFleetCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateFleetCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateFleetCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateFleetCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateFleetCredentialResponse") + } + return +} + +// createFleetCredential implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) createFleetCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets/{fleetId}/fleetCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateFleetCredentialResponse + 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, "FleetAppsManagement", "CreateFleetCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateFleetProperty Creates a new FleetProperty. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleetProperty.go.html to see an example of how to use CreateFleetProperty API. +// A default retry strategy applies to this operation CreateFleetProperty() +func (client FleetAppsManagementClient) CreateFleetProperty(ctx context.Context, request CreateFleetPropertyRequest) (response CreateFleetPropertyResponse, 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.createFleetProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateFleetPropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateFleetPropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateFleetPropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateFleetPropertyResponse") + } + return +} + +// createFleetProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) createFleetProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets/{fleetId}/fleetProperties", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateFleetPropertyResponse + 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, "FleetAppsManagement", "CreateFleetProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateFleetResource Creates a new FleetResource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateFleetResource.go.html to see an example of how to use CreateFleetResource API. +// A default retry strategy applies to this operation CreateFleetResource() +func (client FleetAppsManagementClient) CreateFleetResource(ctx context.Context, request CreateFleetResourceRequest) (response CreateFleetResourceResponse, 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.createFleetResource, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateFleetResourceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateFleetResourceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateFleetResourceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateFleetResourceResponse") + } + return +} + +// createFleetResource implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) createFleetResource(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets/{fleetId}/fleetResources", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateFleetResourceResponse + 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, "FleetAppsManagement", "CreateFleetResource", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteFleet Deletes a Fleet resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleet.go.html to see an example of how to use DeleteFleet API. +// A default retry strategy applies to this operation DeleteFleet() +func (client FleetAppsManagementClient) DeleteFleet(ctx context.Context, request DeleteFleetRequest) (response DeleteFleetResponse, 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.deleteFleet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteFleetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteFleetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteFleetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteFleetResponse") + } + return +} + +// deleteFleet implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) deleteFleet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fleets/{fleetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteFleetResponse + 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, "FleetAppsManagement", "DeleteFleet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteFleetCredential Deletes a FleetCredential resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleetCredential.go.html to see an example of how to use DeleteFleetCredential API. +// A default retry strategy applies to this operation DeleteFleetCredential() +func (client FleetAppsManagementClient) DeleteFleetCredential(ctx context.Context, request DeleteFleetCredentialRequest) (response DeleteFleetCredentialResponse, 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.deleteFleetCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteFleetCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteFleetCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteFleetCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteFleetCredentialResponse") + } + return +} + +// deleteFleetCredential implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) deleteFleetCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fleets/{fleetId}/fleetCredentials/{fleetCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteFleetCredentialResponse + 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, "FleetAppsManagement", "DeleteFleetCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteFleetProperty Deletes a FleetProperty resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleetProperty.go.html to see an example of how to use DeleteFleetProperty API. +// A default retry strategy applies to this operation DeleteFleetProperty() +func (client FleetAppsManagementClient) DeleteFleetProperty(ctx context.Context, request DeleteFleetPropertyRequest) (response DeleteFleetPropertyResponse, 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.deleteFleetProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteFleetPropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteFleetPropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteFleetPropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteFleetPropertyResponse") + } + return +} + +// deleteFleetProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) deleteFleetProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fleets/{fleetId}/fleetProperties/{fleetPropertyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteFleetPropertyResponse + 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, "FleetAppsManagement", "DeleteFleetProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteFleetResource Deletes a FleetResource resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleetResource.go.html to see an example of how to use DeleteFleetResource API. +// A default retry strategy applies to this operation DeleteFleetResource() +func (client FleetAppsManagementClient) DeleteFleetResource(ctx context.Context, request DeleteFleetResourceRequest) (response DeleteFleetResourceResponse, 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.deleteFleetResource, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteFleetResourceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteFleetResourceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteFleetResourceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteFleetResourceResponse") + } + return +} + +// deleteFleetResource implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) deleteFleetResource(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fleets/{fleetId}/fleetResources/{fleetResourceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteFleetResourceResponse + 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, "FleetAppsManagement", "DeleteFleetResource", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GenerateComplianceReport Request to generate compliance report for a Fleet +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GenerateComplianceReport.go.html to see an example of how to use GenerateComplianceReport API. +// A default retry strategy applies to this operation GenerateComplianceReport() +func (client FleetAppsManagementClient) GenerateComplianceReport(ctx context.Context, request GenerateComplianceReportRequest) (response GenerateComplianceReportResponse, 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.generateComplianceReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GenerateComplianceReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GenerateComplianceReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GenerateComplianceReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GenerateComplianceReportResponse") + } + return +} + +// generateComplianceReport implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) generateComplianceReport(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/generateComplianceReport", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GenerateComplianceReportResponse + 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, "FleetAppsManagement", "GenerateComplianceReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComplianceReport Retrieve compiane report for a Fleet +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetComplianceReport.go.html to see an example of how to use GetComplianceReport API. +// A default retry strategy applies to this operation GetComplianceReport() +func (client FleetAppsManagementClient) GetComplianceReport(ctx context.Context, request GetComplianceReportRequest) (response GetComplianceReportResponse, 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.getComplianceReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComplianceReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComplianceReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComplianceReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComplianceReportResponse") + } + return +} + +// getComplianceReport implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) getComplianceReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/complianceReports/{complianceReportId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetComplianceReportResponse + 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, "FleetAppsManagement", "GetComplianceReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFleet Gets a Fleet by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleet.go.html to see an example of how to use GetFleet API. +// A default retry strategy applies to this operation GetFleet() +func (client FleetAppsManagementClient) GetFleet(ctx context.Context, request GetFleetRequest) (response GetFleetResponse, 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.getFleet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFleetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFleetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFleetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFleetResponse") + } + return +} + +// getFleet implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) getFleet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetFleetResponse + 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, "FleetAppsManagement", "GetFleet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFleetCredential Gets a FleetCredential by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleetCredential.go.html to see an example of how to use GetFleetCredential API. +// A default retry strategy applies to this operation GetFleetCredential() +func (client FleetAppsManagementClient) GetFleetCredential(ctx context.Context, request GetFleetCredentialRequest) (response GetFleetCredentialResponse, 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.getFleetCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFleetCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFleetCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFleetCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFleetCredentialResponse") + } + return +} + +// getFleetCredential implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) getFleetCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetCredentials/{fleetCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetFleetCredentialResponse + 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, "FleetAppsManagement", "GetFleetCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFleetProperty Gets a FleetProperty by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleetProperty.go.html to see an example of how to use GetFleetProperty API. +// A default retry strategy applies to this operation GetFleetProperty() +func (client FleetAppsManagementClient) GetFleetProperty(ctx context.Context, request GetFleetPropertyRequest) (response GetFleetPropertyResponse, 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.getFleetProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFleetPropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFleetPropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFleetPropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFleetPropertyResponse") + } + return +} + +// getFleetProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) getFleetProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetProperties/{fleetPropertyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetFleetPropertyResponse + 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, "FleetAppsManagement", "GetFleetProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFleetResource Gets a FleetResource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleetResource.go.html to see an example of how to use GetFleetResource API. +// A default retry strategy applies to this operation GetFleetResource() +func (client FleetAppsManagementClient) GetFleetResource(ctx context.Context, request GetFleetResourceRequest) (response GetFleetResourceResponse, 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.getFleetResource, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFleetResourceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFleetResourceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFleetResourceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFleetResourceResponse") + } + return +} + +// getFleetResource implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) getFleetResource(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetResources/{fleetResourceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetFleetResourceResponse + 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, "FleetAppsManagement", "GetFleetResource", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetWorkRequest Gets details of the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client FleetAppsManagementClient) 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 FleetAppsManagementClient) 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 := "" + err = common.PostProcessServiceError(err, "FleetAppsManagement", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAnnouncements Return a list of AnnouncementSummary items +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListAnnouncements.go.html to see an example of how to use ListAnnouncements API. +// A default retry strategy applies to this operation ListAnnouncements() +func (client FleetAppsManagementClient) ListAnnouncements(ctx context.Context, request ListAnnouncementsRequest) (response ListAnnouncementsResponse, 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.listAnnouncements, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAnnouncementsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAnnouncementsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAnnouncementsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAnnouncementsResponse") + } + return +} + +// listAnnouncements implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listAnnouncements(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/announcements", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListAnnouncementsResponse + 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, "FleetAppsManagement", "ListAnnouncements", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFleetCredentials Returns a list of FleetCredentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetCredentials.go.html to see an example of how to use ListFleetCredentials API. +// A default retry strategy applies to this operation ListFleetCredentials() +func (client FleetAppsManagementClient) ListFleetCredentials(ctx context.Context, request ListFleetCredentialsRequest) (response ListFleetCredentialsResponse, 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.listFleetCredentials, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFleetCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFleetCredentialsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFleetCredentialsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFleetCredentialsResponse") + } + return +} + +// listFleetCredentials implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listFleetCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListFleetCredentialsResponse + 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, "FleetAppsManagement", "ListFleetCredentials", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFleetProducts Returns a list of FleetProducts. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetProducts.go.html to see an example of how to use ListFleetProducts API. +// A default retry strategy applies to this operation ListFleetProducts() +func (client FleetAppsManagementClient) ListFleetProducts(ctx context.Context, request ListFleetProductsRequest) (response ListFleetProductsResponse, 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.listFleetProducts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFleetProductsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFleetProductsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFleetProductsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFleetProductsResponse") + } + return +} + +// listFleetProducts implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listFleetProducts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetProducts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListFleetProductsResponse + 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, "FleetAppsManagement", "ListFleetProducts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFleetProperties Returns a list of FleetProperties. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetProperties.go.html to see an example of how to use ListFleetProperties API. +// A default retry strategy applies to this operation ListFleetProperties() +func (client FleetAppsManagementClient) ListFleetProperties(ctx context.Context, request ListFleetPropertiesRequest) (response ListFleetPropertiesResponse, 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.listFleetProperties, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFleetPropertiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFleetPropertiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFleetPropertiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFleetPropertiesResponse") + } + return +} + +// listFleetProperties implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listFleetProperties(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetProperties", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListFleetPropertiesResponse + 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, "FleetAppsManagement", "ListFleetProperties", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFleetResources Returns a list of FleetResources. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetResources.go.html to see an example of how to use ListFleetResources API. +// A default retry strategy applies to this operation ListFleetResources() +func (client FleetAppsManagementClient) ListFleetResources(ctx context.Context, request ListFleetResourcesRequest) (response ListFleetResourcesResponse, 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.listFleetResources, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFleetResourcesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFleetResourcesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFleetResourcesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFleetResourcesResponse") + } + return +} + +// listFleetResources implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listFleetResources(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetResources", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListFleetResourcesResponse + 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, "FleetAppsManagement", "ListFleetResources", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFleetTargets Returns a list of FleetTargets. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetTargets.go.html to see an example of how to use ListFleetTargets API. +// A default retry strategy applies to this operation ListFleetTargets() +func (client FleetAppsManagementClient) ListFleetTargets(ctx context.Context, request ListFleetTargetsRequest) (response ListFleetTargetsResponse, 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.listFleetTargets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFleetTargetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFleetTargetsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFleetTargetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFleetTargetsResponse") + } + return +} + +// listFleetTargets implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listFleetTargets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/fleetTargets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListFleetTargetsResponse + 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, "FleetAppsManagement", "ListFleetTargets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFleets Returns a list of Fleets in the specified Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleets.go.html to see an example of how to use ListFleets API. +// A default retry strategy applies to this operation ListFleets() +func (client FleetAppsManagementClient) ListFleets(ctx context.Context, request ListFleetsRequest) (response ListFleetsResponse, 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.listFleets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFleetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFleetsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFleetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFleetsResponse") + } + return +} + +// listFleets implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listFleets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListFleetsResponse + 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, "FleetAppsManagement", "ListFleets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInventoryResources Returns a list of InventoryResources. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListInventoryResources.go.html to see an example of how to use ListInventoryResources API. +// A default retry strategy applies to this operation ListInventoryResources() +func (client FleetAppsManagementClient) ListInventoryResources(ctx context.Context, request ListInventoryResourcesRequest) (response ListInventoryResourcesResponse, 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.listInventoryResources, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInventoryResourcesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInventoryResourcesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInventoryResourcesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInventoryResourcesResponse") + } + return +} + +// listInventoryResources implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listInventoryResources(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/inventoryResources", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListInventoryResourcesResponse + 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, "FleetAppsManagement", "ListInventoryResources", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTargets Returns a list of FleetTargets. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListTargets.go.html to see an example of how to use ListTargets API. +// A default retry strategy applies to this operation ListTargets() +func (client FleetAppsManagementClient) ListTargets(ctx context.Context, request ListTargetsRequest) (response ListTargetsResponse, 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.listTargets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListTargetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListTargetsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListTargetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTargetsResponse") + } + return +} + +// listTargets implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listTargets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/targets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListTargetsResponse + 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, "FleetAppsManagement", "ListTargets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Returns a (paginated) list of errors for the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client FleetAppsManagementClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "FleetAppsManagement", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Returns a (paginated) list of logs for the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client FleetAppsManagementClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "FleetAppsManagement", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in a compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client FleetAppsManagementClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "FleetAppsManagement", "ListWorkRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RequestResourceValidation Request validation for resources with in a fleet +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/RequestResourceValidation.go.html to see an example of how to use RequestResourceValidation API. +// A default retry strategy applies to this operation RequestResourceValidation() +func (client FleetAppsManagementClient) RequestResourceValidation(ctx context.Context, request RequestResourceValidationRequest) (response RequestResourceValidationResponse, 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.requestResourceValidation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RequestResourceValidationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RequestResourceValidationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RequestResourceValidationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RequestResourceValidationResponse") + } + return +} + +// requestResourceValidation implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) requestResourceValidation(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/requestResourceValidation", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RequestResourceValidationResponse + 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, "FleetAppsManagement", "RequestResourceValidation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RequestTargetDiscovery Confirm targets to be managed for a Fleet.Only targets that are confirmed will be managed by FAMS +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/RequestTargetDiscovery.go.html to see an example of how to use RequestTargetDiscovery API. +// A default retry strategy applies to this operation RequestTargetDiscovery() +func (client FleetAppsManagementClient) RequestTargetDiscovery(ctx context.Context, request RequestTargetDiscoveryRequest) (response RequestTargetDiscoveryResponse, 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.requestTargetDiscovery, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RequestTargetDiscoveryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RequestTargetDiscoveryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RequestTargetDiscoveryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RequestTargetDiscoveryResponse") + } + return +} + +// requestTargetDiscovery implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) requestTargetDiscovery(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/requestTargetDiscovery", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RequestTargetDiscoveryResponse + 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, "FleetAppsManagement", "RequestTargetDiscovery", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateFleet Updates the Fleet +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleet.go.html to see an example of how to use UpdateFleet API. +// A default retry strategy applies to this operation UpdateFleet() +func (client FleetAppsManagementClient) UpdateFleet(ctx context.Context, request UpdateFleetRequest) (response UpdateFleetResponse, 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.updateFleet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateFleetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateFleetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateFleetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateFleetResponse") + } + return +} + +// updateFleet implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) updateFleet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fleets/{fleetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateFleetResponse + 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, "FleetAppsManagement", "UpdateFleet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateFleetCredential Updates the FleetCredential +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleetCredential.go.html to see an example of how to use UpdateFleetCredential API. +// A default retry strategy applies to this operation UpdateFleetCredential() +func (client FleetAppsManagementClient) UpdateFleetCredential(ctx context.Context, request UpdateFleetCredentialRequest) (response UpdateFleetCredentialResponse, 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.updateFleetCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateFleetCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateFleetCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateFleetCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateFleetCredentialResponse") + } + return +} + +// updateFleetCredential implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) updateFleetCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fleets/{fleetId}/fleetCredentials/{fleetCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateFleetCredentialResponse + 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, "FleetAppsManagement", "UpdateFleetCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateFleetProperty Updates the FleetProperty +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleetProperty.go.html to see an example of how to use UpdateFleetProperty API. +// A default retry strategy applies to this operation UpdateFleetProperty() +func (client FleetAppsManagementClient) UpdateFleetProperty(ctx context.Context, request UpdateFleetPropertyRequest) (response UpdateFleetPropertyResponse, 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.updateFleetProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateFleetPropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateFleetPropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateFleetPropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateFleetPropertyResponse") + } + return +} + +// updateFleetProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) updateFleetProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fleets/{fleetId}/fleetProperties/{fleetPropertyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateFleetPropertyResponse + 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, "FleetAppsManagement", "UpdateFleetProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateFleetResource Updates the FleetResource +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleetResource.go.html to see an example of how to use UpdateFleetResource API. +// A default retry strategy applies to this operation UpdateFleetResource() +func (client FleetAppsManagementClient) UpdateFleetResource(ctx context.Context, request UpdateFleetResourceRequest) (response UpdateFleetResourceResponse, 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.updateFleetResource, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateFleetResourceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateFleetResourceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateFleetResourceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateFleetResourceResponse") + } + return +} + +// updateFleetResource implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementClient) updateFleetResource(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fleets/{fleetId}/fleetResources/{fleetResourceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateFleetResourceResponse + 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, "FleetAppsManagement", "UpdateFleetResource", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go new file mode 100644 index 0000000000..8df627e797 --- /dev/null +++ b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go @@ -0,0 +1,567 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// FleetAppsManagementAdminClient a client for FleetAppsManagementAdmin +type FleetAppsManagementAdminClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewFleetAppsManagementAdminClientWithConfigurationProvider Creates a new default FleetAppsManagementAdmin client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewFleetAppsManagementAdminClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FleetAppsManagementAdminClient, err error) { + if enabled := common.CheckForEnabledServices("fleetappsmanagement"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newFleetAppsManagementAdminClientFromBaseClient(baseClient, provider) +} + +// NewFleetAppsManagementAdminClientWithOboToken Creates a new default FleetAppsManagementAdmin client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewFleetAppsManagementAdminClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client FleetAppsManagementAdminClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newFleetAppsManagementAdminClientFromBaseClient(baseClient, configProvider) +} + +func newFleetAppsManagementAdminClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client FleetAppsManagementAdminClient, err error) { + // FleetAppsManagementAdmin service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("FleetAppsManagementAdmin")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = FleetAppsManagementAdminClient{BaseClient: baseClient} + client.BasePath = "20230831" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *FleetAppsManagementAdminClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("fleetappsmanagement", "https://fams.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *FleetAppsManagementAdminClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *FleetAppsManagementAdminClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateOnboarding Onboard a tenant to Fleet Application Management Service +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateOnboarding.go.html to see an example of how to use CreateOnboarding API. +// A default retry strategy applies to this operation CreateOnboarding() +func (client FleetAppsManagementAdminClient) CreateOnboarding(ctx context.Context, request CreateOnboardingRequest) (response CreateOnboardingResponse, 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.createOnboarding, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateOnboardingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateOnboardingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateOnboardingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateOnboardingResponse") + } + return +} + +// createOnboarding implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) createOnboarding(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/Onboardings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateOnboardingResponse + 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, "FleetAppsManagementAdmin", "CreateOnboarding", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateProperty Creates a new Property. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateProperty.go.html to see an example of how to use CreateProperty API. +// A default retry strategy applies to this operation CreateProperty() +func (client FleetAppsManagementAdminClient) CreateProperty(ctx context.Context, request CreatePropertyRequest) (response CreatePropertyResponse, 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.createProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePropertyResponse") + } + return +} + +// createProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) createProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/properties", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePropertyResponse + 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, "FleetAppsManagementAdmin", "CreateProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteProperty Deletes a Property resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteProperty.go.html to see an example of how to use DeleteProperty API. +// A default retry strategy applies to this operation DeleteProperty() +func (client FleetAppsManagementAdminClient) DeleteProperty(ctx context.Context, request DeletePropertyRequest) (response DeletePropertyResponse, 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.deleteProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePropertyResponse") + } + return +} + +// deleteProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) deleteProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/properties/{propertyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePropertyResponse + 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, "FleetAppsManagementAdmin", "DeleteProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetProperty Gets a Property by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetProperty.go.html to see an example of how to use GetProperty API. +// A default retry strategy applies to this operation GetProperty() +func (client FleetAppsManagementAdminClient) GetProperty(ctx context.Context, request GetPropertyRequest) (response GetPropertyResponse, 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.getProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPropertyResponse") + } + return +} + +// getProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) getProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/properties/{propertyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPropertyResponse + 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, "FleetAppsManagementAdmin", "GetProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListOnboardingPolicies Returns a list of onboarding policy information for FAMS. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardingPolicies.go.html to see an example of how to use ListOnboardingPolicies API. +// A default retry strategy applies to this operation ListOnboardingPolicies() +func (client FleetAppsManagementAdminClient) ListOnboardingPolicies(ctx context.Context, request ListOnboardingPoliciesRequest) (response ListOnboardingPoliciesResponse, 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.listOnboardingPolicies, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListOnboardingPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListOnboardingPoliciesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListOnboardingPoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListOnboardingPoliciesResponse") + } + return +} + +// listOnboardingPolicies implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listOnboardingPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/OnboardingPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListOnboardingPoliciesResponse + 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, "FleetAppsManagementAdmin", "ListOnboardingPolicies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListOnboardings Returns a list of onboarding information for the Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardings.go.html to see an example of how to use ListOnboardings API. +// A default retry strategy applies to this operation ListOnboardings() +func (client FleetAppsManagementAdminClient) ListOnboardings(ctx context.Context, request ListOnboardingsRequest) (response ListOnboardingsResponse, 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.listOnboardings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListOnboardingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListOnboardingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListOnboardingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListOnboardingsResponse") + } + return +} + +// listOnboardings implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listOnboardings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/Onboardings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListOnboardingsResponse + 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, "FleetAppsManagementAdmin", "ListOnboardings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListProperties Returns a list of Properties for Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListProperties.go.html to see an example of how to use ListProperties API. +// A default retry strategy applies to this operation ListProperties() +func (client FleetAppsManagementAdminClient) ListProperties(ctx context.Context, request ListPropertiesRequest) (response ListPropertiesResponse, 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.listProperties, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPropertiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPropertiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPropertiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPropertiesResponse") + } + return +} + +// listProperties implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listProperties(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/properties", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListPropertiesResponse + 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, "FleetAppsManagementAdmin", "ListProperties", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateProperty Updates the Property +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateProperty.go.html to see an example of how to use UpdateProperty API. +// A default retry strategy applies to this operation UpdateProperty() +func (client FleetAppsManagementAdminClient) UpdateProperty(ctx context.Context, request UpdatePropertyRequest) (response UpdatePropertyResponse, 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.updateProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePropertyResponse") + } + return +} + +// updateProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) updateProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/properties/{propertyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdatePropertyResponse + 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, "FleetAppsManagementAdmin", "UpdateProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go new file mode 100644 index 0000000000..8cbac0a584 --- /dev/null +++ b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go @@ -0,0 +1,388 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// FleetAppsManagementMaintenanceWindowClient a client for FleetAppsManagementMaintenanceWindow +type FleetAppsManagementMaintenanceWindowClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewFleetAppsManagementMaintenanceWindowClientWithConfigurationProvider Creates a new default FleetAppsManagementMaintenanceWindow client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewFleetAppsManagementMaintenanceWindowClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FleetAppsManagementMaintenanceWindowClient, err error) { + if enabled := common.CheckForEnabledServices("fleetappsmanagement"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newFleetAppsManagementMaintenanceWindowClientFromBaseClient(baseClient, provider) +} + +// NewFleetAppsManagementMaintenanceWindowClientWithOboToken Creates a new default FleetAppsManagementMaintenanceWindow client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewFleetAppsManagementMaintenanceWindowClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client FleetAppsManagementMaintenanceWindowClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newFleetAppsManagementMaintenanceWindowClientFromBaseClient(baseClient, configProvider) +} + +func newFleetAppsManagementMaintenanceWindowClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client FleetAppsManagementMaintenanceWindowClient, err error) { + // FleetAppsManagementMaintenanceWindow service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("FleetAppsManagementMaintenanceWindow")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = FleetAppsManagementMaintenanceWindowClient{BaseClient: baseClient} + client.BasePath = "20230831" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *FleetAppsManagementMaintenanceWindowClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("fleetappsmanagement", "https://fams.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *FleetAppsManagementMaintenanceWindowClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *FleetAppsManagementMaintenanceWindowClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateMaintenanceWindow Creates a new MaintenanceWindow. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateMaintenanceWindow.go.html to see an example of how to use CreateMaintenanceWindow API. +// A default retry strategy applies to this operation CreateMaintenanceWindow() +func (client FleetAppsManagementMaintenanceWindowClient) CreateMaintenanceWindow(ctx context.Context, request CreateMaintenanceWindowRequest) (response CreateMaintenanceWindowResponse, 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.createMaintenanceWindow, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMaintenanceWindowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMaintenanceWindowResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMaintenanceWindowResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMaintenanceWindowResponse") + } + return +} + +// createMaintenanceWindow implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementMaintenanceWindowClient) createMaintenanceWindow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/maintenanceWindows", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMaintenanceWindowResponse + 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, "FleetAppsManagementMaintenanceWindow", "CreateMaintenanceWindow", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMaintenanceWindow Deletes a MaintenanceWindow resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteMaintenanceWindow.go.html to see an example of how to use DeleteMaintenanceWindow API. +// A default retry strategy applies to this operation DeleteMaintenanceWindow() +func (client FleetAppsManagementMaintenanceWindowClient) DeleteMaintenanceWindow(ctx context.Context, request DeleteMaintenanceWindowRequest) (response DeleteMaintenanceWindowResponse, 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.deleteMaintenanceWindow, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMaintenanceWindowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMaintenanceWindowResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMaintenanceWindowResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMaintenanceWindowResponse") + } + return +} + +// deleteMaintenanceWindow implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementMaintenanceWindowClient) deleteMaintenanceWindow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/maintenanceWindows/{maintenanceWindowId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMaintenanceWindowResponse + 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, "FleetAppsManagementMaintenanceWindow", "DeleteMaintenanceWindow", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMaintenanceWindow Gets a MaintenanceWindow by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetMaintenanceWindow.go.html to see an example of how to use GetMaintenanceWindow API. +// A default retry strategy applies to this operation GetMaintenanceWindow() +func (client FleetAppsManagementMaintenanceWindowClient) GetMaintenanceWindow(ctx context.Context, request GetMaintenanceWindowRequest) (response GetMaintenanceWindowResponse, 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.getMaintenanceWindow, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMaintenanceWindowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMaintenanceWindowResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMaintenanceWindowResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMaintenanceWindowResponse") + } + return +} + +// getMaintenanceWindow implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementMaintenanceWindowClient) getMaintenanceWindow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/maintenanceWindows/{maintenanceWindowId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMaintenanceWindowResponse + 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, "FleetAppsManagementMaintenanceWindow", "GetMaintenanceWindow", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListMaintenanceWindows Returns a list of MaintenanceWindows in the specified Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListMaintenanceWindows.go.html to see an example of how to use ListMaintenanceWindows API. +// A default retry strategy applies to this operation ListMaintenanceWindows() +func (client FleetAppsManagementMaintenanceWindowClient) ListMaintenanceWindows(ctx context.Context, request ListMaintenanceWindowsRequest) (response ListMaintenanceWindowsResponse, 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.listMaintenanceWindows, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListMaintenanceWindowsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListMaintenanceWindowsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListMaintenanceWindowsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMaintenanceWindowsResponse") + } + return +} + +// listMaintenanceWindows implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementMaintenanceWindowClient) listMaintenanceWindows(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/maintenanceWindows", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListMaintenanceWindowsResponse + 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, "FleetAppsManagementMaintenanceWindow", "ListMaintenanceWindows", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateMaintenanceWindow Updates the MaintenanceWindow +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateMaintenanceWindow.go.html to see an example of how to use UpdateMaintenanceWindow API. +// A default retry strategy applies to this operation UpdateMaintenanceWindow() +func (client FleetAppsManagementMaintenanceWindowClient) UpdateMaintenanceWindow(ctx context.Context, request UpdateMaintenanceWindowRequest) (response UpdateMaintenanceWindowResponse, 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.updateMaintenanceWindow, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateMaintenanceWindowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateMaintenanceWindowResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateMaintenanceWindowResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateMaintenanceWindowResponse") + } + return +} + +// updateMaintenanceWindow implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementMaintenanceWindowClient) updateMaintenanceWindow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/maintenanceWindows/{maintenanceWindowId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateMaintenanceWindowResponse + 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, "FleetAppsManagementMaintenanceWindow", "UpdateMaintenanceWindow", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go new file mode 100644 index 0000000000..8063b32305 --- /dev/null +++ b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go @@ -0,0 +1,852 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// FleetAppsManagementOperationsClient a client for FleetAppsManagementOperations +type FleetAppsManagementOperationsClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewFleetAppsManagementOperationsClientWithConfigurationProvider Creates a new default FleetAppsManagementOperations client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewFleetAppsManagementOperationsClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FleetAppsManagementOperationsClient, err error) { + if enabled := common.CheckForEnabledServices("fleetappsmanagement"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newFleetAppsManagementOperationsClientFromBaseClient(baseClient, provider) +} + +// NewFleetAppsManagementOperationsClientWithOboToken Creates a new default FleetAppsManagementOperations client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewFleetAppsManagementOperationsClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client FleetAppsManagementOperationsClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newFleetAppsManagementOperationsClientFromBaseClient(baseClient, configProvider) +} + +func newFleetAppsManagementOperationsClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client FleetAppsManagementOperationsClient, err error) { + // FleetAppsManagementOperations service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("FleetAppsManagementOperations")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = FleetAppsManagementOperationsClient{BaseClient: baseClient} + client.BasePath = "20230831" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *FleetAppsManagementOperationsClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("fleetappsmanagement", "https://fams.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *FleetAppsManagementOperationsClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *FleetAppsManagementOperationsClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateSchedulerDefinition Creates a new SchedulerDefinition. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateSchedulerDefinition.go.html to see an example of how to use CreateSchedulerDefinition API. +// A default retry strategy applies to this operation CreateSchedulerDefinition() +func (client FleetAppsManagementOperationsClient) CreateSchedulerDefinition(ctx context.Context, request CreateSchedulerDefinitionRequest) (response CreateSchedulerDefinitionResponse, 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.createSchedulerDefinition, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSchedulerDefinitionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSchedulerDefinitionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSchedulerDefinitionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSchedulerDefinitionResponse") + } + return +} + +// createSchedulerDefinition implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) createSchedulerDefinition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/schedulerDefinitions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateSchedulerDefinitionResponse + 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, "FleetAppsManagementOperations", "CreateSchedulerDefinition", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSchedulerDefinition Deletes a SchedulerDefinition resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteSchedulerDefinition.go.html to see an example of how to use DeleteSchedulerDefinition API. +// A default retry strategy applies to this operation DeleteSchedulerDefinition() +func (client FleetAppsManagementOperationsClient) DeleteSchedulerDefinition(ctx context.Context, request DeleteSchedulerDefinitionRequest) (response DeleteSchedulerDefinitionResponse, 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.deleteSchedulerDefinition, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSchedulerDefinitionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSchedulerDefinitionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSchedulerDefinitionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSchedulerDefinitionResponse") + } + return +} + +// deleteSchedulerDefinition implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) deleteSchedulerDefinition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/schedulerDefinitions/{schedulerDefinitionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteSchedulerDefinitionResponse + 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, "FleetAppsManagementOperations", "DeleteSchedulerDefinition", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSchedulerJob Deletes a SchedulerJob resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteSchedulerJob.go.html to see an example of how to use DeleteSchedulerJob API. +// A default retry strategy applies to this operation DeleteSchedulerJob() +func (client FleetAppsManagementOperationsClient) DeleteSchedulerJob(ctx context.Context, request DeleteSchedulerJobRequest) (response DeleteSchedulerJobResponse, 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.deleteSchedulerJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSchedulerJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSchedulerJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSchedulerJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSchedulerJobResponse") + } + return +} + +// deleteSchedulerJob implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) deleteSchedulerJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/schedulerJobs/{schedulerJobId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteSchedulerJobResponse + 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, "FleetAppsManagementOperations", "DeleteSchedulerJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExecution Gets a JobActivity by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetExecution.go.html to see an example of how to use GetExecution API. +// A default retry strategy applies to this operation GetExecution() +func (client FleetAppsManagementOperationsClient) GetExecution(ctx context.Context, request GetExecutionRequest) (response GetExecutionResponse, 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.getExecution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetExecutionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetExecutionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetExecutionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExecutionResponse") + } + return +} + +// getExecution implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) getExecution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}/jobActivities/{jobActivityId}/resources/{resourceId}/executions/{executionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetExecutionResponse + 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, "FleetAppsManagementOperations", "GetExecution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetJobActivity Gets a JobActivity by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetJobActivity.go.html to see an example of how to use GetJobActivity API. +// A default retry strategy applies to this operation GetJobActivity() +func (client FleetAppsManagementOperationsClient) GetJobActivity(ctx context.Context, request GetJobActivityRequest) (response GetJobActivityResponse, 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.getJobActivity, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetJobActivityResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetJobActivityResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetJobActivityResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetJobActivityResponse") + } + return +} + +// getJobActivity implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) getJobActivity(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}/jobActivities/{jobActivityId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetJobActivityResponse + 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, "FleetAppsManagementOperations", "GetJobActivity", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSchedulerDefinition Gets a SchedulerDefinition by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetSchedulerDefinition.go.html to see an example of how to use GetSchedulerDefinition API. +// A default retry strategy applies to this operation GetSchedulerDefinition() +func (client FleetAppsManagementOperationsClient) GetSchedulerDefinition(ctx context.Context, request GetSchedulerDefinitionRequest) (response GetSchedulerDefinitionResponse, 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.getSchedulerDefinition, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSchedulerDefinitionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSchedulerDefinitionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSchedulerDefinitionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSchedulerDefinitionResponse") + } + return +} + +// getSchedulerDefinition implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) getSchedulerDefinition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerDefinitions/{schedulerDefinitionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetSchedulerDefinitionResponse + 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, "FleetAppsManagementOperations", "GetSchedulerDefinition", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSchedulerJob Gets a SchedulerJob by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetSchedulerJob.go.html to see an example of how to use GetSchedulerJob API. +// A default retry strategy applies to this operation GetSchedulerJob() +func (client FleetAppsManagementOperationsClient) GetSchedulerJob(ctx context.Context, request GetSchedulerJobRequest) (response GetSchedulerJobResponse, 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.getSchedulerJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSchedulerJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSchedulerJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSchedulerJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSchedulerJobResponse") + } + return +} + +// getSchedulerJob implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) getSchedulerJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetSchedulerJobResponse + 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, "FleetAppsManagementOperations", "GetSchedulerJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListExecutions Returns a list of Task Executions for a Resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListExecutions.go.html to see an example of how to use ListExecutions API. +// A default retry strategy applies to this operation ListExecutions() +func (client FleetAppsManagementOperationsClient) ListExecutions(ctx context.Context, request ListExecutionsRequest) (response ListExecutionsResponse, 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.listExecutions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListExecutionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListExecutionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListExecutionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListExecutionsResponse") + } + return +} + +// listExecutions implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listExecutions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}/jobActivities/{jobActivityId}/resources/{resourceId}/executions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListExecutionsResponse + 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, "FleetAppsManagementOperations", "ListExecutions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListScheduledFleets Returns a list of ScheduledFleets +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListScheduledFleets.go.html to see an example of how to use ListScheduledFleets API. +// A default retry strategy applies to this operation ListScheduledFleets() +func (client FleetAppsManagementOperationsClient) ListScheduledFleets(ctx context.Context, request ListScheduledFleetsRequest) (response ListScheduledFleetsResponse, 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.listScheduledFleets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListScheduledFleetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListScheduledFleetsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListScheduledFleetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListScheduledFleetsResponse") + } + return +} + +// listScheduledFleets implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listScheduledFleets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerDefinitions/{schedulerDefinitionId}/scheduledFleets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListScheduledFleetsResponse + 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, "FleetAppsManagementOperations", "ListScheduledFleets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSchedulerDefinitions Returns a list of SchedulerDefinitions. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerDefinitions.go.html to see an example of how to use ListSchedulerDefinitions API. +// A default retry strategy applies to this operation ListSchedulerDefinitions() +func (client FleetAppsManagementOperationsClient) ListSchedulerDefinitions(ctx context.Context, request ListSchedulerDefinitionsRequest) (response ListSchedulerDefinitionsResponse, 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.listSchedulerDefinitions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSchedulerDefinitionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSchedulerDefinitionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSchedulerDefinitionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSchedulerDefinitionsResponse") + } + return +} + +// listSchedulerDefinitions implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listSchedulerDefinitions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerDefinitions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSchedulerDefinitionsResponse + 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, "FleetAppsManagementOperations", "ListSchedulerDefinitions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSchedulerJobs Returns a list of SchedulerJobs. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerJobs.go.html to see an example of how to use ListSchedulerJobs API. +// A default retry strategy applies to this operation ListSchedulerJobs() +func (client FleetAppsManagementOperationsClient) ListSchedulerJobs(ctx context.Context, request ListSchedulerJobsRequest) (response ListSchedulerJobsResponse, 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.listSchedulerJobs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSchedulerJobsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSchedulerJobsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSchedulerJobsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSchedulerJobsResponse") + } + return +} + +// listSchedulerJobs implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listSchedulerJobs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSchedulerJobsResponse + 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, "FleetAppsManagementOperations", "ListSchedulerJobs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateSchedulerDefinition Updates the SchedulerDefinition +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateSchedulerDefinition.go.html to see an example of how to use UpdateSchedulerDefinition API. +// A default retry strategy applies to this operation UpdateSchedulerDefinition() +func (client FleetAppsManagementOperationsClient) UpdateSchedulerDefinition(ctx context.Context, request UpdateSchedulerDefinitionRequest) (response UpdateSchedulerDefinitionResponse, 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.updateSchedulerDefinition, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateSchedulerDefinitionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateSchedulerDefinitionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateSchedulerDefinitionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSchedulerDefinitionResponse") + } + return +} + +// updateSchedulerDefinition implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) updateSchedulerDefinition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/schedulerDefinitions/{schedulerDefinitionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateSchedulerDefinitionResponse + 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, "FleetAppsManagementOperations", "UpdateSchedulerDefinition", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateSchedulerJob Updates the SchedulerJob +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateSchedulerJob.go.html to see an example of how to use UpdateSchedulerJob API. +// A default retry strategy applies to this operation UpdateSchedulerJob() +func (client FleetAppsManagementOperationsClient) UpdateSchedulerJob(ctx context.Context, request UpdateSchedulerJobRequest) (response UpdateSchedulerJobResponse, 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.updateSchedulerJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateSchedulerJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateSchedulerJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateSchedulerJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSchedulerJobResponse") + } + return +} + +// updateSchedulerJob implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) updateSchedulerJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/schedulerJobs/{schedulerJobId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateSchedulerJobResponse + 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, "FleetAppsManagementOperations", "UpdateSchedulerJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go new file mode 100644 index 0000000000..5a5da1a3b4 --- /dev/null +++ b/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go @@ -0,0 +1,325 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// FleetAppsManagementRunbooksClient a client for FleetAppsManagementRunbooks +type FleetAppsManagementRunbooksClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewFleetAppsManagementRunbooksClientWithConfigurationProvider Creates a new default FleetAppsManagementRunbooks client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewFleetAppsManagementRunbooksClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FleetAppsManagementRunbooksClient, err error) { + if enabled := common.CheckForEnabledServices("fleetappsmanagement"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newFleetAppsManagementRunbooksClientFromBaseClient(baseClient, provider) +} + +// NewFleetAppsManagementRunbooksClientWithOboToken Creates a new default FleetAppsManagementRunbooks client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewFleetAppsManagementRunbooksClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client FleetAppsManagementRunbooksClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newFleetAppsManagementRunbooksClientFromBaseClient(baseClient, configProvider) +} + +func newFleetAppsManagementRunbooksClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client FleetAppsManagementRunbooksClient, err error) { + // FleetAppsManagementRunbooks service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("FleetAppsManagementRunbooks")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = FleetAppsManagementRunbooksClient{BaseClient: baseClient} + client.BasePath = "20230831" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *FleetAppsManagementRunbooksClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("fleetappsmanagement", "https://fams.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *FleetAppsManagementRunbooksClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *FleetAppsManagementRunbooksClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// GetRunbook Gets a Runbook by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetRunbook.go.html to see an example of how to use GetRunbook API. +// A default retry strategy applies to this operation GetRunbook() +func (client FleetAppsManagementRunbooksClient) GetRunbook(ctx context.Context, request GetRunbookRequest) (response GetRunbookResponse, 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.getRunbook, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRunbookResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRunbookResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRunbookResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRunbookResponse") + } + return +} + +// getRunbook implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) getRunbook(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/runbooks/{runbookId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRunbookResponse + 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, "FleetAppsManagementRunbooks", "GetRunbook", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetTaskRecord Gets a TaskRecord by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetTaskRecord.go.html to see an example of how to use GetTaskRecord API. +// A default retry strategy applies to this operation GetTaskRecord() +func (client FleetAppsManagementRunbooksClient) GetTaskRecord(ctx context.Context, request GetTaskRecordRequest) (response GetTaskRecordResponse, 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.getTaskRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetTaskRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetTaskRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetTaskRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetTaskRecordResponse") + } + return +} + +// getTaskRecord implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) getTaskRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/taskRecords/{taskRecordId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetTaskRecordResponse + 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, "FleetAppsManagementRunbooks", "GetTaskRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRunbooks Returns a list of Runbooks. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListRunbooks.go.html to see an example of how to use ListRunbooks API. +// A default retry strategy applies to this operation ListRunbooks() +func (client FleetAppsManagementRunbooksClient) ListRunbooks(ctx context.Context, request ListRunbooksRequest) (response ListRunbooksResponse, 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.listRunbooks, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListRunbooksResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListRunbooksResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListRunbooksResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRunbooksResponse") + } + return +} + +// listRunbooks implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) listRunbooks(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/runbooks", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListRunbooksResponse + 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, "FleetAppsManagementRunbooks", "ListRunbooks", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTaskRecords Returns a list of TaskRecords. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListTaskRecords.go.html to see an example of how to use ListTaskRecords API. +// A default retry strategy applies to this operation ListTaskRecords() +func (client FleetAppsManagementRunbooksClient) ListTaskRecords(ctx context.Context, request ListTaskRecordsRequest) (response ListTaskRecordsResponse, 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.listTaskRecords, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListTaskRecordsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListTaskRecordsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListTaskRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTaskRecordsResponse") + } + return +} + +// listTaskRecords implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) listTaskRecords(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/taskRecords", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListTaskRecordsResponse + 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, "FleetAppsManagementRunbooks", "ListTaskRecords", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/fleetappsmanagement/generate_compliance_report_details.go b/fleetappsmanagement/generate_compliance_report_details.go new file mode 100644 index 0000000000..7b57103cc6 --- /dev/null +++ b/fleetappsmanagement/generate_compliance_report_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenerateComplianceReportDetails Request to generate compliance report fort the fleet +type GenerateComplianceReportDetails struct { + + // Are compliance details required at target level also + AreDetailsRequired *string `mandatory:"false" json:"areDetailsRequired"` +} + +func (m GenerateComplianceReportDetails) 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 GenerateComplianceReportDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/generate_compliance_report_request_response.go b/fleetappsmanagement/generate_compliance_report_request_response.go new file mode 100644 index 0000000000..bce691f01a --- /dev/null +++ b/fleetappsmanagement/generate_compliance_report_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GenerateComplianceReportRequest wrapper for the GenerateComplianceReport operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GenerateComplianceReport.go.html to see an example of how to use GenerateComplianceReportRequest. +type GenerateComplianceReportRequest struct { + + // Details for generating Compliance Report fort the Fleet. + GenerateComplianceReportDetails `contributesTo:"body"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 GenerateComplianceReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GenerateComplianceReportRequest) 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 GenerateComplianceReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GenerateComplianceReportRequest) 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 GenerateComplianceReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GenerateComplianceReportResponse wrapper for the GenerateComplianceReport operation +type GenerateComplianceReportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GenerateComplianceReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GenerateComplianceReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_compliance_report_request_response.go b/fleetappsmanagement/get_compliance_report_request_response.go new file mode 100644 index 0000000000..25b2e4c22a --- /dev/null +++ b/fleetappsmanagement/get_compliance_report_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComplianceReportRequest wrapper for the GetComplianceReport operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetComplianceReport.go.html to see an example of how to use GetComplianceReportRequest. +type GetComplianceReportRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // compliance report identifier + ComplianceReportId *string `mandatory:"true" contributesTo:"path" name:"complianceReportId"` + + // 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 GetComplianceReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComplianceReportRequest) 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 GetComplianceReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComplianceReportRequest) 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 GetComplianceReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComplianceReportResponse wrapper for the GetComplianceReport operation +type GetComplianceReportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComplianceReport instance + ComplianceReport `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComplianceReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComplianceReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_execution_request_response.go b/fleetappsmanagement/get_execution_request_response.go new file mode 100644 index 0000000000..bcff626c85 --- /dev/null +++ b/fleetappsmanagement/get_execution_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetExecutionRequest wrapper for the GetExecution operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetExecution.go.html to see an example of how to use GetExecutionRequest. +type GetExecutionRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // unique jobActivity identifier + JobActivityId *string `mandatory:"true" contributesTo:"path" name:"jobActivityId"` + + // unique Resource identifier + ResourceId *string `mandatory:"true" contributesTo:"path" name:"resourceId"` + + // Execution Id + ExecutionId *string `mandatory:"true" contributesTo:"path" name:"executionId"` + + // 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 GetExecutionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExecutionRequest) 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 GetExecutionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExecutionRequest) 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 GetExecutionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetExecutionResponse wrapper for the GetExecution operation +type GetExecutionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Execution instance + Execution `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetExecutionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExecutionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_fleet_credential_request_response.go b/fleetappsmanagement/get_fleet_credential_request_response.go new file mode 100644 index 0000000000..44daf0ba6b --- /dev/null +++ b/fleetappsmanagement/get_fleet_credential_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetFleetCredentialRequest wrapper for the GetFleetCredential operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleetCredential.go.html to see an example of how to use GetFleetCredentialRequest. +type GetFleetCredentialRequest struct { + + // unique FleetCredential identifier + FleetCredentialId *string `mandatory:"true" contributesTo:"path" name:"fleetCredentialId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 GetFleetCredentialRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFleetCredentialRequest) 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 GetFleetCredentialRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFleetCredentialRequest) 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 GetFleetCredentialRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetFleetCredentialResponse wrapper for the GetFleetCredential operation +type GetFleetCredentialResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FleetCredential instance + FleetCredential `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFleetCredentialResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFleetCredentialResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_fleet_property_request_response.go b/fleetappsmanagement/get_fleet_property_request_response.go new file mode 100644 index 0000000000..2fd20d21d6 --- /dev/null +++ b/fleetappsmanagement/get_fleet_property_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetFleetPropertyRequest wrapper for the GetFleetProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleetProperty.go.html to see an example of how to use GetFleetPropertyRequest. +type GetFleetPropertyRequest struct { + + // unique FleetProperty identifier + FleetPropertyId *string `mandatory:"true" contributesTo:"path" name:"fleetPropertyId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 GetFleetPropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFleetPropertyRequest) 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 GetFleetPropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFleetPropertyRequest) 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 GetFleetPropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetFleetPropertyResponse wrapper for the GetFleetProperty operation +type GetFleetPropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FleetProperty instance + FleetProperty `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFleetPropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFleetPropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_fleet_request_response.go b/fleetappsmanagement/get_fleet_request_response.go new file mode 100644 index 0000000000..898a5c4c1b --- /dev/null +++ b/fleetappsmanagement/get_fleet_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetFleetRequest wrapper for the GetFleet operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleet.go.html to see an example of how to use GetFleetRequest. +type GetFleetRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 GetFleetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFleetRequest) 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 GetFleetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFleetRequest) 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 GetFleetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetFleetResponse wrapper for the GetFleet operation +type GetFleetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Fleet instance + Fleet `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFleetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFleetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_fleet_resource_request_response.go b/fleetappsmanagement/get_fleet_resource_request_response.go new file mode 100644 index 0000000000..725d5e1374 --- /dev/null +++ b/fleetappsmanagement/get_fleet_resource_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetFleetResourceRequest wrapper for the GetFleetResource operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleetResource.go.html to see an example of how to use GetFleetResourceRequest. +type GetFleetResourceRequest struct { + + // unique FleetResource identifier + FleetResourceId *string `mandatory:"true" contributesTo:"path" name:"fleetResourceId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 GetFleetResourceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFleetResourceRequest) 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 GetFleetResourceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFleetResourceRequest) 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 GetFleetResourceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetFleetResourceResponse wrapper for the GetFleetResource operation +type GetFleetResourceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FleetResource instance + FleetResource `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFleetResourceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFleetResourceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_job_activity_request_response.go b/fleetappsmanagement/get_job_activity_request_response.go new file mode 100644 index 0000000000..5272dbee74 --- /dev/null +++ b/fleetappsmanagement/get_job_activity_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetJobActivityRequest wrapper for the GetJobActivity operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetJobActivity.go.html to see an example of how to use GetJobActivityRequest. +type GetJobActivityRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // unique jobActivity identifier + JobActivityId *string `mandatory:"true" contributesTo:"path" name:"jobActivityId"` + + // 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 GetJobActivityRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetJobActivityRequest) 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 GetJobActivityRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetJobActivityRequest) 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 GetJobActivityRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetJobActivityResponse wrapper for the GetJobActivity operation +type GetJobActivityResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JobActivity instance + JobActivity `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetJobActivityResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetJobActivityResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_maintenance_window_request_response.go b/fleetappsmanagement/get_maintenance_window_request_response.go new file mode 100644 index 0000000000..e385a9e715 --- /dev/null +++ b/fleetappsmanagement/get_maintenance_window_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetMaintenanceWindowRequest wrapper for the GetMaintenanceWindow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetMaintenanceWindow.go.html to see an example of how to use GetMaintenanceWindowRequest. +type GetMaintenanceWindowRequest struct { + + // unique MaintenanceWindow identifier + MaintenanceWindowId *string `mandatory:"true" contributesTo:"path" name:"maintenanceWindowId"` + + // 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 GetMaintenanceWindowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetMaintenanceWindowRequest) 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 GetMaintenanceWindowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetMaintenanceWindowRequest) 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 GetMaintenanceWindowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetMaintenanceWindowResponse wrapper for the GetMaintenanceWindow operation +type GetMaintenanceWindowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MaintenanceWindow instance + MaintenanceWindow `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetMaintenanceWindowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetMaintenanceWindowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_property_request_response.go b/fleetappsmanagement/get_property_request_response.go new file mode 100644 index 0000000000..d99d8be9d8 --- /dev/null +++ b/fleetappsmanagement/get_property_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPropertyRequest wrapper for the GetProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetProperty.go.html to see an example of how to use GetPropertyRequest. +type GetPropertyRequest struct { + + // unique Property identifier + PropertyId *string `mandatory:"true" contributesTo:"path" name:"propertyId"` + + // 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 GetPropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPropertyRequest) 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 GetPropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPropertyRequest) 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 GetPropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPropertyResponse wrapper for the GetProperty operation +type GetPropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Property instance + Property `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_runbook_request_response.go b/fleetappsmanagement/get_runbook_request_response.go new file mode 100644 index 0000000000..0300a016d1 --- /dev/null +++ b/fleetappsmanagement/get_runbook_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetRunbookRequest wrapper for the GetRunbook operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetRunbook.go.html to see an example of how to use GetRunbookRequest. +type GetRunbookRequest struct { + + // Unique Runbook identifier + RunbookId *string `mandatory:"true" contributesTo:"path" name:"runbookId"` + + // 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 GetRunbookRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRunbookRequest) 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 GetRunbookRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRunbookRequest) 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 GetRunbookRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetRunbookResponse wrapper for the GetRunbook operation +type GetRunbookResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Runbook instance + Runbook `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetRunbookResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRunbookResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_scheduler_definition_request_response.go b/fleetappsmanagement/get_scheduler_definition_request_response.go new file mode 100644 index 0000000000..81c6e4eff6 --- /dev/null +++ b/fleetappsmanagement/get_scheduler_definition_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSchedulerDefinitionRequest wrapper for the GetSchedulerDefinition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetSchedulerDefinition.go.html to see an example of how to use GetSchedulerDefinitionRequest. +type GetSchedulerDefinitionRequest struct { + + // unique SchedulerDefinition identifier + SchedulerDefinitionId *string `mandatory:"true" contributesTo:"path" name:"schedulerDefinitionId"` + + // 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 GetSchedulerDefinitionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSchedulerDefinitionRequest) 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 GetSchedulerDefinitionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSchedulerDefinitionRequest) 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 GetSchedulerDefinitionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSchedulerDefinitionResponse wrapper for the GetSchedulerDefinition operation +type GetSchedulerDefinitionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SchedulerDefinition instance + SchedulerDefinition `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSchedulerDefinitionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSchedulerDefinitionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_scheduler_job_request_response.go b/fleetappsmanagement/get_scheduler_job_request_response.go new file mode 100644 index 0000000000..06d796cedd --- /dev/null +++ b/fleetappsmanagement/get_scheduler_job_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSchedulerJobRequest wrapper for the GetSchedulerJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetSchedulerJob.go.html to see an example of how to use GetSchedulerJobRequest. +type GetSchedulerJobRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // 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 GetSchedulerJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSchedulerJobRequest) 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 GetSchedulerJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSchedulerJobRequest) 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 GetSchedulerJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSchedulerJobResponse wrapper for the GetSchedulerJob operation +type GetSchedulerJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SchedulerJob instance + SchedulerJob `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSchedulerJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSchedulerJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_task_record_request_response.go b/fleetappsmanagement/get_task_record_request_response.go new file mode 100644 index 0000000000..f2fdcbef0b --- /dev/null +++ b/fleetappsmanagement/get_task_record_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetTaskRecordRequest wrapper for the GetTaskRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetTaskRecord.go.html to see an example of how to use GetTaskRecordRequest. +type GetTaskRecordRequest struct { + + // unique TaskDetail identifier + TaskRecordId *string `mandatory:"true" contributesTo:"path" name:"taskRecordId"` + + // 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 GetTaskRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetTaskRecordRequest) 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 GetTaskRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetTaskRecordRequest) 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 GetTaskRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetTaskRecordResponse wrapper for the GetTaskRecord operation +type GetTaskRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TaskRecord instance + TaskRecord `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetTaskRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetTaskRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/get_work_request_request_response.go b/fleetappsmanagement/get_work_request_request_response.go new file mode 100644 index 0000000000..c914159c59 --- /dev/null +++ b/fleetappsmanagement/get_work_request_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetWorkRequest.go.html to see an example of how to use GetWorkRequestRequest. +type GetWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // 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 GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) 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 GetWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) 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 GetWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkRequestResponse wrapper for the GetWorkRequest operation +type GetWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkRequest instance + WorkRequest `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // A decimal number representing the number of seconds the client should wait before polling this endpoint again. + RetryAfter *int `presentIn:"header" name:"retry-after"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/group.go b/fleetappsmanagement/group.go new file mode 100644 index 0000000000..ce8266f4a2 --- /dev/null +++ b/fleetappsmanagement/group.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Group The group of the runbook +type Group struct { + + // The type of the group + Type GroupTypeEnum `mandatory:"true" json:"type"` + + // The name of the group + Name *string `mandatory:"true" json:"name"` + + Properties *ComponentProperties `mandatory:"false" json:"properties"` +} + +func (m Group) 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 Group) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGroupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetGroupTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GroupTypeEnum Enum with underlying type: string +type GroupTypeEnum string + +// Set of constants representing the allowable values for GroupTypeEnum +const ( + GroupTypeParallelTaskGroup GroupTypeEnum = "PARALLEL_TASK_GROUP" + GroupTypeParallelResourceGroup GroupTypeEnum = "PARALLEL_RESOURCE_GROUP" + GroupTypeRollingResourceGroup GroupTypeEnum = "ROLLING_RESOURCE_GROUP" +) + +var mappingGroupTypeEnum = map[string]GroupTypeEnum{ + "PARALLEL_TASK_GROUP": GroupTypeParallelTaskGroup, + "PARALLEL_RESOURCE_GROUP": GroupTypeParallelResourceGroup, + "ROLLING_RESOURCE_GROUP": GroupTypeRollingResourceGroup, +} + +var mappingGroupTypeEnumLowerCase = map[string]GroupTypeEnum{ + "parallel_task_group": GroupTypeParallelTaskGroup, + "parallel_resource_group": GroupTypeParallelResourceGroup, + "rolling_resource_group": GroupTypeRollingResourceGroup, +} + +// GetGroupTypeEnumValues Enumerates the set of values for GroupTypeEnum +func GetGroupTypeEnumValues() []GroupTypeEnum { + values := make([]GroupTypeEnum, 0) + for _, v := range mappingGroupTypeEnum { + values = append(values, v) + } + return values +} + +// GetGroupTypeEnumStringValues Enumerates the set of values in String for GroupTypeEnum +func GetGroupTypeEnumStringValues() []string { + return []string{ + "PARALLEL_TASK_GROUP", + "PARALLEL_RESOURCE_GROUP", + "ROLLING_RESOURCE_GROUP", + } +} + +// GetMappingGroupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGroupTypeEnum(val string) (GroupTypeEnum, bool) { + enum, ok := mappingGroupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/input_argument.go b/fleetappsmanagement/input_argument.go new file mode 100644 index 0000000000..844dadbefa --- /dev/null +++ b/fleetappsmanagement/input_argument.go @@ -0,0 +1,144 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InputArgument The details of the Input argument. +type InputArgument interface { + + // The name of the argument + GetName() *string + + // The description of the argument. + GetDescription() *string +} + +type inputargument struct { + JsonData []byte + Description *string `mandatory:"false" json:"description"` + Name *string `mandatory:"true" json:"name"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *inputargument) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinputargument inputargument + s := struct { + Model Unmarshalerinputargument + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Name = s.Model.Name + m.Description = s.Model.Description + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *inputargument) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "OUTPUT_VARIABLE": + mm := OutputVariableInputArgument{} + err = json.Unmarshal(data, &mm) + return mm, err + case "STRING": + mm := StringInputArgument{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for InputArgument: %s.", m.Type) + return *m, nil + } +} + +// GetDescription returns Description +func (m inputargument) GetDescription() *string { + return m.Description +} + +// GetName returns Name +func (m inputargument) GetName() *string { + return m.Name +} + +func (m inputargument) 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 inputargument) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InputArgumentTypeEnum Enum with underlying type: string +type InputArgumentTypeEnum string + +// Set of constants representing the allowable values for InputArgumentTypeEnum +const ( + InputArgumentTypeString InputArgumentTypeEnum = "STRING" + InputArgumentTypeOutputVariable InputArgumentTypeEnum = "OUTPUT_VARIABLE" +) + +var mappingInputArgumentTypeEnum = map[string]InputArgumentTypeEnum{ + "STRING": InputArgumentTypeString, + "OUTPUT_VARIABLE": InputArgumentTypeOutputVariable, +} + +var mappingInputArgumentTypeEnumLowerCase = map[string]InputArgumentTypeEnum{ + "string": InputArgumentTypeString, + "output_variable": InputArgumentTypeOutputVariable, +} + +// GetInputArgumentTypeEnumValues Enumerates the set of values for InputArgumentTypeEnum +func GetInputArgumentTypeEnumValues() []InputArgumentTypeEnum { + values := make([]InputArgumentTypeEnum, 0) + for _, v := range mappingInputArgumentTypeEnum { + values = append(values, v) + } + return values +} + +// GetInputArgumentTypeEnumStringValues Enumerates the set of values in String for InputArgumentTypeEnum +func GetInputArgumentTypeEnumStringValues() []string { + return []string{ + "STRING", + "OUTPUT_VARIABLE", + } +} + +// GetMappingInputArgumentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInputArgumentTypeEnum(val string) (InputArgumentTypeEnum, bool) { + enum, ok := mappingInputArgumentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/input_parameter.go b/fleetappsmanagement/input_parameter.go new file mode 100644 index 0000000000..53abfc2a3c --- /dev/null +++ b/fleetappsmanagement/input_parameter.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InputParameter Input Parameters for the Task +type InputParameter struct { + + // stepName for which the input parameters are provided + StepName *string `mandatory:"true" json:"stepName"` + + // Arguments for the Task + Arguments []TaskArgument `mandatory:"false" json:"arguments"` +} + +func (m InputParameter) 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 InputParameter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/inventory_resource_collection.go b/fleetappsmanagement/inventory_resource_collection.go new file mode 100644 index 0000000000..35cecb58d9 --- /dev/null +++ b/fleetappsmanagement/inventory_resource_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryResourceCollection Results of a inventoryResource search. Contains both InventoryResourceSummary items and other information, such as metadata. +type InventoryResourceCollection struct { + + // List of InventoryResources. + Items []InventoryResourceSummary `mandatory:"true" json:"items"` +} + +func (m InventoryResourceCollection) 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 InventoryResourceCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/inventory_resource_summary.go b/fleetappsmanagement/inventory_resource_summary.go new file mode 100644 index 0000000000..49659841eb --- /dev/null +++ b/fleetappsmanagement/inventory_resource_summary.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryResourceSummary InventoryResource Search Summary. +type InventoryResourceSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Type of the Resource. + Type *string `mandatory:"true" json:"type"` + + // The current state of the Resource. + LifecycleState *string `mandatory:"true" json:"lifecycleState"` + + // 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:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Compartment Id of the resource + ResourceCompartmentId *string `mandatory:"false" json:"resourceCompartmentId"` + + // Availability Domain of the resource + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // Region the resource belongs to + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m InventoryResourceSummary) 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 InventoryResourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/job_activity.go b/fleetappsmanagement/job_activity.go new file mode 100644 index 0000000000..817c6a6371 --- /dev/null +++ b/fleetappsmanagement/job_activity.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JobActivity Description of JobActivity. +type JobActivity struct { + + // Unique activity id at action group level + Id *string `mandatory:"true" json:"id"` + + // Status of the Job at Action Group Level + Status JobStatusEnum `mandatory:"true" json:"status"` + + // The time the the Scheduler Job started. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the Scheduler Job ended. An RFC3339 formatted datetime string + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + + // ID of the runbook + RunbookId *string `mandatory:"false" json:"runbookId"` + + // Name of the runbook + RunbookName *string `mandatory:"false" json:"runbookName"` + + // Resources execution details and outcomes associated with the Task. + ResourceLevelExecutions []EntityExecutionDetails `mandatory:"false" json:"resourceLevelExecutions"` +} + +func (m JobActivity) 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 JobActivity) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJobStatusEnum(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(GetJobStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/job_status.go b/fleetappsmanagement/job_status.go new file mode 100644 index 0000000000..e92e7cb6b4 --- /dev/null +++ b/fleetappsmanagement/job_status.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// JobStatusEnum Enum with underlying type: string +type JobStatusEnum string + +// Set of constants representing the allowable values for JobStatusEnum +const ( + JobStatusAccepted JobStatusEnum = "ACCEPTED" + JobStatusWaiting JobStatusEnum = "WAITING" + JobStatusInProgress JobStatusEnum = "IN_PROGRESS" + JobStatusFailed JobStatusEnum = "FAILED" + JobStatusSucceeded JobStatusEnum = "SUCCEEDED" + JobStatusCanceled JobStatusEnum = "CANCELED" + JobStatusSkipped JobStatusEnum = "SKIPPED" + JobStatusIgnored JobStatusEnum = "IGNORED" + JobStatusNotApplicable JobStatusEnum = "NOT_APPLICABLE" + JobStatusAborted JobStatusEnum = "ABORTED" + JobStatusTimedOut JobStatusEnum = "TIMED_OUT" +) + +var mappingJobStatusEnum = map[string]JobStatusEnum{ + "ACCEPTED": JobStatusAccepted, + "WAITING": JobStatusWaiting, + "IN_PROGRESS": JobStatusInProgress, + "FAILED": JobStatusFailed, + "SUCCEEDED": JobStatusSucceeded, + "CANCELED": JobStatusCanceled, + "SKIPPED": JobStatusSkipped, + "IGNORED": JobStatusIgnored, + "NOT_APPLICABLE": JobStatusNotApplicable, + "ABORTED": JobStatusAborted, + "TIMED_OUT": JobStatusTimedOut, +} + +var mappingJobStatusEnumLowerCase = map[string]JobStatusEnum{ + "accepted": JobStatusAccepted, + "waiting": JobStatusWaiting, + "in_progress": JobStatusInProgress, + "failed": JobStatusFailed, + "succeeded": JobStatusSucceeded, + "canceled": JobStatusCanceled, + "skipped": JobStatusSkipped, + "ignored": JobStatusIgnored, + "not_applicable": JobStatusNotApplicable, + "aborted": JobStatusAborted, + "timed_out": JobStatusTimedOut, +} + +// GetJobStatusEnumValues Enumerates the set of values for JobStatusEnum +func GetJobStatusEnumValues() []JobStatusEnum { + values := make([]JobStatusEnum, 0) + for _, v := range mappingJobStatusEnum { + values = append(values, v) + } + return values +} + +// GetJobStatusEnumStringValues Enumerates the set of values in String for JobStatusEnum +func GetJobStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "WAITING", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED", + "CANCELED", + "SKIPPED", + "IGNORED", + "NOT_APPLICABLE", + "ABORTED", + "TIMED_OUT", + } +} + +// GetMappingJobStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJobStatusEnum(val string) (JobStatusEnum, bool) { + enum, ok := mappingJobStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/key_encryption_credential_details.go b/fleetappsmanagement/key_encryption_credential_details.go new file mode 100644 index 0000000000..99f0bc1f35 --- /dev/null +++ b/fleetappsmanagement/key_encryption_credential_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KeyEncryptionCredentialDetails Details for Credentials using key encryption. +type KeyEncryptionCredentialDetails struct { + + // The value corresponding to the credential + Value *string `mandatory:"true" json:"value"` + + // OCID for the Vault Key that will be used to encrypt/decrypt the value given. + KeyId *string `mandatory:"true" json:"keyId"` + + // OCID for the Vault that will be used to fetch key to encrypt/decrypt the value given. + VaultId *string `mandatory:"true" json:"vaultId"` + + // The Vault Key version. + KeyVersion *string `mandatory:"false" json:"keyVersion"` +} + +func (m KeyEncryptionCredentialDetails) 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 KeyEncryptionCredentialDetails) 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 KeyEncryptionCredentialDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeKeyEncryptionCredentialDetails KeyEncryptionCredentialDetails + s := struct { + DiscriminatorParam string `json:"credentialType"` + MarshalTypeKeyEncryptionCredentialDetails + }{ + "KEY_ENCRYPTION", + (MarshalTypeKeyEncryptionCredentialDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/life_cycle_action_group_type.go b/fleetappsmanagement/life_cycle_action_group_type.go new file mode 100644 index 0000000000..252c797945 --- /dev/null +++ b/fleetappsmanagement/life_cycle_action_group_type.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// LifeCycleActionGroupTypeEnum Enum with underlying type: string +type LifeCycleActionGroupTypeEnum string + +// Set of constants representing the allowable values for LifeCycleActionGroupTypeEnum +const ( + LifeCycleActionGroupTypeProduct LifeCycleActionGroupTypeEnum = "PRODUCT" + LifeCycleActionGroupTypeEnvironment LifeCycleActionGroupTypeEnum = "ENVIRONMENT" +) + +var mappingLifeCycleActionGroupTypeEnum = map[string]LifeCycleActionGroupTypeEnum{ + "PRODUCT": LifeCycleActionGroupTypeProduct, + "ENVIRONMENT": LifeCycleActionGroupTypeEnvironment, +} + +var mappingLifeCycleActionGroupTypeEnumLowerCase = map[string]LifeCycleActionGroupTypeEnum{ + "product": LifeCycleActionGroupTypeProduct, + "environment": LifeCycleActionGroupTypeEnvironment, +} + +// GetLifeCycleActionGroupTypeEnumValues Enumerates the set of values for LifeCycleActionGroupTypeEnum +func GetLifeCycleActionGroupTypeEnumValues() []LifeCycleActionGroupTypeEnum { + values := make([]LifeCycleActionGroupTypeEnum, 0) + for _, v := range mappingLifeCycleActionGroupTypeEnum { + values = append(values, v) + } + return values +} + +// GetLifeCycleActionGroupTypeEnumStringValues Enumerates the set of values in String for LifeCycleActionGroupTypeEnum +func GetLifeCycleActionGroupTypeEnumStringValues() []string { + return []string{ + "PRODUCT", + "ENVIRONMENT", + } +} + +// GetMappingLifeCycleActionGroupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLifeCycleActionGroupTypeEnum(val string) (LifeCycleActionGroupTypeEnum, bool) { + enum, ok := mappingLifeCycleActionGroupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_announcements_request_response.go b/fleetappsmanagement/list_announcements_request_response.go new file mode 100644 index 0000000000..da795e8119 --- /dev/null +++ b/fleetappsmanagement/list_announcements_request_response.go @@ -0,0 +1,201 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAnnouncementsRequest wrapper for the ListAnnouncements operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListAnnouncements.go.html to see an example of how to use ListAnnouncementsRequest. +type ListAnnouncementsRequest struct { + + // Filter the list with summary contains the given value. + SummaryContains *string `mandatory:"false" contributesTo:"query" name:"summaryContains"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListAnnouncementsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort AnnouncementSummary by. Only one sort order may be provided. + // If no value is specified _timeReleased_ is default. + SortBy ListAnnouncementsSortByEnum `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 ListAnnouncementsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAnnouncementsRequest) 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 ListAnnouncementsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAnnouncementsRequest) 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 ListAnnouncementsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAnnouncementsSortOrderEnum(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(GetListAnnouncementsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAnnouncementsSortByEnum(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(GetListAnnouncementsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAnnouncementsResponse wrapper for the ListAnnouncements operation +type ListAnnouncementsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AnnouncementCollection instances + 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. + 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 ListAnnouncementsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAnnouncementsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAnnouncementsSortOrderEnum Enum with underlying type: string +type ListAnnouncementsSortOrderEnum string + +// Set of constants representing the allowable values for ListAnnouncementsSortOrderEnum +const ( + ListAnnouncementsSortOrderAsc ListAnnouncementsSortOrderEnum = "ASC" + ListAnnouncementsSortOrderDesc ListAnnouncementsSortOrderEnum = "DESC" +) + +var mappingListAnnouncementsSortOrderEnum = map[string]ListAnnouncementsSortOrderEnum{ + "ASC": ListAnnouncementsSortOrderAsc, + "DESC": ListAnnouncementsSortOrderDesc, +} + +var mappingListAnnouncementsSortOrderEnumLowerCase = map[string]ListAnnouncementsSortOrderEnum{ + "asc": ListAnnouncementsSortOrderAsc, + "desc": ListAnnouncementsSortOrderDesc, +} + +// GetListAnnouncementsSortOrderEnumValues Enumerates the set of values for ListAnnouncementsSortOrderEnum +func GetListAnnouncementsSortOrderEnumValues() []ListAnnouncementsSortOrderEnum { + values := make([]ListAnnouncementsSortOrderEnum, 0) + for _, v := range mappingListAnnouncementsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAnnouncementsSortOrderEnumStringValues Enumerates the set of values in String for ListAnnouncementsSortOrderEnum +func GetListAnnouncementsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAnnouncementsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAnnouncementsSortOrderEnum(val string) (ListAnnouncementsSortOrderEnum, bool) { + enum, ok := mappingListAnnouncementsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAnnouncementsSortByEnum Enum with underlying type: string +type ListAnnouncementsSortByEnum string + +// Set of constants representing the allowable values for ListAnnouncementsSortByEnum +const ( + ListAnnouncementsSortByTimereleased ListAnnouncementsSortByEnum = "timeReleased" + ListAnnouncementsSortBySummary ListAnnouncementsSortByEnum = "summary" +) + +var mappingListAnnouncementsSortByEnum = map[string]ListAnnouncementsSortByEnum{ + "timeReleased": ListAnnouncementsSortByTimereleased, + "summary": ListAnnouncementsSortBySummary, +} + +var mappingListAnnouncementsSortByEnumLowerCase = map[string]ListAnnouncementsSortByEnum{ + "timereleased": ListAnnouncementsSortByTimereleased, + "summary": ListAnnouncementsSortBySummary, +} + +// GetListAnnouncementsSortByEnumValues Enumerates the set of values for ListAnnouncementsSortByEnum +func GetListAnnouncementsSortByEnumValues() []ListAnnouncementsSortByEnum { + values := make([]ListAnnouncementsSortByEnum, 0) + for _, v := range mappingListAnnouncementsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAnnouncementsSortByEnumStringValues Enumerates the set of values in String for ListAnnouncementsSortByEnum +func GetListAnnouncementsSortByEnumStringValues() []string { + return []string{ + "timeReleased", + "summary", + } +} + +// GetMappingListAnnouncementsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAnnouncementsSortByEnum(val string) (ListAnnouncementsSortByEnum, bool) { + enum, ok := mappingListAnnouncementsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_executions_request_response.go b/fleetappsmanagement/list_executions_request_response.go new file mode 100644 index 0000000000..ef5428f105 --- /dev/null +++ b/fleetappsmanagement/list_executions_request_response.go @@ -0,0 +1,211 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListExecutionsRequest wrapper for the ListExecutions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListExecutions.go.html to see an example of how to use ListExecutionsRequest. +type ListExecutionsRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // unique jobActivity identifier + JobActivityId *string `mandatory:"true" contributesTo:"path" name:"jobActivityId"` + + // unique Resource identifier + ResourceId *string `mandatory:"true" contributesTo:"path" name:"resourceId"` + + // Task Id + ResourceTaskId *string `mandatory:"false" contributesTo:"query" name:"resourceTaskId"` + + // Unique step name + StepName *string `mandatory:"false" contributesTo:"query" name:"stepName"` + + // Unique target name + TargetName *string `mandatory:"false" contributesTo:"query" name:"targetName"` + + // Task Order Sequence + Sequence *string `mandatory:"false" contributesTo:"query" name:"sequence"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListExecutionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + SortBy ListExecutionsSortByEnum `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 ListExecutionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListExecutionsRequest) 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 ListExecutionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListExecutionsRequest) 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 ListExecutionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListExecutionsSortOrderEnum(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(GetListExecutionsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListExecutionsSortByEnum(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(GetListExecutionsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListExecutionsResponse wrapper for the ListExecutions operation +type ListExecutionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ExecutionCollection instances + ExecutionCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListExecutionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListExecutionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListExecutionsSortOrderEnum Enum with underlying type: string +type ListExecutionsSortOrderEnum string + +// Set of constants representing the allowable values for ListExecutionsSortOrderEnum +const ( + ListExecutionsSortOrderAsc ListExecutionsSortOrderEnum = "ASC" + ListExecutionsSortOrderDesc ListExecutionsSortOrderEnum = "DESC" +) + +var mappingListExecutionsSortOrderEnum = map[string]ListExecutionsSortOrderEnum{ + "ASC": ListExecutionsSortOrderAsc, + "DESC": ListExecutionsSortOrderDesc, +} + +var mappingListExecutionsSortOrderEnumLowerCase = map[string]ListExecutionsSortOrderEnum{ + "asc": ListExecutionsSortOrderAsc, + "desc": ListExecutionsSortOrderDesc, +} + +// GetListExecutionsSortOrderEnumValues Enumerates the set of values for ListExecutionsSortOrderEnum +func GetListExecutionsSortOrderEnumValues() []ListExecutionsSortOrderEnum { + values := make([]ListExecutionsSortOrderEnum, 0) + for _, v := range mappingListExecutionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListExecutionsSortOrderEnumStringValues Enumerates the set of values in String for ListExecutionsSortOrderEnum +func GetListExecutionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListExecutionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExecutionsSortOrderEnum(val string) (ListExecutionsSortOrderEnum, bool) { + enum, ok := mappingListExecutionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListExecutionsSortByEnum Enum with underlying type: string +type ListExecutionsSortByEnum string + +// Set of constants representing the allowable values for ListExecutionsSortByEnum +const ( + ListExecutionsSortByTimestarted ListExecutionsSortByEnum = "timeStarted" +) + +var mappingListExecutionsSortByEnum = map[string]ListExecutionsSortByEnum{ + "timeStarted": ListExecutionsSortByTimestarted, +} + +var mappingListExecutionsSortByEnumLowerCase = map[string]ListExecutionsSortByEnum{ + "timestarted": ListExecutionsSortByTimestarted, +} + +// GetListExecutionsSortByEnumValues Enumerates the set of values for ListExecutionsSortByEnum +func GetListExecutionsSortByEnumValues() []ListExecutionsSortByEnum { + values := make([]ListExecutionsSortByEnum, 0) + for _, v := range mappingListExecutionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListExecutionsSortByEnumStringValues Enumerates the set of values in String for ListExecutionsSortByEnum +func GetListExecutionsSortByEnumStringValues() []string { + return []string{ + "timeStarted", + } +} + +// GetMappingListExecutionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExecutionsSortByEnum(val string) (ListExecutionsSortByEnum, bool) { + enum, ok := mappingListExecutionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_fleet_credentials_request_response.go b/fleetappsmanagement/list_fleet_credentials_request_response.go new file mode 100644 index 0000000000..4248c10b88 --- /dev/null +++ b/fleetappsmanagement/list_fleet_credentials_request_response.go @@ -0,0 +1,218 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFleetCredentialsRequest wrapper for the ListFleetCredentials operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetCredentials.go.html to see an example of how to use ListFleetCredentialsRequest. +type ListFleetCredentialsRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState FleetCredentialLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Credential Level. + CredentialLevel CredentialEntitySpecificDetailsCredentialLevelEnum `mandatory:"false" contributesTo:"query" name:"credentialLevel" omitEmpty:"true"` + + // unique FleetCredential identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListFleetCredentialsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListFleetCredentialsSortByEnum `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 ListFleetCredentialsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFleetCredentialsRequest) 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 ListFleetCredentialsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFleetCredentialsRequest) 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 ListFleetCredentialsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetCredentialLifecycleStateEnum(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(GetFleetCredentialLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingCredentialEntitySpecificDetailsCredentialLevelEnum(string(request.CredentialLevel)); !ok && request.CredentialLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CredentialLevel: %s. Supported values are: %s.", request.CredentialLevel, strings.Join(GetCredentialEntitySpecificDetailsCredentialLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetCredentialsSortOrderEnum(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(GetListFleetCredentialsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetCredentialsSortByEnum(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(GetListFleetCredentialsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFleetCredentialsResponse wrapper for the ListFleetCredentials operation +type ListFleetCredentialsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FleetCredentialCollection instances + FleetCredentialCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListFleetCredentialsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFleetCredentialsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListFleetCredentialsSortOrderEnum Enum with underlying type: string +type ListFleetCredentialsSortOrderEnum string + +// Set of constants representing the allowable values for ListFleetCredentialsSortOrderEnum +const ( + ListFleetCredentialsSortOrderAsc ListFleetCredentialsSortOrderEnum = "ASC" + ListFleetCredentialsSortOrderDesc ListFleetCredentialsSortOrderEnum = "DESC" +) + +var mappingListFleetCredentialsSortOrderEnum = map[string]ListFleetCredentialsSortOrderEnum{ + "ASC": ListFleetCredentialsSortOrderAsc, + "DESC": ListFleetCredentialsSortOrderDesc, +} + +var mappingListFleetCredentialsSortOrderEnumLowerCase = map[string]ListFleetCredentialsSortOrderEnum{ + "asc": ListFleetCredentialsSortOrderAsc, + "desc": ListFleetCredentialsSortOrderDesc, +} + +// GetListFleetCredentialsSortOrderEnumValues Enumerates the set of values for ListFleetCredentialsSortOrderEnum +func GetListFleetCredentialsSortOrderEnumValues() []ListFleetCredentialsSortOrderEnum { + values := make([]ListFleetCredentialsSortOrderEnum, 0) + for _, v := range mappingListFleetCredentialsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListFleetCredentialsSortOrderEnumStringValues Enumerates the set of values in String for ListFleetCredentialsSortOrderEnum +func GetListFleetCredentialsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListFleetCredentialsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetCredentialsSortOrderEnum(val string) (ListFleetCredentialsSortOrderEnum, bool) { + enum, ok := mappingListFleetCredentialsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListFleetCredentialsSortByEnum Enum with underlying type: string +type ListFleetCredentialsSortByEnum string + +// Set of constants representing the allowable values for ListFleetCredentialsSortByEnum +const ( + ListFleetCredentialsSortByTimecreated ListFleetCredentialsSortByEnum = "timeCreated" + ListFleetCredentialsSortByDisplayname ListFleetCredentialsSortByEnum = "displayName" +) + +var mappingListFleetCredentialsSortByEnum = map[string]ListFleetCredentialsSortByEnum{ + "timeCreated": ListFleetCredentialsSortByTimecreated, + "displayName": ListFleetCredentialsSortByDisplayname, +} + +var mappingListFleetCredentialsSortByEnumLowerCase = map[string]ListFleetCredentialsSortByEnum{ + "timecreated": ListFleetCredentialsSortByTimecreated, + "displayname": ListFleetCredentialsSortByDisplayname, +} + +// GetListFleetCredentialsSortByEnumValues Enumerates the set of values for ListFleetCredentialsSortByEnum +func GetListFleetCredentialsSortByEnumValues() []ListFleetCredentialsSortByEnum { + values := make([]ListFleetCredentialsSortByEnum, 0) + for _, v := range mappingListFleetCredentialsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListFleetCredentialsSortByEnumStringValues Enumerates the set of values in String for ListFleetCredentialsSortByEnum +func GetListFleetCredentialsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListFleetCredentialsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetCredentialsSortByEnum(val string) (ListFleetCredentialsSortByEnum, bool) { + enum, ok := mappingListFleetCredentialsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_fleet_products_request_response.go b/fleetappsmanagement/list_fleet_products_request_response.go new file mode 100644 index 0000000000..27bbeb82a0 --- /dev/null +++ b/fleetappsmanagement/list_fleet_products_request_response.go @@ -0,0 +1,209 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFleetProductsRequest wrapper for the ListFleetProducts operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetProducts.go.html to see an example of how to use ListFleetProductsRequest. +type ListFleetProductsRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Resource Identifier + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // Resource Display Name + ResourceDisplayName *string `mandatory:"false" contributesTo:"query" name:"resourceDisplayName"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListFleetProductsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for displayName and resourceDisplayName is ascending. + SortBy ListFleetProductsSortByEnum `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 ListFleetProductsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFleetProductsRequest) 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 ListFleetProductsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFleetProductsRequest) 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 ListFleetProductsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListFleetProductsSortOrderEnum(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(GetListFleetProductsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetProductsSortByEnum(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(GetListFleetProductsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFleetProductsResponse wrapper for the ListFleetProducts operation +type ListFleetProductsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FleetProductCollection instances + FleetProductCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListFleetProductsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFleetProductsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListFleetProductsSortOrderEnum Enum with underlying type: string +type ListFleetProductsSortOrderEnum string + +// Set of constants representing the allowable values for ListFleetProductsSortOrderEnum +const ( + ListFleetProductsSortOrderAsc ListFleetProductsSortOrderEnum = "ASC" + ListFleetProductsSortOrderDesc ListFleetProductsSortOrderEnum = "DESC" +) + +var mappingListFleetProductsSortOrderEnum = map[string]ListFleetProductsSortOrderEnum{ + "ASC": ListFleetProductsSortOrderAsc, + "DESC": ListFleetProductsSortOrderDesc, +} + +var mappingListFleetProductsSortOrderEnumLowerCase = map[string]ListFleetProductsSortOrderEnum{ + "asc": ListFleetProductsSortOrderAsc, + "desc": ListFleetProductsSortOrderDesc, +} + +// GetListFleetProductsSortOrderEnumValues Enumerates the set of values for ListFleetProductsSortOrderEnum +func GetListFleetProductsSortOrderEnumValues() []ListFleetProductsSortOrderEnum { + values := make([]ListFleetProductsSortOrderEnum, 0) + for _, v := range mappingListFleetProductsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListFleetProductsSortOrderEnumStringValues Enumerates the set of values in String for ListFleetProductsSortOrderEnum +func GetListFleetProductsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListFleetProductsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetProductsSortOrderEnum(val string) (ListFleetProductsSortOrderEnum, bool) { + enum, ok := mappingListFleetProductsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListFleetProductsSortByEnum Enum with underlying type: string +type ListFleetProductsSortByEnum string + +// Set of constants representing the allowable values for ListFleetProductsSortByEnum +const ( + ListFleetProductsSortByDisplayname ListFleetProductsSortByEnum = "displayName" + ListFleetProductsSortByResourcedisplayname ListFleetProductsSortByEnum = "resourceDisplayName" +) + +var mappingListFleetProductsSortByEnum = map[string]ListFleetProductsSortByEnum{ + "displayName": ListFleetProductsSortByDisplayname, + "resourceDisplayName": ListFleetProductsSortByResourcedisplayname, +} + +var mappingListFleetProductsSortByEnumLowerCase = map[string]ListFleetProductsSortByEnum{ + "displayname": ListFleetProductsSortByDisplayname, + "resourcedisplayname": ListFleetProductsSortByResourcedisplayname, +} + +// GetListFleetProductsSortByEnumValues Enumerates the set of values for ListFleetProductsSortByEnum +func GetListFleetProductsSortByEnumValues() []ListFleetProductsSortByEnum { + values := make([]ListFleetProductsSortByEnum, 0) + for _, v := range mappingListFleetProductsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListFleetProductsSortByEnumStringValues Enumerates the set of values in String for ListFleetProductsSortByEnum +func GetListFleetProductsSortByEnumStringValues() []string { + return []string{ + "displayName", + "resourceDisplayName", + } +} + +// GetMappingListFleetProductsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetProductsSortByEnum(val string) (ListFleetProductsSortByEnum, bool) { + enum, ok := mappingListFleetProductsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_fleet_properties_request_response.go b/fleetappsmanagement/list_fleet_properties_request_response.go new file mode 100644 index 0000000000..cec6f149f3 --- /dev/null +++ b/fleetappsmanagement/list_fleet_properties_request_response.go @@ -0,0 +1,212 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFleetPropertiesRequest wrapper for the ListFleetProperties operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetProperties.go.html to see an example of how to use ListFleetPropertiesRequest. +type ListFleetPropertiesRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState FleetPropertyLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique FleetProperty identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListFleetPropertiesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListFleetPropertiesSortByEnum `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 ListFleetPropertiesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFleetPropertiesRequest) 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 ListFleetPropertiesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFleetPropertiesRequest) 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 ListFleetPropertiesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetPropertyLifecycleStateEnum(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(GetFleetPropertyLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetPropertiesSortOrderEnum(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(GetListFleetPropertiesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetPropertiesSortByEnum(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(GetListFleetPropertiesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFleetPropertiesResponse wrapper for the ListFleetProperties operation +type ListFleetPropertiesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FleetPropertyCollection instances + FleetPropertyCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListFleetPropertiesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFleetPropertiesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListFleetPropertiesSortOrderEnum Enum with underlying type: string +type ListFleetPropertiesSortOrderEnum string + +// Set of constants representing the allowable values for ListFleetPropertiesSortOrderEnum +const ( + ListFleetPropertiesSortOrderAsc ListFleetPropertiesSortOrderEnum = "ASC" + ListFleetPropertiesSortOrderDesc ListFleetPropertiesSortOrderEnum = "DESC" +) + +var mappingListFleetPropertiesSortOrderEnum = map[string]ListFleetPropertiesSortOrderEnum{ + "ASC": ListFleetPropertiesSortOrderAsc, + "DESC": ListFleetPropertiesSortOrderDesc, +} + +var mappingListFleetPropertiesSortOrderEnumLowerCase = map[string]ListFleetPropertiesSortOrderEnum{ + "asc": ListFleetPropertiesSortOrderAsc, + "desc": ListFleetPropertiesSortOrderDesc, +} + +// GetListFleetPropertiesSortOrderEnumValues Enumerates the set of values for ListFleetPropertiesSortOrderEnum +func GetListFleetPropertiesSortOrderEnumValues() []ListFleetPropertiesSortOrderEnum { + values := make([]ListFleetPropertiesSortOrderEnum, 0) + for _, v := range mappingListFleetPropertiesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListFleetPropertiesSortOrderEnumStringValues Enumerates the set of values in String for ListFleetPropertiesSortOrderEnum +func GetListFleetPropertiesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListFleetPropertiesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetPropertiesSortOrderEnum(val string) (ListFleetPropertiesSortOrderEnum, bool) { + enum, ok := mappingListFleetPropertiesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListFleetPropertiesSortByEnum Enum with underlying type: string +type ListFleetPropertiesSortByEnum string + +// Set of constants representing the allowable values for ListFleetPropertiesSortByEnum +const ( + ListFleetPropertiesSortByTimecreated ListFleetPropertiesSortByEnum = "timeCreated" + ListFleetPropertiesSortByDisplayname ListFleetPropertiesSortByEnum = "displayName" +) + +var mappingListFleetPropertiesSortByEnum = map[string]ListFleetPropertiesSortByEnum{ + "timeCreated": ListFleetPropertiesSortByTimecreated, + "displayName": ListFleetPropertiesSortByDisplayname, +} + +var mappingListFleetPropertiesSortByEnumLowerCase = map[string]ListFleetPropertiesSortByEnum{ + "timecreated": ListFleetPropertiesSortByTimecreated, + "displayname": ListFleetPropertiesSortByDisplayname, +} + +// GetListFleetPropertiesSortByEnumValues Enumerates the set of values for ListFleetPropertiesSortByEnum +func GetListFleetPropertiesSortByEnumValues() []ListFleetPropertiesSortByEnum { + values := make([]ListFleetPropertiesSortByEnum, 0) + for _, v := range mappingListFleetPropertiesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListFleetPropertiesSortByEnumStringValues Enumerates the set of values in String for ListFleetPropertiesSortByEnum +func GetListFleetPropertiesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListFleetPropertiesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetPropertiesSortByEnum(val string) (ListFleetPropertiesSortByEnum, bool) { + enum, ok := mappingListFleetPropertiesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_fleet_resources_request_response.go b/fleetappsmanagement/list_fleet_resources_request_response.go new file mode 100644 index 0000000000..e49139c41d --- /dev/null +++ b/fleetappsmanagement/list_fleet_resources_request_response.go @@ -0,0 +1,215 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFleetResourcesRequest wrapper for the ListFleetResources operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetResources.go.html to see an example of how to use ListFleetResourcesRequest. +type ListFleetResourcesRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // Resource Tenancy Id + TenancyId *string `mandatory:"false" contributesTo:"query" name:"tenancyId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState FleetResourceLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique FleetResource identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // A filter to return resources that match the Type + FleetResourceType *string `mandatory:"false" contributesTo:"query" name:"fleetResourceType"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListFleetResourcesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListFleetResourcesSortByEnum `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 ListFleetResourcesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFleetResourcesRequest) 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 ListFleetResourcesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFleetResourcesRequest) 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 ListFleetResourcesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetResourceLifecycleStateEnum(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(GetFleetResourceLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetResourcesSortOrderEnum(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(GetListFleetResourcesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetResourcesSortByEnum(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(GetListFleetResourcesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFleetResourcesResponse wrapper for the ListFleetResources operation +type ListFleetResourcesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FleetResourceCollection instances + FleetResourceCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListFleetResourcesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFleetResourcesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListFleetResourcesSortOrderEnum Enum with underlying type: string +type ListFleetResourcesSortOrderEnum string + +// Set of constants representing the allowable values for ListFleetResourcesSortOrderEnum +const ( + ListFleetResourcesSortOrderAsc ListFleetResourcesSortOrderEnum = "ASC" + ListFleetResourcesSortOrderDesc ListFleetResourcesSortOrderEnum = "DESC" +) + +var mappingListFleetResourcesSortOrderEnum = map[string]ListFleetResourcesSortOrderEnum{ + "ASC": ListFleetResourcesSortOrderAsc, + "DESC": ListFleetResourcesSortOrderDesc, +} + +var mappingListFleetResourcesSortOrderEnumLowerCase = map[string]ListFleetResourcesSortOrderEnum{ + "asc": ListFleetResourcesSortOrderAsc, + "desc": ListFleetResourcesSortOrderDesc, +} + +// GetListFleetResourcesSortOrderEnumValues Enumerates the set of values for ListFleetResourcesSortOrderEnum +func GetListFleetResourcesSortOrderEnumValues() []ListFleetResourcesSortOrderEnum { + values := make([]ListFleetResourcesSortOrderEnum, 0) + for _, v := range mappingListFleetResourcesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListFleetResourcesSortOrderEnumStringValues Enumerates the set of values in String for ListFleetResourcesSortOrderEnum +func GetListFleetResourcesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListFleetResourcesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetResourcesSortOrderEnum(val string) (ListFleetResourcesSortOrderEnum, bool) { + enum, ok := mappingListFleetResourcesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListFleetResourcesSortByEnum Enum with underlying type: string +type ListFleetResourcesSortByEnum string + +// Set of constants representing the allowable values for ListFleetResourcesSortByEnum +const ( + ListFleetResourcesSortByTimecreated ListFleetResourcesSortByEnum = "timeCreated" + ListFleetResourcesSortByDisplayname ListFleetResourcesSortByEnum = "displayName" +) + +var mappingListFleetResourcesSortByEnum = map[string]ListFleetResourcesSortByEnum{ + "timeCreated": ListFleetResourcesSortByTimecreated, + "displayName": ListFleetResourcesSortByDisplayname, +} + +var mappingListFleetResourcesSortByEnumLowerCase = map[string]ListFleetResourcesSortByEnum{ + "timecreated": ListFleetResourcesSortByTimecreated, + "displayname": ListFleetResourcesSortByDisplayname, +} + +// GetListFleetResourcesSortByEnumValues Enumerates the set of values for ListFleetResourcesSortByEnum +func GetListFleetResourcesSortByEnumValues() []ListFleetResourcesSortByEnum { + values := make([]ListFleetResourcesSortByEnum, 0) + for _, v := range mappingListFleetResourcesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListFleetResourcesSortByEnumStringValues Enumerates the set of values in String for ListFleetResourcesSortByEnum +func GetListFleetResourcesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListFleetResourcesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetResourcesSortByEnum(val string) (ListFleetResourcesSortByEnum, bool) { + enum, ok := mappingListFleetResourcesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_fleet_targets_request_response.go b/fleetappsmanagement/list_fleet_targets_request_response.go new file mode 100644 index 0000000000..6fbefe3096 --- /dev/null +++ b/fleetappsmanagement/list_fleet_targets_request_response.go @@ -0,0 +1,213 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFleetTargetsRequest wrapper for the ListFleetTargets operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetTargets.go.html to see an example of how to use ListFleetTargetsRequest. +type ListFleetTargetsRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Product Name + Product *string `mandatory:"false" contributesTo:"query" name:"product"` + + // Resource Identifier + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // Resource Display Name + ResourceDisplayName *string `mandatory:"false" contributesTo:"query" name:"resourceDisplayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListFleetTargetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for displayName,product and resourceDisplayName is ascending. + SortBy ListFleetTargetsSortByEnum `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 ListFleetTargetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFleetTargetsRequest) 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 ListFleetTargetsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFleetTargetsRequest) 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 ListFleetTargetsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListFleetTargetsSortOrderEnum(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(GetListFleetTargetsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetTargetsSortByEnum(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(GetListFleetTargetsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFleetTargetsResponse wrapper for the ListFleetTargets operation +type ListFleetTargetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FleetTargetCollection instances + FleetTargetCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListFleetTargetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFleetTargetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListFleetTargetsSortOrderEnum Enum with underlying type: string +type ListFleetTargetsSortOrderEnum string + +// Set of constants representing the allowable values for ListFleetTargetsSortOrderEnum +const ( + ListFleetTargetsSortOrderAsc ListFleetTargetsSortOrderEnum = "ASC" + ListFleetTargetsSortOrderDesc ListFleetTargetsSortOrderEnum = "DESC" +) + +var mappingListFleetTargetsSortOrderEnum = map[string]ListFleetTargetsSortOrderEnum{ + "ASC": ListFleetTargetsSortOrderAsc, + "DESC": ListFleetTargetsSortOrderDesc, +} + +var mappingListFleetTargetsSortOrderEnumLowerCase = map[string]ListFleetTargetsSortOrderEnum{ + "asc": ListFleetTargetsSortOrderAsc, + "desc": ListFleetTargetsSortOrderDesc, +} + +// GetListFleetTargetsSortOrderEnumValues Enumerates the set of values for ListFleetTargetsSortOrderEnum +func GetListFleetTargetsSortOrderEnumValues() []ListFleetTargetsSortOrderEnum { + values := make([]ListFleetTargetsSortOrderEnum, 0) + for _, v := range mappingListFleetTargetsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListFleetTargetsSortOrderEnumStringValues Enumerates the set of values in String for ListFleetTargetsSortOrderEnum +func GetListFleetTargetsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListFleetTargetsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetTargetsSortOrderEnum(val string) (ListFleetTargetsSortOrderEnum, bool) { + enum, ok := mappingListFleetTargetsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListFleetTargetsSortByEnum Enum with underlying type: string +type ListFleetTargetsSortByEnum string + +// Set of constants representing the allowable values for ListFleetTargetsSortByEnum +const ( + ListFleetTargetsSortByDisplayname ListFleetTargetsSortByEnum = "displayName" + ListFleetTargetsSortByProduct ListFleetTargetsSortByEnum = "product" + ListFleetTargetsSortByResourcedisplayname ListFleetTargetsSortByEnum = "resourceDisplayName" +) + +var mappingListFleetTargetsSortByEnum = map[string]ListFleetTargetsSortByEnum{ + "displayName": ListFleetTargetsSortByDisplayname, + "product": ListFleetTargetsSortByProduct, + "resourceDisplayName": ListFleetTargetsSortByResourcedisplayname, +} + +var mappingListFleetTargetsSortByEnumLowerCase = map[string]ListFleetTargetsSortByEnum{ + "displayname": ListFleetTargetsSortByDisplayname, + "product": ListFleetTargetsSortByProduct, + "resourcedisplayname": ListFleetTargetsSortByResourcedisplayname, +} + +// GetListFleetTargetsSortByEnumValues Enumerates the set of values for ListFleetTargetsSortByEnum +func GetListFleetTargetsSortByEnumValues() []ListFleetTargetsSortByEnum { + values := make([]ListFleetTargetsSortByEnum, 0) + for _, v := range mappingListFleetTargetsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListFleetTargetsSortByEnumStringValues Enumerates the set of values in String for ListFleetTargetsSortByEnum +func GetListFleetTargetsSortByEnumStringValues() []string { + return []string{ + "displayName", + "product", + "resourceDisplayName", + } +} + +// GetMappingListFleetTargetsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetTargetsSortByEnum(val string) (ListFleetTargetsSortByEnum, bool) { + enum, ok := mappingListFleetTargetsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_fleets_request_response.go b/fleetappsmanagement/list_fleets_request_response.go new file mode 100644 index 0000000000..eb501ea74b --- /dev/null +++ b/fleetappsmanagement/list_fleets_request_response.go @@ -0,0 +1,227 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFleetsRequest wrapper for the ListFleets operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleets.go.html to see an example of how to use ListFleetsRequest. +type ListFleetsRequest struct { + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState FleetLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their fleetType matches the given fleetType. + FleetType FleetFleetTypeEnum `mandatory:"false" contributesTo:"query" name:"fleetType" omitEmpty:"true"` + + // A filter to return only resources that match the Application Type given. + ApplicationType *string `mandatory:"false" contributesTo:"query" name:"applicationType"` + + // A filter to return only resources that match the Product Type given. + Product *string `mandatory:"false" contributesTo:"query" name:"product"` + + // A filter to return only resources that match the Environment Type given. + EnvironmentType *string `mandatory:"false" contributesTo:"query" name:"environmentType"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique Fleet identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListFleetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListFleetsSortByEnum `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 ListFleetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFleetsRequest) 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 ListFleetsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFleetsRequest) 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 ListFleetsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFleetLifecycleStateEnum(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(GetFleetLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingFleetFleetTypeEnum(string(request.FleetType)); !ok && request.FleetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FleetType: %s. Supported values are: %s.", request.FleetType, strings.Join(GetFleetFleetTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetsSortOrderEnum(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(GetListFleetsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListFleetsSortByEnum(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(GetListFleetsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFleetsResponse wrapper for the ListFleets operation +type ListFleetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FleetCollection instances + 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. + 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"` + + // A number representing the the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response ListFleetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFleetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListFleetsSortOrderEnum Enum with underlying type: string +type ListFleetsSortOrderEnum string + +// Set of constants representing the allowable values for ListFleetsSortOrderEnum +const ( + ListFleetsSortOrderAsc ListFleetsSortOrderEnum = "ASC" + ListFleetsSortOrderDesc ListFleetsSortOrderEnum = "DESC" +) + +var mappingListFleetsSortOrderEnum = map[string]ListFleetsSortOrderEnum{ + "ASC": ListFleetsSortOrderAsc, + "DESC": ListFleetsSortOrderDesc, +} + +var mappingListFleetsSortOrderEnumLowerCase = map[string]ListFleetsSortOrderEnum{ + "asc": ListFleetsSortOrderAsc, + "desc": ListFleetsSortOrderDesc, +} + +// GetListFleetsSortOrderEnumValues Enumerates the set of values for ListFleetsSortOrderEnum +func GetListFleetsSortOrderEnumValues() []ListFleetsSortOrderEnum { + values := make([]ListFleetsSortOrderEnum, 0) + for _, v := range mappingListFleetsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListFleetsSortOrderEnumStringValues Enumerates the set of values in String for ListFleetsSortOrderEnum +func GetListFleetsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListFleetsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetsSortOrderEnum(val string) (ListFleetsSortOrderEnum, bool) { + enum, ok := mappingListFleetsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListFleetsSortByEnum Enum with underlying type: string +type ListFleetsSortByEnum string + +// Set of constants representing the allowable values for ListFleetsSortByEnum +const ( + ListFleetsSortByTimecreated ListFleetsSortByEnum = "timeCreated" + ListFleetsSortByDisplayname ListFleetsSortByEnum = "displayName" +) + +var mappingListFleetsSortByEnum = map[string]ListFleetsSortByEnum{ + "timeCreated": ListFleetsSortByTimecreated, + "displayName": ListFleetsSortByDisplayname, +} + +var mappingListFleetsSortByEnumLowerCase = map[string]ListFleetsSortByEnum{ + "timecreated": ListFleetsSortByTimecreated, + "displayname": ListFleetsSortByDisplayname, +} + +// GetListFleetsSortByEnumValues Enumerates the set of values for ListFleetsSortByEnum +func GetListFleetsSortByEnumValues() []ListFleetsSortByEnum { + values := make([]ListFleetsSortByEnum, 0) + for _, v := range mappingListFleetsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListFleetsSortByEnumStringValues Enumerates the set of values in String for ListFleetsSortByEnum +func GetListFleetsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListFleetsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFleetsSortByEnum(val string) (ListFleetsSortByEnum, bool) { + enum, ok := mappingListFleetsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_inventory_resources_request_response.go b/fleetappsmanagement/list_inventory_resources_request_response.go new file mode 100644 index 0000000000..93b4cf1e0e --- /dev/null +++ b/fleetappsmanagement/list_inventory_resources_request_response.go @@ -0,0 +1,227 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInventoryResourcesRequest wrapper for the ListInventoryResources operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListInventoryResources.go.html to see an example of how to use ListInventoryResourcesRequest. +type ListInventoryResourcesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Resource Compartment ID + ResourceCompartmentId *string `mandatory:"true" contributesTo:"query" name:"resourceCompartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Resource Region + ResourceRegion *string `mandatory:"false" contributesTo:"query" name:"resourceRegion"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}={value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of inventory properties filters to apply. + // The key for each inventory property and value for each resource type is "{resourceType}.{inventoryProperty}={value}". + InventoryProperties []string `contributesTo:"query" name:"inventoryProperties" collectionFormat:"multi"` + + // Fetch resources matching matching ANY or ALL criteria passed as params in "tags" and "inventoryProperties" + MatchingCriteria *string `mandatory:"false" contributesTo:"query" name:"matchingCriteria"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListInventoryResourcesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListInventoryResourcesSortByEnum `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 ListInventoryResourcesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInventoryResourcesRequest) 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 ListInventoryResourcesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInventoryResourcesRequest) 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 ListInventoryResourcesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListInventoryResourcesSortOrderEnum(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(GetListInventoryResourcesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListInventoryResourcesSortByEnum(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(GetListInventoryResourcesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInventoryResourcesResponse wrapper for the ListInventoryResources operation +type ListInventoryResourcesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of InventoryResourceCollection instances + InventoryResourceCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListInventoryResourcesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInventoryResourcesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInventoryResourcesSortOrderEnum Enum with underlying type: string +type ListInventoryResourcesSortOrderEnum string + +// Set of constants representing the allowable values for ListInventoryResourcesSortOrderEnum +const ( + ListInventoryResourcesSortOrderAsc ListInventoryResourcesSortOrderEnum = "ASC" + ListInventoryResourcesSortOrderDesc ListInventoryResourcesSortOrderEnum = "DESC" +) + +var mappingListInventoryResourcesSortOrderEnum = map[string]ListInventoryResourcesSortOrderEnum{ + "ASC": ListInventoryResourcesSortOrderAsc, + "DESC": ListInventoryResourcesSortOrderDesc, +} + +var mappingListInventoryResourcesSortOrderEnumLowerCase = map[string]ListInventoryResourcesSortOrderEnum{ + "asc": ListInventoryResourcesSortOrderAsc, + "desc": ListInventoryResourcesSortOrderDesc, +} + +// GetListInventoryResourcesSortOrderEnumValues Enumerates the set of values for ListInventoryResourcesSortOrderEnum +func GetListInventoryResourcesSortOrderEnumValues() []ListInventoryResourcesSortOrderEnum { + values := make([]ListInventoryResourcesSortOrderEnum, 0) + for _, v := range mappingListInventoryResourcesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInventoryResourcesSortOrderEnumStringValues Enumerates the set of values in String for ListInventoryResourcesSortOrderEnum +func GetListInventoryResourcesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInventoryResourcesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInventoryResourcesSortOrderEnum(val string) (ListInventoryResourcesSortOrderEnum, bool) { + enum, ok := mappingListInventoryResourcesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInventoryResourcesSortByEnum Enum with underlying type: string +type ListInventoryResourcesSortByEnum string + +// Set of constants representing the allowable values for ListInventoryResourcesSortByEnum +const ( + ListInventoryResourcesSortByTimecreated ListInventoryResourcesSortByEnum = "timeCreated" + ListInventoryResourcesSortByDisplayname ListInventoryResourcesSortByEnum = "displayName" +) + +var mappingListInventoryResourcesSortByEnum = map[string]ListInventoryResourcesSortByEnum{ + "timeCreated": ListInventoryResourcesSortByTimecreated, + "displayName": ListInventoryResourcesSortByDisplayname, +} + +var mappingListInventoryResourcesSortByEnumLowerCase = map[string]ListInventoryResourcesSortByEnum{ + "timecreated": ListInventoryResourcesSortByTimecreated, + "displayname": ListInventoryResourcesSortByDisplayname, +} + +// GetListInventoryResourcesSortByEnumValues Enumerates the set of values for ListInventoryResourcesSortByEnum +func GetListInventoryResourcesSortByEnumValues() []ListInventoryResourcesSortByEnum { + values := make([]ListInventoryResourcesSortByEnum, 0) + for _, v := range mappingListInventoryResourcesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInventoryResourcesSortByEnumStringValues Enumerates the set of values in String for ListInventoryResourcesSortByEnum +func GetListInventoryResourcesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListInventoryResourcesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInventoryResourcesSortByEnum(val string) (ListInventoryResourcesSortByEnum, bool) { + enum, ok := mappingListInventoryResourcesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_maintenance_windows_request_response.go b/fleetappsmanagement/list_maintenance_windows_request_response.go new file mode 100644 index 0000000000..de4451ebd3 --- /dev/null +++ b/fleetappsmanagement/list_maintenance_windows_request_response.go @@ -0,0 +1,212 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMaintenanceWindowsRequest wrapper for the ListMaintenanceWindows operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListMaintenanceWindows.go.html to see an example of how to use ListMaintenanceWindowsRequest. +type ListMaintenanceWindowsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState MaintenanceWindowLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique MaintenanceWindow identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListMaintenanceWindowsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListMaintenanceWindowsSortByEnum `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 ListMaintenanceWindowsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMaintenanceWindowsRequest) 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 ListMaintenanceWindowsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMaintenanceWindowsRequest) 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 ListMaintenanceWindowsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMaintenanceWindowLifecycleStateEnum(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(GetMaintenanceWindowLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListMaintenanceWindowsSortOrderEnum(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(GetListMaintenanceWindowsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListMaintenanceWindowsSortByEnum(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(GetListMaintenanceWindowsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMaintenanceWindowsResponse wrapper for the ListMaintenanceWindows operation +type ListMaintenanceWindowsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of MaintenanceWindowCollection instances + MaintenanceWindowCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // A number representing the the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response ListMaintenanceWindowsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMaintenanceWindowsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListMaintenanceWindowsSortOrderEnum Enum with underlying type: string +type ListMaintenanceWindowsSortOrderEnum string + +// Set of constants representing the allowable values for ListMaintenanceWindowsSortOrderEnum +const ( + ListMaintenanceWindowsSortOrderAsc ListMaintenanceWindowsSortOrderEnum = "ASC" + ListMaintenanceWindowsSortOrderDesc ListMaintenanceWindowsSortOrderEnum = "DESC" +) + +var mappingListMaintenanceWindowsSortOrderEnum = map[string]ListMaintenanceWindowsSortOrderEnum{ + "ASC": ListMaintenanceWindowsSortOrderAsc, + "DESC": ListMaintenanceWindowsSortOrderDesc, +} + +var mappingListMaintenanceWindowsSortOrderEnumLowerCase = map[string]ListMaintenanceWindowsSortOrderEnum{ + "asc": ListMaintenanceWindowsSortOrderAsc, + "desc": ListMaintenanceWindowsSortOrderDesc, +} + +// GetListMaintenanceWindowsSortOrderEnumValues Enumerates the set of values for ListMaintenanceWindowsSortOrderEnum +func GetListMaintenanceWindowsSortOrderEnumValues() []ListMaintenanceWindowsSortOrderEnum { + values := make([]ListMaintenanceWindowsSortOrderEnum, 0) + for _, v := range mappingListMaintenanceWindowsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListMaintenanceWindowsSortOrderEnumStringValues Enumerates the set of values in String for ListMaintenanceWindowsSortOrderEnum +func GetListMaintenanceWindowsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListMaintenanceWindowsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMaintenanceWindowsSortOrderEnum(val string) (ListMaintenanceWindowsSortOrderEnum, bool) { + enum, ok := mappingListMaintenanceWindowsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListMaintenanceWindowsSortByEnum Enum with underlying type: string +type ListMaintenanceWindowsSortByEnum string + +// Set of constants representing the allowable values for ListMaintenanceWindowsSortByEnum +const ( + ListMaintenanceWindowsSortByTimecreated ListMaintenanceWindowsSortByEnum = "timeCreated" + ListMaintenanceWindowsSortByDisplayname ListMaintenanceWindowsSortByEnum = "displayName" +) + +var mappingListMaintenanceWindowsSortByEnum = map[string]ListMaintenanceWindowsSortByEnum{ + "timeCreated": ListMaintenanceWindowsSortByTimecreated, + "displayName": ListMaintenanceWindowsSortByDisplayname, +} + +var mappingListMaintenanceWindowsSortByEnumLowerCase = map[string]ListMaintenanceWindowsSortByEnum{ + "timecreated": ListMaintenanceWindowsSortByTimecreated, + "displayname": ListMaintenanceWindowsSortByDisplayname, +} + +// GetListMaintenanceWindowsSortByEnumValues Enumerates the set of values for ListMaintenanceWindowsSortByEnum +func GetListMaintenanceWindowsSortByEnumValues() []ListMaintenanceWindowsSortByEnum { + values := make([]ListMaintenanceWindowsSortByEnum, 0) + for _, v := range mappingListMaintenanceWindowsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListMaintenanceWindowsSortByEnumStringValues Enumerates the set of values in String for ListMaintenanceWindowsSortByEnum +func GetListMaintenanceWindowsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListMaintenanceWindowsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMaintenanceWindowsSortByEnum(val string) (ListMaintenanceWindowsSortByEnum, bool) { + enum, ok := mappingListMaintenanceWindowsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_onboarding_policies_request_response.go b/fleetappsmanagement/list_onboarding_policies_request_response.go new file mode 100644 index 0000000000..ed8e5c8b75 --- /dev/null +++ b/fleetappsmanagement/list_onboarding_policies_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListOnboardingPoliciesRequest wrapper for the ListOnboardingPolicies operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardingPolicies.go.html to see an example of how to use ListOnboardingPoliciesRequest. +type ListOnboardingPoliciesRequest struct { + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListOnboardingPoliciesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + SortBy ListOnboardingPoliciesSortByEnum `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 ListOnboardingPoliciesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListOnboardingPoliciesRequest) 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 ListOnboardingPoliciesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListOnboardingPoliciesRequest) 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 ListOnboardingPoliciesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListOnboardingPoliciesSortOrderEnum(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(GetListOnboardingPoliciesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListOnboardingPoliciesSortByEnum(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(GetListOnboardingPoliciesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListOnboardingPoliciesResponse wrapper for the ListOnboardingPolicies operation +type ListOnboardingPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of OnboardingPolicyCollection instances + OnboardingPolicyCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListOnboardingPoliciesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListOnboardingPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListOnboardingPoliciesSortOrderEnum Enum with underlying type: string +type ListOnboardingPoliciesSortOrderEnum string + +// Set of constants representing the allowable values for ListOnboardingPoliciesSortOrderEnum +const ( + ListOnboardingPoliciesSortOrderAsc ListOnboardingPoliciesSortOrderEnum = "ASC" + ListOnboardingPoliciesSortOrderDesc ListOnboardingPoliciesSortOrderEnum = "DESC" +) + +var mappingListOnboardingPoliciesSortOrderEnum = map[string]ListOnboardingPoliciesSortOrderEnum{ + "ASC": ListOnboardingPoliciesSortOrderAsc, + "DESC": ListOnboardingPoliciesSortOrderDesc, +} + +var mappingListOnboardingPoliciesSortOrderEnumLowerCase = map[string]ListOnboardingPoliciesSortOrderEnum{ + "asc": ListOnboardingPoliciesSortOrderAsc, + "desc": ListOnboardingPoliciesSortOrderDesc, +} + +// GetListOnboardingPoliciesSortOrderEnumValues Enumerates the set of values for ListOnboardingPoliciesSortOrderEnum +func GetListOnboardingPoliciesSortOrderEnumValues() []ListOnboardingPoliciesSortOrderEnum { + values := make([]ListOnboardingPoliciesSortOrderEnum, 0) + for _, v := range mappingListOnboardingPoliciesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListOnboardingPoliciesSortOrderEnumStringValues Enumerates the set of values in String for ListOnboardingPoliciesSortOrderEnum +func GetListOnboardingPoliciesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListOnboardingPoliciesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOnboardingPoliciesSortOrderEnum(val string) (ListOnboardingPoliciesSortOrderEnum, bool) { + enum, ok := mappingListOnboardingPoliciesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListOnboardingPoliciesSortByEnum Enum with underlying type: string +type ListOnboardingPoliciesSortByEnum string + +// Set of constants representing the allowable values for ListOnboardingPoliciesSortByEnum +const ( + ListOnboardingPoliciesSortByTimecreated ListOnboardingPoliciesSortByEnum = "timeCreated" +) + +var mappingListOnboardingPoliciesSortByEnum = map[string]ListOnboardingPoliciesSortByEnum{ + "timeCreated": ListOnboardingPoliciesSortByTimecreated, +} + +var mappingListOnboardingPoliciesSortByEnumLowerCase = map[string]ListOnboardingPoliciesSortByEnum{ + "timecreated": ListOnboardingPoliciesSortByTimecreated, +} + +// GetListOnboardingPoliciesSortByEnumValues Enumerates the set of values for ListOnboardingPoliciesSortByEnum +func GetListOnboardingPoliciesSortByEnumValues() []ListOnboardingPoliciesSortByEnum { + values := make([]ListOnboardingPoliciesSortByEnum, 0) + for _, v := range mappingListOnboardingPoliciesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListOnboardingPoliciesSortByEnumStringValues Enumerates the set of values in String for ListOnboardingPoliciesSortByEnum +func GetListOnboardingPoliciesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + } +} + +// GetMappingListOnboardingPoliciesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOnboardingPoliciesSortByEnum(val string) (ListOnboardingPoliciesSortByEnum, bool) { + enum, ok := mappingListOnboardingPoliciesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_onboardings_request_response.go b/fleetappsmanagement/list_onboardings_request_response.go new file mode 100644 index 0000000000..ed3c9d9d1e --- /dev/null +++ b/fleetappsmanagement/list_onboardings_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListOnboardingsRequest wrapper for the ListOnboardings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardings.go.html to see an example of how to use ListOnboardingsRequest. +type ListOnboardingsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState OnboardingLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // unique onboarding identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListOnboardingsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListOnboardingsSortByEnum `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 ListOnboardingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListOnboardingsRequest) 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 ListOnboardingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListOnboardingsRequest) 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 ListOnboardingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOnboardingLifecycleStateEnum(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(GetOnboardingLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListOnboardingsSortOrderEnum(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(GetListOnboardingsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListOnboardingsSortByEnum(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(GetListOnboardingsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListOnboardingsResponse wrapper for the ListOnboardings operation +type ListOnboardingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of OnboardingCollection instances + OnboardingCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListOnboardingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListOnboardingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListOnboardingsSortOrderEnum Enum with underlying type: string +type ListOnboardingsSortOrderEnum string + +// Set of constants representing the allowable values for ListOnboardingsSortOrderEnum +const ( + ListOnboardingsSortOrderAsc ListOnboardingsSortOrderEnum = "ASC" + ListOnboardingsSortOrderDesc ListOnboardingsSortOrderEnum = "DESC" +) + +var mappingListOnboardingsSortOrderEnum = map[string]ListOnboardingsSortOrderEnum{ + "ASC": ListOnboardingsSortOrderAsc, + "DESC": ListOnboardingsSortOrderDesc, +} + +var mappingListOnboardingsSortOrderEnumLowerCase = map[string]ListOnboardingsSortOrderEnum{ + "asc": ListOnboardingsSortOrderAsc, + "desc": ListOnboardingsSortOrderDesc, +} + +// GetListOnboardingsSortOrderEnumValues Enumerates the set of values for ListOnboardingsSortOrderEnum +func GetListOnboardingsSortOrderEnumValues() []ListOnboardingsSortOrderEnum { + values := make([]ListOnboardingsSortOrderEnum, 0) + for _, v := range mappingListOnboardingsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListOnboardingsSortOrderEnumStringValues Enumerates the set of values in String for ListOnboardingsSortOrderEnum +func GetListOnboardingsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListOnboardingsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOnboardingsSortOrderEnum(val string) (ListOnboardingsSortOrderEnum, bool) { + enum, ok := mappingListOnboardingsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListOnboardingsSortByEnum Enum with underlying type: string +type ListOnboardingsSortByEnum string + +// Set of constants representing the allowable values for ListOnboardingsSortByEnum +const ( + ListOnboardingsSortByTimecreated ListOnboardingsSortByEnum = "timeCreated" + ListOnboardingsSortByDisplayname ListOnboardingsSortByEnum = "displayName" +) + +var mappingListOnboardingsSortByEnum = map[string]ListOnboardingsSortByEnum{ + "timeCreated": ListOnboardingsSortByTimecreated, + "displayName": ListOnboardingsSortByDisplayname, +} + +var mappingListOnboardingsSortByEnumLowerCase = map[string]ListOnboardingsSortByEnum{ + "timecreated": ListOnboardingsSortByTimecreated, + "displayname": ListOnboardingsSortByDisplayname, +} + +// GetListOnboardingsSortByEnumValues Enumerates the set of values for ListOnboardingsSortByEnum +func GetListOnboardingsSortByEnumValues() []ListOnboardingsSortByEnum { + values := make([]ListOnboardingsSortByEnum, 0) + for _, v := range mappingListOnboardingsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListOnboardingsSortByEnumStringValues Enumerates the set of values in String for ListOnboardingsSortByEnum +func GetListOnboardingsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListOnboardingsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOnboardingsSortByEnum(val string) (ListOnboardingsSortByEnum, bool) { + enum, ok := mappingListOnboardingsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_properties_request_response.go b/fleetappsmanagement/list_properties_request_response.go new file mode 100644 index 0000000000..0d84cd27f3 --- /dev/null +++ b/fleetappsmanagement/list_properties_request_response.go @@ -0,0 +1,257 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPropertiesRequest wrapper for the ListProperties operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListProperties.go.html to see an example of how to use ListPropertiesRequest. +type ListPropertiesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState PropertyLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique Property identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // A filter to return only resources their scope matches the given lifecycleState. + Scope ListPropertiesScopeEnum `mandatory:"false" contributesTo:"query" name:"scope" omitEmpty:"true"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListPropertiesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListPropertiesSortByEnum `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 ListPropertiesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPropertiesRequest) 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 ListPropertiesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPropertiesRequest) 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 ListPropertiesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPropertyLifecycleStateEnum(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(GetPropertyLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListPropertiesScopeEnum(string(request.Scope)); !ok && request.Scope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Scope: %s. Supported values are: %s.", request.Scope, strings.Join(GetListPropertiesScopeEnumStringValues(), ","))) + } + if _, ok := GetMappingListPropertiesSortOrderEnum(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(GetListPropertiesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPropertiesSortByEnum(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(GetListPropertiesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPropertiesResponse wrapper for the ListProperties operation +type ListPropertiesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PropertyCollection instances + PropertyCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPropertiesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPropertiesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPropertiesScopeEnum Enum with underlying type: string +type ListPropertiesScopeEnum string + +// Set of constants representing the allowable values for ListPropertiesScopeEnum +const ( + ListPropertiesScopeTaxonomy ListPropertiesScopeEnum = "TAXONOMY" + ListPropertiesScopePlatformConfig ListPropertiesScopeEnum = "PLATFORM_CONFIG" +) + +var mappingListPropertiesScopeEnum = map[string]ListPropertiesScopeEnum{ + "TAXONOMY": ListPropertiesScopeTaxonomy, + "PLATFORM_CONFIG": ListPropertiesScopePlatformConfig, +} + +var mappingListPropertiesScopeEnumLowerCase = map[string]ListPropertiesScopeEnum{ + "taxonomy": ListPropertiesScopeTaxonomy, + "platform_config": ListPropertiesScopePlatformConfig, +} + +// GetListPropertiesScopeEnumValues Enumerates the set of values for ListPropertiesScopeEnum +func GetListPropertiesScopeEnumValues() []ListPropertiesScopeEnum { + values := make([]ListPropertiesScopeEnum, 0) + for _, v := range mappingListPropertiesScopeEnum { + values = append(values, v) + } + return values +} + +// GetListPropertiesScopeEnumStringValues Enumerates the set of values in String for ListPropertiesScopeEnum +func GetListPropertiesScopeEnumStringValues() []string { + return []string{ + "TAXONOMY", + "PLATFORM_CONFIG", + } +} + +// GetMappingListPropertiesScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPropertiesScopeEnum(val string) (ListPropertiesScopeEnum, bool) { + enum, ok := mappingListPropertiesScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPropertiesSortOrderEnum Enum with underlying type: string +type ListPropertiesSortOrderEnum string + +// Set of constants representing the allowable values for ListPropertiesSortOrderEnum +const ( + ListPropertiesSortOrderAsc ListPropertiesSortOrderEnum = "ASC" + ListPropertiesSortOrderDesc ListPropertiesSortOrderEnum = "DESC" +) + +var mappingListPropertiesSortOrderEnum = map[string]ListPropertiesSortOrderEnum{ + "ASC": ListPropertiesSortOrderAsc, + "DESC": ListPropertiesSortOrderDesc, +} + +var mappingListPropertiesSortOrderEnumLowerCase = map[string]ListPropertiesSortOrderEnum{ + "asc": ListPropertiesSortOrderAsc, + "desc": ListPropertiesSortOrderDesc, +} + +// GetListPropertiesSortOrderEnumValues Enumerates the set of values for ListPropertiesSortOrderEnum +func GetListPropertiesSortOrderEnumValues() []ListPropertiesSortOrderEnum { + values := make([]ListPropertiesSortOrderEnum, 0) + for _, v := range mappingListPropertiesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPropertiesSortOrderEnumStringValues Enumerates the set of values in String for ListPropertiesSortOrderEnum +func GetListPropertiesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPropertiesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPropertiesSortOrderEnum(val string) (ListPropertiesSortOrderEnum, bool) { + enum, ok := mappingListPropertiesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPropertiesSortByEnum Enum with underlying type: string +type ListPropertiesSortByEnum string + +// Set of constants representing the allowable values for ListPropertiesSortByEnum +const ( + ListPropertiesSortByTimecreated ListPropertiesSortByEnum = "timeCreated" + ListPropertiesSortByDisplayname ListPropertiesSortByEnum = "displayName" +) + +var mappingListPropertiesSortByEnum = map[string]ListPropertiesSortByEnum{ + "timeCreated": ListPropertiesSortByTimecreated, + "displayName": ListPropertiesSortByDisplayname, +} + +var mappingListPropertiesSortByEnumLowerCase = map[string]ListPropertiesSortByEnum{ + "timecreated": ListPropertiesSortByTimecreated, + "displayname": ListPropertiesSortByDisplayname, +} + +// GetListPropertiesSortByEnumValues Enumerates the set of values for ListPropertiesSortByEnum +func GetListPropertiesSortByEnumValues() []ListPropertiesSortByEnum { + values := make([]ListPropertiesSortByEnum, 0) + for _, v := range mappingListPropertiesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPropertiesSortByEnumStringValues Enumerates the set of values in String for ListPropertiesSortByEnum +func GetListPropertiesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPropertiesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPropertiesSortByEnum(val string) (ListPropertiesSortByEnum, bool) { + enum, ok := mappingListPropertiesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_runbooks_request_response.go b/fleetappsmanagement/list_runbooks_request_response.go new file mode 100644 index 0000000000..f34833eb9c --- /dev/null +++ b/fleetappsmanagement/list_runbooks_request_response.go @@ -0,0 +1,227 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRunbooksRequest wrapper for the ListRunbooks operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListRunbooks.go.html to see an example of how to use ListRunbooksRequest. +type ListRunbooksRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState RunbookLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique Runbook identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The ID of the runbook type. + Type RunbookTypeEnum `mandatory:"false" contributesTo:"query" name:"type" omitEmpty:"true"` + + // The runbook relevance of product or full-stack. + RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"false" contributesTo:"query" name:"runbookRelevance" omitEmpty:"true"` + + // The ID of the runbook platform. + Platform *string `mandatory:"false" contributesTo:"query" name:"platform"` + + // The runbook lifecycle. + Operation *string `mandatory:"false" contributesTo:"query" name:"operation"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListRunbooksSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListRunbooksSortByEnum `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 ListRunbooksRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRunbooksRequest) 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 ListRunbooksRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRunbooksRequest) 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 ListRunbooksRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRunbookLifecycleStateEnum(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(GetRunbookLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingRunbookTypeEnum(string(request.Type)); !ok && request.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", request.Type, strings.Join(GetRunbookTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRunbookRunbookRelevanceEnum(string(request.RunbookRelevance)); !ok && request.RunbookRelevance != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RunbookRelevance: %s. Supported values are: %s.", request.RunbookRelevance, strings.Join(GetRunbookRunbookRelevanceEnumStringValues(), ","))) + } + if _, ok := GetMappingListRunbooksSortOrderEnum(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(GetListRunbooksSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListRunbooksSortByEnum(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(GetListRunbooksSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRunbooksResponse wrapper for the ListRunbooks operation +type ListRunbooksResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RunbookCollection instances + RunbookCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListRunbooksResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRunbooksResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListRunbooksSortOrderEnum Enum with underlying type: string +type ListRunbooksSortOrderEnum string + +// Set of constants representing the allowable values for ListRunbooksSortOrderEnum +const ( + ListRunbooksSortOrderAsc ListRunbooksSortOrderEnum = "ASC" + ListRunbooksSortOrderDesc ListRunbooksSortOrderEnum = "DESC" +) + +var mappingListRunbooksSortOrderEnum = map[string]ListRunbooksSortOrderEnum{ + "ASC": ListRunbooksSortOrderAsc, + "DESC": ListRunbooksSortOrderDesc, +} + +var mappingListRunbooksSortOrderEnumLowerCase = map[string]ListRunbooksSortOrderEnum{ + "asc": ListRunbooksSortOrderAsc, + "desc": ListRunbooksSortOrderDesc, +} + +// GetListRunbooksSortOrderEnumValues Enumerates the set of values for ListRunbooksSortOrderEnum +func GetListRunbooksSortOrderEnumValues() []ListRunbooksSortOrderEnum { + values := make([]ListRunbooksSortOrderEnum, 0) + for _, v := range mappingListRunbooksSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListRunbooksSortOrderEnumStringValues Enumerates the set of values in String for ListRunbooksSortOrderEnum +func GetListRunbooksSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListRunbooksSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRunbooksSortOrderEnum(val string) (ListRunbooksSortOrderEnum, bool) { + enum, ok := mappingListRunbooksSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRunbooksSortByEnum Enum with underlying type: string +type ListRunbooksSortByEnum string + +// Set of constants representing the allowable values for ListRunbooksSortByEnum +const ( + ListRunbooksSortByTimecreated ListRunbooksSortByEnum = "timeCreated" + ListRunbooksSortByDisplayname ListRunbooksSortByEnum = "displayName" +) + +var mappingListRunbooksSortByEnum = map[string]ListRunbooksSortByEnum{ + "timeCreated": ListRunbooksSortByTimecreated, + "displayName": ListRunbooksSortByDisplayname, +} + +var mappingListRunbooksSortByEnumLowerCase = map[string]ListRunbooksSortByEnum{ + "timecreated": ListRunbooksSortByTimecreated, + "displayname": ListRunbooksSortByDisplayname, +} + +// GetListRunbooksSortByEnumValues Enumerates the set of values for ListRunbooksSortByEnum +func GetListRunbooksSortByEnumValues() []ListRunbooksSortByEnum { + values := make([]ListRunbooksSortByEnum, 0) + for _, v := range mappingListRunbooksSortByEnum { + values = append(values, v) + } + return values +} + +// GetListRunbooksSortByEnumStringValues Enumerates the set of values in String for ListRunbooksSortByEnum +func GetListRunbooksSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListRunbooksSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRunbooksSortByEnum(val string) (ListRunbooksSortByEnum, bool) { + enum, ok := mappingListRunbooksSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_scheduled_fleets_request_response.go b/fleetappsmanagement/list_scheduled_fleets_request_response.go new file mode 100644 index 0000000000..62b84a799b --- /dev/null +++ b/fleetappsmanagement/list_scheduled_fleets_request_response.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListScheduledFleetsRequest wrapper for the ListScheduledFleets operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListScheduledFleets.go.html to see an example of how to use ListScheduledFleetsRequest. +type ListScheduledFleetsRequest struct { + + // unique SchedulerDefinition identifier + SchedulerDefinitionId *string `mandatory:"true" contributesTo:"path" name:"schedulerDefinitionId"` + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListScheduledFleetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for displayName is ascending. + SortBy ListScheduledFleetsSortByEnum `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 ListScheduledFleetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListScheduledFleetsRequest) 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 ListScheduledFleetsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListScheduledFleetsRequest) 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 ListScheduledFleetsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListScheduledFleetsSortOrderEnum(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(GetListScheduledFleetsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListScheduledFleetsSortByEnum(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(GetListScheduledFleetsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListScheduledFleetsResponse wrapper for the ListScheduledFleets operation +type ListScheduledFleetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ScheduledFleetCollection instances + ScheduledFleetCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListScheduledFleetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListScheduledFleetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListScheduledFleetsSortOrderEnum Enum with underlying type: string +type ListScheduledFleetsSortOrderEnum string + +// Set of constants representing the allowable values for ListScheduledFleetsSortOrderEnum +const ( + ListScheduledFleetsSortOrderAsc ListScheduledFleetsSortOrderEnum = "ASC" + ListScheduledFleetsSortOrderDesc ListScheduledFleetsSortOrderEnum = "DESC" +) + +var mappingListScheduledFleetsSortOrderEnum = map[string]ListScheduledFleetsSortOrderEnum{ + "ASC": ListScheduledFleetsSortOrderAsc, + "DESC": ListScheduledFleetsSortOrderDesc, +} + +var mappingListScheduledFleetsSortOrderEnumLowerCase = map[string]ListScheduledFleetsSortOrderEnum{ + "asc": ListScheduledFleetsSortOrderAsc, + "desc": ListScheduledFleetsSortOrderDesc, +} + +// GetListScheduledFleetsSortOrderEnumValues Enumerates the set of values for ListScheduledFleetsSortOrderEnum +func GetListScheduledFleetsSortOrderEnumValues() []ListScheduledFleetsSortOrderEnum { + values := make([]ListScheduledFleetsSortOrderEnum, 0) + for _, v := range mappingListScheduledFleetsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListScheduledFleetsSortOrderEnumStringValues Enumerates the set of values in String for ListScheduledFleetsSortOrderEnum +func GetListScheduledFleetsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListScheduledFleetsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListScheduledFleetsSortOrderEnum(val string) (ListScheduledFleetsSortOrderEnum, bool) { + enum, ok := mappingListScheduledFleetsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListScheduledFleetsSortByEnum Enum with underlying type: string +type ListScheduledFleetsSortByEnum string + +// Set of constants representing the allowable values for ListScheduledFleetsSortByEnum +const ( + ListScheduledFleetsSortByDisplayname ListScheduledFleetsSortByEnum = "displayName" +) + +var mappingListScheduledFleetsSortByEnum = map[string]ListScheduledFleetsSortByEnum{ + "displayName": ListScheduledFleetsSortByDisplayname, +} + +var mappingListScheduledFleetsSortByEnumLowerCase = map[string]ListScheduledFleetsSortByEnum{ + "displayname": ListScheduledFleetsSortByDisplayname, +} + +// GetListScheduledFleetsSortByEnumValues Enumerates the set of values for ListScheduledFleetsSortByEnum +func GetListScheduledFleetsSortByEnumValues() []ListScheduledFleetsSortByEnum { + values := make([]ListScheduledFleetsSortByEnum, 0) + for _, v := range mappingListScheduledFleetsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListScheduledFleetsSortByEnumStringValues Enumerates the set of values in String for ListScheduledFleetsSortByEnum +func GetListScheduledFleetsSortByEnumStringValues() []string { + return []string{ + "displayName", + } +} + +// GetMappingListScheduledFleetsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListScheduledFleetsSortByEnum(val string) (ListScheduledFleetsSortByEnum, bool) { + enum, ok := mappingListScheduledFleetsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_scheduler_definitions_request_response.go b/fleetappsmanagement/list_scheduler_definitions_request_response.go new file mode 100644 index 0000000000..9f5587f9c0 --- /dev/null +++ b/fleetappsmanagement/list_scheduler_definitions_request_response.go @@ -0,0 +1,225 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSchedulerDefinitionsRequest wrapper for the ListSchedulerDefinitions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerDefinitions.go.html to see an example of how to use ListSchedulerDefinitionsRequest. +type ListSchedulerDefinitionsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState SchedulerDefinitionLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only Scheduler Definitions whose assocaited product matches the given product + Product *string `mandatory:"false" contributesTo:"query" name:"product"` + + // unique SchedulerDefinition identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // unique MaintenanceWindow identifier + MaintenanceWindowId *string `mandatory:"false" contributesTo:"query" name:"maintenanceWindowId"` + + // unique Fleet identifier + FleetId *string `mandatory:"false" contributesTo:"query" name:"fleetId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListSchedulerDefinitionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeOfNextRun is descending. Default order for displayName is ascending. + SortBy ListSchedulerDefinitionsSortByEnum `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 ListSchedulerDefinitionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSchedulerDefinitionsRequest) 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 ListSchedulerDefinitionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSchedulerDefinitionsRequest) 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 ListSchedulerDefinitionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSchedulerDefinitionLifecycleStateEnum(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(GetSchedulerDefinitionLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListSchedulerDefinitionsSortOrderEnum(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(GetListSchedulerDefinitionsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListSchedulerDefinitionsSortByEnum(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(GetListSchedulerDefinitionsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSchedulerDefinitionsResponse wrapper for the ListSchedulerDefinitions operation +type ListSchedulerDefinitionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SchedulerDefinitionCollection instances + SchedulerDefinitionCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // A number representing the the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response ListSchedulerDefinitionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSchedulerDefinitionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSchedulerDefinitionsSortOrderEnum Enum with underlying type: string +type ListSchedulerDefinitionsSortOrderEnum string + +// Set of constants representing the allowable values for ListSchedulerDefinitionsSortOrderEnum +const ( + ListSchedulerDefinitionsSortOrderAsc ListSchedulerDefinitionsSortOrderEnum = "ASC" + ListSchedulerDefinitionsSortOrderDesc ListSchedulerDefinitionsSortOrderEnum = "DESC" +) + +var mappingListSchedulerDefinitionsSortOrderEnum = map[string]ListSchedulerDefinitionsSortOrderEnum{ + "ASC": ListSchedulerDefinitionsSortOrderAsc, + "DESC": ListSchedulerDefinitionsSortOrderDesc, +} + +var mappingListSchedulerDefinitionsSortOrderEnumLowerCase = map[string]ListSchedulerDefinitionsSortOrderEnum{ + "asc": ListSchedulerDefinitionsSortOrderAsc, + "desc": ListSchedulerDefinitionsSortOrderDesc, +} + +// GetListSchedulerDefinitionsSortOrderEnumValues Enumerates the set of values for ListSchedulerDefinitionsSortOrderEnum +func GetListSchedulerDefinitionsSortOrderEnumValues() []ListSchedulerDefinitionsSortOrderEnum { + values := make([]ListSchedulerDefinitionsSortOrderEnum, 0) + for _, v := range mappingListSchedulerDefinitionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSchedulerDefinitionsSortOrderEnumStringValues Enumerates the set of values in String for ListSchedulerDefinitionsSortOrderEnum +func GetListSchedulerDefinitionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSchedulerDefinitionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSchedulerDefinitionsSortOrderEnum(val string) (ListSchedulerDefinitionsSortOrderEnum, bool) { + enum, ok := mappingListSchedulerDefinitionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSchedulerDefinitionsSortByEnum Enum with underlying type: string +type ListSchedulerDefinitionsSortByEnum string + +// Set of constants representing the allowable values for ListSchedulerDefinitionsSortByEnum +const ( + ListSchedulerDefinitionsSortByTimecreated ListSchedulerDefinitionsSortByEnum = "timeCreated" + ListSchedulerDefinitionsSortByDisplayname ListSchedulerDefinitionsSortByEnum = "displayName" + ListSchedulerDefinitionsSortByTimeofnextrun ListSchedulerDefinitionsSortByEnum = "timeOfNextRun" +) + +var mappingListSchedulerDefinitionsSortByEnum = map[string]ListSchedulerDefinitionsSortByEnum{ + "timeCreated": ListSchedulerDefinitionsSortByTimecreated, + "displayName": ListSchedulerDefinitionsSortByDisplayname, + "timeOfNextRun": ListSchedulerDefinitionsSortByTimeofnextrun, +} + +var mappingListSchedulerDefinitionsSortByEnumLowerCase = map[string]ListSchedulerDefinitionsSortByEnum{ + "timecreated": ListSchedulerDefinitionsSortByTimecreated, + "displayname": ListSchedulerDefinitionsSortByDisplayname, + "timeofnextrun": ListSchedulerDefinitionsSortByTimeofnextrun, +} + +// GetListSchedulerDefinitionsSortByEnumValues Enumerates the set of values for ListSchedulerDefinitionsSortByEnum +func GetListSchedulerDefinitionsSortByEnumValues() []ListSchedulerDefinitionsSortByEnum { + values := make([]ListSchedulerDefinitionsSortByEnum, 0) + for _, v := range mappingListSchedulerDefinitionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSchedulerDefinitionsSortByEnumStringValues Enumerates the set of values in String for ListSchedulerDefinitionsSortByEnum +func GetListSchedulerDefinitionsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + "timeOfNextRun", + } +} + +// GetMappingListSchedulerDefinitionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSchedulerDefinitionsSortByEnum(val string) (ListSchedulerDefinitionsSortByEnum, bool) { + enum, ok := mappingListSchedulerDefinitionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_scheduler_jobs_request_response.go b/fleetappsmanagement/list_scheduler_jobs_request_response.go new file mode 100644 index 0000000000..f07cd84c04 --- /dev/null +++ b/fleetappsmanagement/list_scheduler_jobs_request_response.go @@ -0,0 +1,228 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSchedulerJobsRequest wrapper for the ListSchedulerJobs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerJobs.go.html to see an example of how to use ListSchedulerJobsRequest. +type ListSchedulerJobsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState SchedulerJobLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // unique Fleet identifier + FleetId *string `mandatory:"false" contributesTo:"query" name:"fleetId"` + + // Scheduled Time + TimeScheduledGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeScheduledGreaterThanOrEqualTo"` + + // Scheduled Time + TimeScheduledLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeScheduledLessThan"` + + // Fetch next remediation Job + IsRemediationJobNeeded *bool `mandatory:"false" contributesTo:"query" name:"isRemediationJobNeeded"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique SchedulerJob identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // SchedulerJob Definition identifier + DefintionId *string `mandatory:"false" contributesTo:"query" name:"defintionId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListSchedulerJobsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeScheduled is descending. Default order for displayName is ascending. + SortBy ListSchedulerJobsSortByEnum `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 ListSchedulerJobsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSchedulerJobsRequest) 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 ListSchedulerJobsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSchedulerJobsRequest) 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 ListSchedulerJobsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSchedulerJobLifecycleStateEnum(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(GetSchedulerJobLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListSchedulerJobsSortOrderEnum(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(GetListSchedulerJobsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListSchedulerJobsSortByEnum(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(GetListSchedulerJobsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSchedulerJobsResponse wrapper for the ListSchedulerJobs operation +type ListSchedulerJobsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SchedulerJobCollection instances + SchedulerJobCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSchedulerJobsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSchedulerJobsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSchedulerJobsSortOrderEnum Enum with underlying type: string +type ListSchedulerJobsSortOrderEnum string + +// Set of constants representing the allowable values for ListSchedulerJobsSortOrderEnum +const ( + ListSchedulerJobsSortOrderAsc ListSchedulerJobsSortOrderEnum = "ASC" + ListSchedulerJobsSortOrderDesc ListSchedulerJobsSortOrderEnum = "DESC" +) + +var mappingListSchedulerJobsSortOrderEnum = map[string]ListSchedulerJobsSortOrderEnum{ + "ASC": ListSchedulerJobsSortOrderAsc, + "DESC": ListSchedulerJobsSortOrderDesc, +} + +var mappingListSchedulerJobsSortOrderEnumLowerCase = map[string]ListSchedulerJobsSortOrderEnum{ + "asc": ListSchedulerJobsSortOrderAsc, + "desc": ListSchedulerJobsSortOrderDesc, +} + +// GetListSchedulerJobsSortOrderEnumValues Enumerates the set of values for ListSchedulerJobsSortOrderEnum +func GetListSchedulerJobsSortOrderEnumValues() []ListSchedulerJobsSortOrderEnum { + values := make([]ListSchedulerJobsSortOrderEnum, 0) + for _, v := range mappingListSchedulerJobsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSchedulerJobsSortOrderEnumStringValues Enumerates the set of values in String for ListSchedulerJobsSortOrderEnum +func GetListSchedulerJobsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSchedulerJobsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSchedulerJobsSortOrderEnum(val string) (ListSchedulerJobsSortOrderEnum, bool) { + enum, ok := mappingListSchedulerJobsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSchedulerJobsSortByEnum Enum with underlying type: string +type ListSchedulerJobsSortByEnum string + +// Set of constants representing the allowable values for ListSchedulerJobsSortByEnum +const ( + ListSchedulerJobsSortByTimecreated ListSchedulerJobsSortByEnum = "timeCreated" + ListSchedulerJobsSortByTimescheduled ListSchedulerJobsSortByEnum = "timeScheduled" + ListSchedulerJobsSortByDisplayname ListSchedulerJobsSortByEnum = "displayName" +) + +var mappingListSchedulerJobsSortByEnum = map[string]ListSchedulerJobsSortByEnum{ + "timeCreated": ListSchedulerJobsSortByTimecreated, + "timeScheduled": ListSchedulerJobsSortByTimescheduled, + "displayName": ListSchedulerJobsSortByDisplayname, +} + +var mappingListSchedulerJobsSortByEnumLowerCase = map[string]ListSchedulerJobsSortByEnum{ + "timecreated": ListSchedulerJobsSortByTimecreated, + "timescheduled": ListSchedulerJobsSortByTimescheduled, + "displayname": ListSchedulerJobsSortByDisplayname, +} + +// GetListSchedulerJobsSortByEnumValues Enumerates the set of values for ListSchedulerJobsSortByEnum +func GetListSchedulerJobsSortByEnumValues() []ListSchedulerJobsSortByEnum { + values := make([]ListSchedulerJobsSortByEnum, 0) + for _, v := range mappingListSchedulerJobsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSchedulerJobsSortByEnumStringValues Enumerates the set of values in String for ListSchedulerJobsSortByEnum +func GetListSchedulerJobsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "timeScheduled", + "displayName", + } +} + +// GetMappingListSchedulerJobsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSchedulerJobsSortByEnum(val string) (ListSchedulerJobsSortByEnum, bool) { + enum, ok := mappingListSchedulerJobsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_targets_request_response.go b/fleetappsmanagement/list_targets_request_response.go new file mode 100644 index 0000000000..40fb5016d5 --- /dev/null +++ b/fleetappsmanagement/list_targets_request_response.go @@ -0,0 +1,200 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListTargetsRequest wrapper for the ListTargets operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListTargets.go.html to see an example of how to use ListTargetsRequest. +type ListTargetsRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListTargetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListTargetsSortByEnum `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 ListTargetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListTargetsRequest) 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 ListTargetsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListTargetsRequest) 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 ListTargetsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListTargetsSortOrderEnum(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(GetListTargetsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListTargetsSortByEnum(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(GetListTargetsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListTargetsResponse wrapper for the ListTargets operation +type ListTargetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FleetTargetCollection instances + FleetTargetCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListTargetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListTargetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListTargetsSortOrderEnum Enum with underlying type: string +type ListTargetsSortOrderEnum string + +// Set of constants representing the allowable values for ListTargetsSortOrderEnum +const ( + ListTargetsSortOrderAsc ListTargetsSortOrderEnum = "ASC" + ListTargetsSortOrderDesc ListTargetsSortOrderEnum = "DESC" +) + +var mappingListTargetsSortOrderEnum = map[string]ListTargetsSortOrderEnum{ + "ASC": ListTargetsSortOrderAsc, + "DESC": ListTargetsSortOrderDesc, +} + +var mappingListTargetsSortOrderEnumLowerCase = map[string]ListTargetsSortOrderEnum{ + "asc": ListTargetsSortOrderAsc, + "desc": ListTargetsSortOrderDesc, +} + +// GetListTargetsSortOrderEnumValues Enumerates the set of values for ListTargetsSortOrderEnum +func GetListTargetsSortOrderEnumValues() []ListTargetsSortOrderEnum { + values := make([]ListTargetsSortOrderEnum, 0) + for _, v := range mappingListTargetsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListTargetsSortOrderEnumStringValues Enumerates the set of values in String for ListTargetsSortOrderEnum +func GetListTargetsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListTargetsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListTargetsSortOrderEnum(val string) (ListTargetsSortOrderEnum, bool) { + enum, ok := mappingListTargetsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListTargetsSortByEnum Enum with underlying type: string +type ListTargetsSortByEnum string + +// Set of constants representing the allowable values for ListTargetsSortByEnum +const ( + ListTargetsSortByTimecreated ListTargetsSortByEnum = "timeCreated" + ListTargetsSortByDisplayname ListTargetsSortByEnum = "displayName" +) + +var mappingListTargetsSortByEnum = map[string]ListTargetsSortByEnum{ + "timeCreated": ListTargetsSortByTimecreated, + "displayName": ListTargetsSortByDisplayname, +} + +var mappingListTargetsSortByEnumLowerCase = map[string]ListTargetsSortByEnum{ + "timecreated": ListTargetsSortByTimecreated, + "displayname": ListTargetsSortByDisplayname, +} + +// GetListTargetsSortByEnumValues Enumerates the set of values for ListTargetsSortByEnum +func GetListTargetsSortByEnumValues() []ListTargetsSortByEnum { + values := make([]ListTargetsSortByEnum, 0) + for _, v := range mappingListTargetsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListTargetsSortByEnumStringValues Enumerates the set of values in String for ListTargetsSortByEnum +func GetListTargetsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListTargetsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListTargetsSortByEnum(val string) (ListTargetsSortByEnum, bool) { + enum, ok := mappingListTargetsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_task_records_request_response.go b/fleetappsmanagement/list_task_records_request_response.go new file mode 100644 index 0000000000..43e4eaa19d --- /dev/null +++ b/fleetappsmanagement/list_task_records_request_response.go @@ -0,0 +1,218 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListTaskRecordsRequest wrapper for the ListTaskRecords operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListTaskRecords.go.html to see an example of how to use ListTaskRecordsRequest. +type ListTaskRecordsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The platform for the Task. + Platform *string `mandatory:"false" contributesTo:"query" name:"platform"` + + // The type of the Task. + Type TaskRecordTypeEnum `mandatory:"false" contributesTo:"query" name:"type" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique TaskDetail identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The current state of the Task. + LifecycleState TaskRecordLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListTaskRecordsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListTaskRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListTaskRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListTaskRecordsRequest) 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 ListTaskRecordsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListTaskRecordsRequest) 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 ListTaskRecordsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTaskRecordTypeEnum(string(request.Type)); !ok && request.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", request.Type, strings.Join(GetTaskRecordTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingTaskRecordLifecycleStateEnum(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(GetTaskRecordLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListTaskRecordsSortByEnum(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(GetListTaskRecordsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListTaskRecordsSortOrderEnum(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(GetListTaskRecordsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListTaskRecordsResponse wrapper for the ListTaskRecords operation +type ListTaskRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of TaskRecordCollection instances + TaskRecordCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListTaskRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListTaskRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListTaskRecordsSortByEnum Enum with underlying type: string +type ListTaskRecordsSortByEnum string + +// Set of constants representing the allowable values for ListTaskRecordsSortByEnum +const ( + ListTaskRecordsSortByTimecreated ListTaskRecordsSortByEnum = "timeCreated" + ListTaskRecordsSortByDisplayname ListTaskRecordsSortByEnum = "displayName" +) + +var mappingListTaskRecordsSortByEnum = map[string]ListTaskRecordsSortByEnum{ + "timeCreated": ListTaskRecordsSortByTimecreated, + "displayName": ListTaskRecordsSortByDisplayname, +} + +var mappingListTaskRecordsSortByEnumLowerCase = map[string]ListTaskRecordsSortByEnum{ + "timecreated": ListTaskRecordsSortByTimecreated, + "displayname": ListTaskRecordsSortByDisplayname, +} + +// GetListTaskRecordsSortByEnumValues Enumerates the set of values for ListTaskRecordsSortByEnum +func GetListTaskRecordsSortByEnumValues() []ListTaskRecordsSortByEnum { + values := make([]ListTaskRecordsSortByEnum, 0) + for _, v := range mappingListTaskRecordsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListTaskRecordsSortByEnumStringValues Enumerates the set of values in String for ListTaskRecordsSortByEnum +func GetListTaskRecordsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListTaskRecordsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListTaskRecordsSortByEnum(val string) (ListTaskRecordsSortByEnum, bool) { + enum, ok := mappingListTaskRecordsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListTaskRecordsSortOrderEnum Enum with underlying type: string +type ListTaskRecordsSortOrderEnum string + +// Set of constants representing the allowable values for ListTaskRecordsSortOrderEnum +const ( + ListTaskRecordsSortOrderAsc ListTaskRecordsSortOrderEnum = "ASC" + ListTaskRecordsSortOrderDesc ListTaskRecordsSortOrderEnum = "DESC" +) + +var mappingListTaskRecordsSortOrderEnum = map[string]ListTaskRecordsSortOrderEnum{ + "ASC": ListTaskRecordsSortOrderAsc, + "DESC": ListTaskRecordsSortOrderDesc, +} + +var mappingListTaskRecordsSortOrderEnumLowerCase = map[string]ListTaskRecordsSortOrderEnum{ + "asc": ListTaskRecordsSortOrderAsc, + "desc": ListTaskRecordsSortOrderDesc, +} + +// GetListTaskRecordsSortOrderEnumValues Enumerates the set of values for ListTaskRecordsSortOrderEnum +func GetListTaskRecordsSortOrderEnumValues() []ListTaskRecordsSortOrderEnum { + values := make([]ListTaskRecordsSortOrderEnum, 0) + for _, v := range mappingListTaskRecordsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListTaskRecordsSortOrderEnumStringValues Enumerates the set of values in String for ListTaskRecordsSortOrderEnum +func GetListTaskRecordsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListTaskRecordsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListTaskRecordsSortOrderEnum(val string) (ListTaskRecordsSortOrderEnum, bool) { + enum, ok := mappingListTaskRecordsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_work_request_errors_request_response.go b/fleetappsmanagement/list_work_request_errors_request_response.go new file mode 100644 index 0000000000..0d094bee79 --- /dev/null +++ b/fleetappsmanagement/list_work_request_errors_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrorsRequest. +type ListWorkRequestErrorsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The 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 timestamp is descending. + SortBy ListWorkRequestErrorsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestErrorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" 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 ListWorkRequestErrorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) 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 ListWorkRequestErrorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestErrorsRequest) 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 ListWorkRequestErrorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestErrorsSortByEnum(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(GetListWorkRequestErrorsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestErrorsSortOrderEnum(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(GetListWorkRequestErrorsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestErrorCollection instances + WorkRequestErrorCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestErrorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestErrorsSortByEnum Enum with underlying type: string +type ListWorkRequestErrorsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortByEnum +const ( + ListWorkRequestErrorsSortByTimestamp ListWorkRequestErrorsSortByEnum = "timestamp" +) + +var mappingListWorkRequestErrorsSortByEnum = map[string]ListWorkRequestErrorsSortByEnum{ + "timestamp": ListWorkRequestErrorsSortByTimestamp, +} + +var mappingListWorkRequestErrorsSortByEnumLowerCase = map[string]ListWorkRequestErrorsSortByEnum{ + "timestamp": ListWorkRequestErrorsSortByTimestamp, +} + +// GetListWorkRequestErrorsSortByEnumValues Enumerates the set of values for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumValues() []ListWorkRequestErrorsSortByEnum { + values := make([]ListWorkRequestErrorsSortByEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListWorkRequestErrorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortByEnum(val string) (ListWorkRequestErrorsSortByEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestErrorsSortOrderEnum Enum with underlying type: string +type ListWorkRequestErrorsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortOrderEnum +const ( + ListWorkRequestErrorsSortOrderAsc ListWorkRequestErrorsSortOrderEnum = "ASC" + ListWorkRequestErrorsSortOrderDesc ListWorkRequestErrorsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestErrorsSortOrderEnum = map[string]ListWorkRequestErrorsSortOrderEnum{ + "ASC": ListWorkRequestErrorsSortOrderAsc, + "DESC": ListWorkRequestErrorsSortOrderDesc, +} + +var mappingListWorkRequestErrorsSortOrderEnumLowerCase = map[string]ListWorkRequestErrorsSortOrderEnum{ + "asc": ListWorkRequestErrorsSortOrderAsc, + "desc": ListWorkRequestErrorsSortOrderDesc, +} + +// GetListWorkRequestErrorsSortOrderEnumValues Enumerates the set of values for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumValues() []ListWorkRequestErrorsSortOrderEnum { + values := make([]ListWorkRequestErrorsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestErrorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortOrderEnum(val string) (ListWorkRequestErrorsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_work_request_logs_request_response.go b/fleetappsmanagement/list_work_request_logs_request_response.go new file mode 100644 index 0000000000..fab8c8cfe4 --- /dev/null +++ b/fleetappsmanagement/list_work_request_logs_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogsRequest. +type ListWorkRequestLogsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The 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 timestamp is descending. + SortBy ListWorkRequestLogsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestLogsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" 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 ListWorkRequestLogsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) 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 ListWorkRequestLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestLogsRequest) 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 ListWorkRequestLogsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestLogsSortByEnum(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(GetListWorkRequestLogsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestLogsSortOrderEnum(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(GetListWorkRequestLogsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestLogEntryCollection instances + WorkRequestLogEntryCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestLogsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestLogsSortByEnum Enum with underlying type: string +type ListWorkRequestLogsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortByEnum +const ( + ListWorkRequestLogsSortByTimestamp ListWorkRequestLogsSortByEnum = "timestamp" +) + +var mappingListWorkRequestLogsSortByEnum = map[string]ListWorkRequestLogsSortByEnum{ + "timestamp": ListWorkRequestLogsSortByTimestamp, +} + +var mappingListWorkRequestLogsSortByEnumLowerCase = map[string]ListWorkRequestLogsSortByEnum{ + "timestamp": ListWorkRequestLogsSortByTimestamp, +} + +// GetListWorkRequestLogsSortByEnumValues Enumerates the set of values for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumValues() []ListWorkRequestLogsSortByEnum { + values := make([]ListWorkRequestLogsSortByEnum, 0) + for _, v := range mappingListWorkRequestLogsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListWorkRequestLogsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortByEnum(val string) (ListWorkRequestLogsSortByEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestLogsSortOrderEnum Enum with underlying type: string +type ListWorkRequestLogsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortOrderEnum +const ( + ListWorkRequestLogsSortOrderAsc ListWorkRequestLogsSortOrderEnum = "ASC" + ListWorkRequestLogsSortOrderDesc ListWorkRequestLogsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestLogsSortOrderEnum = map[string]ListWorkRequestLogsSortOrderEnum{ + "ASC": ListWorkRequestLogsSortOrderAsc, + "DESC": ListWorkRequestLogsSortOrderDesc, +} + +var mappingListWorkRequestLogsSortOrderEnumLowerCase = map[string]ListWorkRequestLogsSortOrderEnum{ + "asc": ListWorkRequestLogsSortOrderAsc, + "desc": ListWorkRequestLogsSortOrderDesc, +} + +// GetListWorkRequestLogsSortOrderEnumValues Enumerates the set of values for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumValues() []ListWorkRequestLogsSortOrderEnum { + values := make([]ListWorkRequestLogsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestLogsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestLogsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortOrderEnum(val string) (ListWorkRequestLogsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/list_work_requests_request_response.go b/fleetappsmanagement/list_work_requests_request_response.go new file mode 100644 index 0000000000..c3f36dfa6a --- /dev/null +++ b/fleetappsmanagement/list_work_requests_request_response.go @@ -0,0 +1,271 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. +type ListWorkRequestsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The ID of the asynchronous work request. + WorkRequestId *string `mandatory:"false" contributesTo:"query" name:"workRequestId"` + + // A filter to return only resources their lifecycleState matches the given OperationStatus. + Status ListWorkRequestsStatusEnum `mandatory:"false" contributesTo:"query" name:"status" omitEmpty:"true"` + + // Resource Identifier + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + SortBy ListWorkRequestsSortByEnum `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 ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) 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 ListWorkRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) 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 ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestsStatusEnum(string(request.Status)); !ok && request.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", request.Status, strings.Join(GetListWorkRequestsStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortOrderEnum(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(GetListWorkRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortByEnum(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(GetListWorkRequestsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestSummaryCollection instances + WorkRequestSummaryCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestsStatusEnum Enum with underlying type: string +type ListWorkRequestsStatusEnum string + +// Set of constants representing the allowable values for ListWorkRequestsStatusEnum +const ( + ListWorkRequestsStatusAccepted ListWorkRequestsStatusEnum = "ACCEPTED" + ListWorkRequestsStatusInProgress ListWorkRequestsStatusEnum = "IN_PROGRESS" + ListWorkRequestsStatusWaiting ListWorkRequestsStatusEnum = "WAITING" + ListWorkRequestsStatusNeedsAttention ListWorkRequestsStatusEnum = "NEEDS_ATTENTION" + ListWorkRequestsStatusFailed ListWorkRequestsStatusEnum = "FAILED" + ListWorkRequestsStatusSucceeded ListWorkRequestsStatusEnum = "SUCCEEDED" + ListWorkRequestsStatusCanceling ListWorkRequestsStatusEnum = "CANCELING" + ListWorkRequestsStatusCanceled ListWorkRequestsStatusEnum = "CANCELED" +) + +var mappingListWorkRequestsStatusEnum = map[string]ListWorkRequestsStatusEnum{ + "ACCEPTED": ListWorkRequestsStatusAccepted, + "IN_PROGRESS": ListWorkRequestsStatusInProgress, + "WAITING": ListWorkRequestsStatusWaiting, + "NEEDS_ATTENTION": ListWorkRequestsStatusNeedsAttention, + "FAILED": ListWorkRequestsStatusFailed, + "SUCCEEDED": ListWorkRequestsStatusSucceeded, + "CANCELING": ListWorkRequestsStatusCanceling, + "CANCELED": ListWorkRequestsStatusCanceled, +} + +var mappingListWorkRequestsStatusEnumLowerCase = map[string]ListWorkRequestsStatusEnum{ + "accepted": ListWorkRequestsStatusAccepted, + "in_progress": ListWorkRequestsStatusInProgress, + "waiting": ListWorkRequestsStatusWaiting, + "needs_attention": ListWorkRequestsStatusNeedsAttention, + "failed": ListWorkRequestsStatusFailed, + "succeeded": ListWorkRequestsStatusSucceeded, + "canceling": ListWorkRequestsStatusCanceling, + "canceled": ListWorkRequestsStatusCanceled, +} + +// GetListWorkRequestsStatusEnumValues Enumerates the set of values for ListWorkRequestsStatusEnum +func GetListWorkRequestsStatusEnumValues() []ListWorkRequestsStatusEnum { + values := make([]ListWorkRequestsStatusEnum, 0) + for _, v := range mappingListWorkRequestsStatusEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsStatusEnumStringValues Enumerates the set of values in String for ListWorkRequestsStatusEnum +func GetListWorkRequestsStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "WAITING", + "NEEDS_ATTENTION", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingListWorkRequestsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsStatusEnum(val string) (ListWorkRequestsStatusEnum, bool) { + enum, ok := mappingListWorkRequestsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortOrderEnum Enum with underlying type: string +type ListWorkRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortOrderEnum +const ( + ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC" + ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestsSortOrderEnum = map[string]ListWorkRequestsSortOrderEnum{ + "ASC": ListWorkRequestsSortOrderAsc, + "DESC": ListWorkRequestsSortOrderDesc, +} + +var mappingListWorkRequestsSortOrderEnumLowerCase = map[string]ListWorkRequestsSortOrderEnum{ + "asc": ListWorkRequestsSortOrderAsc, + "desc": ListWorkRequestsSortOrderDesc, +} + +// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum { + values := make([]ListWorkRequestsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortOrderEnum(val string) (ListWorkRequestsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortByEnum Enum with underlying type: string +type ListWorkRequestsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortByEnum +const ( + ListWorkRequestsSortByTimeaccepted ListWorkRequestsSortByEnum = "timeAccepted" +) + +var mappingListWorkRequestsSortByEnum = map[string]ListWorkRequestsSortByEnum{ + "timeAccepted": ListWorkRequestsSortByTimeaccepted, +} + +var mappingListWorkRequestsSortByEnumLowerCase = map[string]ListWorkRequestsSortByEnum{ + "timeaccepted": ListWorkRequestsSortByTimeaccepted, +} + +// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum { + values := make([]ListWorkRequestsSortByEnum, 0) + for _, v := range mappingListWorkRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + } +} + +// GetMappingListWorkRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortByEnum(val string) (ListWorkRequestsSortByEnum, bool) { + enum, ok := mappingListWorkRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/maintenance_window.go b/fleetappsmanagement/maintenance_window.go new file mode 100644 index 0000000000..bed1d520f5 --- /dev/null +++ b/fleetappsmanagement/maintenance_window.go @@ -0,0 +1,164 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaintenanceWindow Details of Maintenance Window. +type MaintenanceWindow struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Does the maintenenace window cause outage? + IsOutage *bool `mandatory:"true" json:"isOutage"` + + // Duration if schedule type is Custom + Duration *string `mandatory:"true" json:"duration"` + + // Is this is a recurring maintenance window + IsRecurring *bool `mandatory:"true" json:"isRecurring"` + + // Task initiation cutoff + TaskInitiationCutoff *int `mandatory:"true" json:"taskInitiationCutoff"` + + // The current state of the MaintenanceWindow. + LifecycleState MaintenanceWindowLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // 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:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Type of the MaintenanceWindow. + MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` + + // Start time of schedule + TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` + + // Recurrence rule specification if recurring + Recurrences *string `mandatory:"false" json:"recurrences"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m MaintenanceWindow) 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 MaintenanceWindow) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMaintenanceWindowLifecycleStateEnum(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(GetMaintenanceWindowLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingMaintenanceWindowTypeEnum(string(m.MaintenanceWindowType)); !ok && m.MaintenanceWindowType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceWindowType: %s. Supported values are: %s.", m.MaintenanceWindowType, strings.Join(GetMaintenanceWindowTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MaintenanceWindowLifecycleStateEnum Enum with underlying type: string +type MaintenanceWindowLifecycleStateEnum string + +// Set of constants representing the allowable values for MaintenanceWindowLifecycleStateEnum +const ( + MaintenanceWindowLifecycleStateActive MaintenanceWindowLifecycleStateEnum = "ACTIVE" + MaintenanceWindowLifecycleStateDeleted MaintenanceWindowLifecycleStateEnum = "DELETED" + MaintenanceWindowLifecycleStateFailed MaintenanceWindowLifecycleStateEnum = "FAILED" + MaintenanceWindowLifecycleStateDeleting MaintenanceWindowLifecycleStateEnum = "DELETING" + MaintenanceWindowLifecycleStateUpdating MaintenanceWindowLifecycleStateEnum = "UPDATING" + MaintenanceWindowLifecycleStateNeedsAttention MaintenanceWindowLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingMaintenanceWindowLifecycleStateEnum = map[string]MaintenanceWindowLifecycleStateEnum{ + "ACTIVE": MaintenanceWindowLifecycleStateActive, + "DELETED": MaintenanceWindowLifecycleStateDeleted, + "FAILED": MaintenanceWindowLifecycleStateFailed, + "DELETING": MaintenanceWindowLifecycleStateDeleting, + "UPDATING": MaintenanceWindowLifecycleStateUpdating, + "NEEDS_ATTENTION": MaintenanceWindowLifecycleStateNeedsAttention, +} + +var mappingMaintenanceWindowLifecycleStateEnumLowerCase = map[string]MaintenanceWindowLifecycleStateEnum{ + "active": MaintenanceWindowLifecycleStateActive, + "deleted": MaintenanceWindowLifecycleStateDeleted, + "failed": MaintenanceWindowLifecycleStateFailed, + "deleting": MaintenanceWindowLifecycleStateDeleting, + "updating": MaintenanceWindowLifecycleStateUpdating, + "needs_attention": MaintenanceWindowLifecycleStateNeedsAttention, +} + +// GetMaintenanceWindowLifecycleStateEnumValues Enumerates the set of values for MaintenanceWindowLifecycleStateEnum +func GetMaintenanceWindowLifecycleStateEnumValues() []MaintenanceWindowLifecycleStateEnum { + values := make([]MaintenanceWindowLifecycleStateEnum, 0) + for _, v := range mappingMaintenanceWindowLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetMaintenanceWindowLifecycleStateEnumStringValues Enumerates the set of values in String for MaintenanceWindowLifecycleStateEnum +func GetMaintenanceWindowLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + "DELETING", + "UPDATING", + "NEEDS_ATTENTION", + } +} + +// GetMappingMaintenanceWindowLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMaintenanceWindowLifecycleStateEnum(val string) (MaintenanceWindowLifecycleStateEnum, bool) { + enum, ok := mappingMaintenanceWindowLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/maintenance_window_collection.go b/fleetappsmanagement/maintenance_window_collection.go new file mode 100644 index 0000000000..95e26c3273 --- /dev/null +++ b/fleetappsmanagement/maintenance_window_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaintenanceWindowCollection Results of a maintenanceWindow search. Contains boh MaintenanceWindowSummary items and other information, such as metadata. +type MaintenanceWindowCollection struct { + + // List of maintenanceWindows. + Items []MaintenanceWindowSummary `mandatory:"true" json:"items"` +} + +func (m MaintenanceWindowCollection) 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 MaintenanceWindowCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/maintenance_window_summary.go b/fleetappsmanagement/maintenance_window_summary.go new file mode 100644 index 0000000000..8e2eb84c0d --- /dev/null +++ b/fleetappsmanagement/maintenance_window_summary.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaintenanceWindowSummary Summary of the MaintenanceWindow. +type MaintenanceWindowSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Does the maintenenace window cause outage? + IsOutage *bool `mandatory:"true" json:"isOutage"` + + // Duration if schedule type is Custom + Duration *string `mandatory:"true" json:"duration"` + + // Is this is a recurring maintenance window + IsRecurring *bool `mandatory:"true" json:"isRecurring"` + + // Task initiation cutoff + TaskInitiationCutoff *int `mandatory:"true" json:"taskInitiationCutoff"` + + // The current state of the MaintenanceWindow. + LifecycleState MaintenanceWindowLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // 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:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Type of the MaintenanceWindow. + MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` + + // Start time of schedule + TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` + + // Recurrence rule specification if recurring + Recurrences *string `mandatory:"false" json:"recurrences"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m MaintenanceWindowSummary) 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 MaintenanceWindowSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMaintenanceWindowLifecycleStateEnum(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(GetMaintenanceWindowLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingMaintenanceWindowTypeEnum(string(m.MaintenanceWindowType)); !ok && m.MaintenanceWindowType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceWindowType: %s. Supported values are: %s.", m.MaintenanceWindowType, strings.Join(GetMaintenanceWindowTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/maintenance_window_type.go b/fleetappsmanagement/maintenance_window_type.go new file mode 100644 index 0000000000..c232fc0679 --- /dev/null +++ b/fleetappsmanagement/maintenance_window_type.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// MaintenanceWindowTypeEnum Enum with underlying type: string +type MaintenanceWindowTypeEnum string + +// Set of constants representing the allowable values for MaintenanceWindowTypeEnum +const ( + MaintenanceWindowTypeOpenEnded MaintenanceWindowTypeEnum = "OPEN_ENDED" +) + +var mappingMaintenanceWindowTypeEnum = map[string]MaintenanceWindowTypeEnum{ + "OPEN_ENDED": MaintenanceWindowTypeOpenEnded, +} + +var mappingMaintenanceWindowTypeEnumLowerCase = map[string]MaintenanceWindowTypeEnum{ + "open_ended": MaintenanceWindowTypeOpenEnded, +} + +// GetMaintenanceWindowTypeEnumValues Enumerates the set of values for MaintenanceWindowTypeEnum +func GetMaintenanceWindowTypeEnumValues() []MaintenanceWindowTypeEnum { + values := make([]MaintenanceWindowTypeEnum, 0) + for _, v := range mappingMaintenanceWindowTypeEnum { + values = append(values, v) + } + return values +} + +// GetMaintenanceWindowTypeEnumStringValues Enumerates the set of values in String for MaintenanceWindowTypeEnum +func GetMaintenanceWindowTypeEnumStringValues() []string { + return []string{ + "OPEN_ENDED", + } +} + +// GetMappingMaintenanceWindowTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMaintenanceWindowTypeEnum(val string) (MaintenanceWindowTypeEnum, bool) { + enum, ok := mappingMaintenanceWindowTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/notification_preferences.go b/fleetappsmanagement/notification_preferences.go new file mode 100644 index 0000000000..0fb3b638df --- /dev/null +++ b/fleetappsmanagement/notification_preferences.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NotificationPreferences Conditions when met to send notifications on the fleet activities +type NotificationPreferences struct { + + // Topic Id where the notifications will be directed + TopicId *string `mandatory:"true" json:"topicId"` + + // Copartment Id of the topic where the notifications will be directed + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + Preferences *Preferences `mandatory:"false" json:"preferences"` +} + +func (m NotificationPreferences) 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 NotificationPreferences) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/object_storage_bucket_content_details.go b/fleetappsmanagement/object_storage_bucket_content_details.go new file mode 100644 index 0000000000..66ca9b97cd --- /dev/null +++ b/fleetappsmanagement/object_storage_bucket_content_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectStorageBucketContentDetails Details about Object Storage Bucket source. +// Restricted to the region this is called +type ObjectStorageBucketContentDetails struct { + + // Namespace. + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // Bucket Name. + BucketName *string `mandatory:"true" json:"bucketName"` + + // Object Name. + ObjectName *string `mandatory:"true" json:"objectName"` + + // SHA256 checksum of the artifact. + Checksum *string `mandatory:"true" json:"checksum"` +} + +func (m ObjectStorageBucketContentDetails) 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 ObjectStorageBucketContentDetails) 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 ObjectStorageBucketContentDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeObjectStorageBucketContentDetails ObjectStorageBucketContentDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeObjectStorageBucketContentDetails + }{ + "OBJECT_STORAGE_BUCKET", + (MarshalTypeObjectStorageBucketContentDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/onboarding.go b/fleetappsmanagement/onboarding.go new file mode 100644 index 0000000000..a34305daa4 --- /dev/null +++ b/fleetappsmanagement/onboarding.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Onboarding FleetAppManagementService onboarding resource. +type Onboarding struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The current state of the Onboarding. + LifecycleState OnboardingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A value determining FAMS tag is enabled or not + IsFamsTagEnabled *bool `mandatory:"false" json:"isFamsTagEnabled"` + + // Version of FAMS the tenant is onboarded to. + Version *string `mandatory:"false" json:"version"` + + // A value determining if cost tracking tag is enabled or not + IsCostTrackingTagEnabled *bool `mandatory:"false" json:"isCostTrackingTagEnabled"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Onboarding) 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 Onboarding) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOnboardingLifecycleStateEnum(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(GetOnboardingLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// OnboardingLifecycleStateEnum Enum with underlying type: string +type OnboardingLifecycleStateEnum string + +// Set of constants representing the allowable values for OnboardingLifecycleStateEnum +const ( + OnboardingLifecycleStateActive OnboardingLifecycleStateEnum = "ACTIVE" + OnboardingLifecycleStateInactive OnboardingLifecycleStateEnum = "INACTIVE" + OnboardingLifecycleStateCreating OnboardingLifecycleStateEnum = "CREATING" + OnboardingLifecycleStateDeleted OnboardingLifecycleStateEnum = "DELETED" + OnboardingLifecycleStateDeleting OnboardingLifecycleStateEnum = "DELETING" + OnboardingLifecycleStateFailed OnboardingLifecycleStateEnum = "FAILED" + OnboardingLifecycleStateUpdating OnboardingLifecycleStateEnum = "UPDATING" + OnboardingLifecycleStateNeedsAttention OnboardingLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingOnboardingLifecycleStateEnum = map[string]OnboardingLifecycleStateEnum{ + "ACTIVE": OnboardingLifecycleStateActive, + "INACTIVE": OnboardingLifecycleStateInactive, + "CREATING": OnboardingLifecycleStateCreating, + "DELETED": OnboardingLifecycleStateDeleted, + "DELETING": OnboardingLifecycleStateDeleting, + "FAILED": OnboardingLifecycleStateFailed, + "UPDATING": OnboardingLifecycleStateUpdating, + "NEEDS_ATTENTION": OnboardingLifecycleStateNeedsAttention, +} + +var mappingOnboardingLifecycleStateEnumLowerCase = map[string]OnboardingLifecycleStateEnum{ + "active": OnboardingLifecycleStateActive, + "inactive": OnboardingLifecycleStateInactive, + "creating": OnboardingLifecycleStateCreating, + "deleted": OnboardingLifecycleStateDeleted, + "deleting": OnboardingLifecycleStateDeleting, + "failed": OnboardingLifecycleStateFailed, + "updating": OnboardingLifecycleStateUpdating, + "needs_attention": OnboardingLifecycleStateNeedsAttention, +} + +// GetOnboardingLifecycleStateEnumValues Enumerates the set of values for OnboardingLifecycleStateEnum +func GetOnboardingLifecycleStateEnumValues() []OnboardingLifecycleStateEnum { + values := make([]OnboardingLifecycleStateEnum, 0) + for _, v := range mappingOnboardingLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetOnboardingLifecycleStateEnumStringValues Enumerates the set of values in String for OnboardingLifecycleStateEnum +func GetOnboardingLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "CREATING", + "DELETED", + "DELETING", + "FAILED", + "UPDATING", + "NEEDS_ATTENTION", + } +} + +// GetMappingOnboardingLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOnboardingLifecycleStateEnum(val string) (OnboardingLifecycleStateEnum, bool) { + enum, ok := mappingOnboardingLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/onboarding_collection.go b/fleetappsmanagement/onboarding_collection.go new file mode 100644 index 0000000000..509d1a9e2a --- /dev/null +++ b/fleetappsmanagement/onboarding_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OnboardingCollection List of FleetAppManagementService Onboardings. +type OnboardingCollection struct { + + // List of FleetAppManagementService Onboardings. + Items []OnboardingSummary `mandatory:"true" json:"items"` +} + +func (m OnboardingCollection) 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 OnboardingCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/onboarding_policy_collection.go b/fleetappsmanagement/onboarding_policy_collection.go new file mode 100644 index 0000000000..40c8f668f5 --- /dev/null +++ b/fleetappsmanagement/onboarding_policy_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OnboardingPolicyCollection List of FleetAppManagementService Onboard policies. +type OnboardingPolicyCollection struct { + + // List of FleetAppManagementService Onboard policies. + Items []OnboardingPolicySummary `mandatory:"true" json:"items"` +} + +func (m OnboardingPolicyCollection) 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 OnboardingPolicyCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/onboarding_policy_summary.go b/fleetappsmanagement/onboarding_policy_summary.go new file mode 100644 index 0000000000..f16214219c --- /dev/null +++ b/fleetappsmanagement/onboarding_policy_summary.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OnboardingPolicySummary Summary of the FleetAppManagementService Onboard Policy. +type OnboardingPolicySummary struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Policy statements. + Statements []string `mandatory:"false" json:"statements"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m OnboardingPolicySummary) 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 OnboardingPolicySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/onboarding_summary.go b/fleetappsmanagement/onboarding_summary.go new file mode 100644 index 0000000000..7bcdc6cf64 --- /dev/null +++ b/fleetappsmanagement/onboarding_summary.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OnboardingSummary Summary of the FleetAppManagementService Onboarding. +type OnboardingSummary struct { + + // The unique id of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The current state of the Onboarding. + LifecycleState OnboardingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A value determining FAMS tag is enabled or not + IsFamsTagEnabled *bool `mandatory:"false" json:"isFamsTagEnabled"` + + // Version of FAMS the tenant is onboarded to. + Version *string `mandatory:"false" json:"version"` + + // A value determining if cost tracking tag is enabled or not + IsCostTrackingTagEnabled *bool `mandatory:"false" json:"isCostTrackingTagEnabled"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m OnboardingSummary) 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 OnboardingSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOnboardingLifecycleStateEnum(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(GetOnboardingLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/operation_runbook.go b/fleetappsmanagement/operation_runbook.go new file mode 100644 index 0000000000..800592b112 --- /dev/null +++ b/fleetappsmanagement/operation_runbook.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OperationRunbook Runbook +type OperationRunbook struct { + + // The ID of the Runbook + Id *string `mandatory:"true" json:"id"` + + // Input Parameters for the Task + InputParameters []InputParameter `mandatory:"false" json:"inputParameters"` +} + +func (m OperationRunbook) 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 OperationRunbook) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/operation_status.go b/fleetappsmanagement/operation_status.go new file mode 100644 index 0000000000..e5153ddd58 --- /dev/null +++ b/fleetappsmanagement/operation_status.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// OperationStatusEnum Enum with underlying type: string +type OperationStatusEnum string + +// Set of constants representing the allowable values for OperationStatusEnum +const ( + OperationStatusAccepted OperationStatusEnum = "ACCEPTED" + OperationStatusInProgress OperationStatusEnum = "IN_PROGRESS" + OperationStatusWaiting OperationStatusEnum = "WAITING" + OperationStatusNeedsAttention OperationStatusEnum = "NEEDS_ATTENTION" + OperationStatusFailed OperationStatusEnum = "FAILED" + OperationStatusSucceeded OperationStatusEnum = "SUCCEEDED" + OperationStatusCanceling OperationStatusEnum = "CANCELING" + OperationStatusCanceled OperationStatusEnum = "CANCELED" +) + +var mappingOperationStatusEnum = map[string]OperationStatusEnum{ + "ACCEPTED": OperationStatusAccepted, + "IN_PROGRESS": OperationStatusInProgress, + "WAITING": OperationStatusWaiting, + "NEEDS_ATTENTION": OperationStatusNeedsAttention, + "FAILED": OperationStatusFailed, + "SUCCEEDED": OperationStatusSucceeded, + "CANCELING": OperationStatusCanceling, + "CANCELED": OperationStatusCanceled, +} + +var mappingOperationStatusEnumLowerCase = map[string]OperationStatusEnum{ + "accepted": OperationStatusAccepted, + "in_progress": OperationStatusInProgress, + "waiting": OperationStatusWaiting, + "needs_attention": OperationStatusNeedsAttention, + "failed": OperationStatusFailed, + "succeeded": OperationStatusSucceeded, + "canceling": OperationStatusCanceling, + "canceled": OperationStatusCanceled, +} + +// GetOperationStatusEnumValues Enumerates the set of values for OperationStatusEnum +func GetOperationStatusEnumValues() []OperationStatusEnum { + values := make([]OperationStatusEnum, 0) + for _, v := range mappingOperationStatusEnum { + values = append(values, v) + } + return values +} + +// GetOperationStatusEnumStringValues Enumerates the set of values in String for OperationStatusEnum +func GetOperationStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "WAITING", + "NEEDS_ATTENTION", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingOperationStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationStatusEnum(val string) (OperationStatusEnum, bool) { + enum, ok := mappingOperationStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/operation_type.go b/fleetappsmanagement/operation_type.go new file mode 100644 index 0000000000..716c5eab78 --- /dev/null +++ b/fleetappsmanagement/operation_type.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// OperationTypeEnum Enum with underlying type: string +type OperationTypeEnum string + +// Set of constants representing the allowable values for OperationTypeEnum +const ( + OperationTypeCreateFleet OperationTypeEnum = "CREATE_FLEET" + OperationTypeUpdateFleet OperationTypeEnum = "UPDATE_FLEET" + OperationTypeDeleteFleet OperationTypeEnum = "DELETE_FLEET" + OperationTypeConfirmTarget OperationTypeEnum = "CONFIRM_TARGET" + OperationTypeGenerateCompliance OperationTypeEnum = "GENERATE_COMPLIANCE" + OperationTypeRequestTargetDiscovery OperationTypeEnum = "REQUEST_TARGET_DISCOVERY" + OperationTypeValidateResource OperationTypeEnum = "VALIDATE_RESOURCE" + OperationTypeCreateCredential OperationTypeEnum = "CREATE_CREDENTIAL" + OperationTypeUpdateCredential OperationTypeEnum = "UPDATE_CREDENTIAL" + OperationTypeDeleteCredential OperationTypeEnum = "DELETE_CREDENTIAL" + OperationTypeCreateSchedule OperationTypeEnum = "CREATE_SCHEDULE" + OperationTypeUpdateSchedule OperationTypeEnum = "UPDATE_SCHEDULE" + OperationTypeUpdateMaintenanceWindow OperationTypeEnum = "UPDATE_MAINTENANCE_WINDOW" + OperationTypeDeleteMaintenanceWindow OperationTypeEnum = "DELETE_MAINTENANCE_WINDOW" + OperationTypeCreateFleetResource OperationTypeEnum = "CREATE_FLEET_RESOURCE" + OperationTypeUpdateFleetResource OperationTypeEnum = "UPDATE_FLEET_RESOURCE" + OperationTypeDeleteFleetResource OperationTypeEnum = "DELETE_FLEET_RESOURCE" + OperationTypeCreateFamsOnboarding OperationTypeEnum = "CREATE_FAMS_ONBOARDING" +) + +var mappingOperationTypeEnum = map[string]OperationTypeEnum{ + "CREATE_FLEET": OperationTypeCreateFleet, + "UPDATE_FLEET": OperationTypeUpdateFleet, + "DELETE_FLEET": OperationTypeDeleteFleet, + "CONFIRM_TARGET": OperationTypeConfirmTarget, + "GENERATE_COMPLIANCE": OperationTypeGenerateCompliance, + "REQUEST_TARGET_DISCOVERY": OperationTypeRequestTargetDiscovery, + "VALIDATE_RESOURCE": OperationTypeValidateResource, + "CREATE_CREDENTIAL": OperationTypeCreateCredential, + "UPDATE_CREDENTIAL": OperationTypeUpdateCredential, + "DELETE_CREDENTIAL": OperationTypeDeleteCredential, + "CREATE_SCHEDULE": OperationTypeCreateSchedule, + "UPDATE_SCHEDULE": OperationTypeUpdateSchedule, + "UPDATE_MAINTENANCE_WINDOW": OperationTypeUpdateMaintenanceWindow, + "DELETE_MAINTENANCE_WINDOW": OperationTypeDeleteMaintenanceWindow, + "CREATE_FLEET_RESOURCE": OperationTypeCreateFleetResource, + "UPDATE_FLEET_RESOURCE": OperationTypeUpdateFleetResource, + "DELETE_FLEET_RESOURCE": OperationTypeDeleteFleetResource, + "CREATE_FAMS_ONBOARDING": OperationTypeCreateFamsOnboarding, +} + +var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ + "create_fleet": OperationTypeCreateFleet, + "update_fleet": OperationTypeUpdateFleet, + "delete_fleet": OperationTypeDeleteFleet, + "confirm_target": OperationTypeConfirmTarget, + "generate_compliance": OperationTypeGenerateCompliance, + "request_target_discovery": OperationTypeRequestTargetDiscovery, + "validate_resource": OperationTypeValidateResource, + "create_credential": OperationTypeCreateCredential, + "update_credential": OperationTypeUpdateCredential, + "delete_credential": OperationTypeDeleteCredential, + "create_schedule": OperationTypeCreateSchedule, + "update_schedule": OperationTypeUpdateSchedule, + "update_maintenance_window": OperationTypeUpdateMaintenanceWindow, + "delete_maintenance_window": OperationTypeDeleteMaintenanceWindow, + "create_fleet_resource": OperationTypeCreateFleetResource, + "update_fleet_resource": OperationTypeUpdateFleetResource, + "delete_fleet_resource": OperationTypeDeleteFleetResource, + "create_fams_onboarding": OperationTypeCreateFamsOnboarding, +} + +// GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum +func GetOperationTypeEnumValues() []OperationTypeEnum { + values := make([]OperationTypeEnum, 0) + for _, v := range mappingOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetOperationTypeEnumStringValues Enumerates the set of values in String for OperationTypeEnum +func GetOperationTypeEnumStringValues() []string { + return []string{ + "CREATE_FLEET", + "UPDATE_FLEET", + "DELETE_FLEET", + "CONFIRM_TARGET", + "GENERATE_COMPLIANCE", + "REQUEST_TARGET_DISCOVERY", + "VALIDATE_RESOURCE", + "CREATE_CREDENTIAL", + "UPDATE_CREDENTIAL", + "DELETE_CREDENTIAL", + "CREATE_SCHEDULE", + "UPDATE_SCHEDULE", + "UPDATE_MAINTENANCE_WINDOW", + "DELETE_MAINTENANCE_WINDOW", + "CREATE_FLEET_RESOURCE", + "UPDATE_FLEET_RESOURCE", + "DELETE_FLEET_RESOURCE", + "CREATE_FAMS_ONBOARDING", + } +} + +// GetMappingOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationTypeEnum(val string) (OperationTypeEnum, bool) { + enum, ok := mappingOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/os_type.go b/fleetappsmanagement/os_type.go new file mode 100644 index 0000000000..0f9e030762 --- /dev/null +++ b/fleetappsmanagement/os_type.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// OsTypeEnum Enum with underlying type: string +type OsTypeEnum string + +// Set of constants representing the allowable values for OsTypeEnum +const ( + OsTypeWindows OsTypeEnum = "WINDOWS" + OsTypeLinux OsTypeEnum = "LINUX" + OsTypeGeneric OsTypeEnum = "GENERIC" +) + +var mappingOsTypeEnum = map[string]OsTypeEnum{ + "WINDOWS": OsTypeWindows, + "LINUX": OsTypeLinux, + "GENERIC": OsTypeGeneric, +} + +var mappingOsTypeEnumLowerCase = map[string]OsTypeEnum{ + "windows": OsTypeWindows, + "linux": OsTypeLinux, + "generic": OsTypeGeneric, +} + +// GetOsTypeEnumValues Enumerates the set of values for OsTypeEnum +func GetOsTypeEnumValues() []OsTypeEnum { + values := make([]OsTypeEnum, 0) + for _, v := range mappingOsTypeEnum { + values = append(values, v) + } + return values +} + +// GetOsTypeEnumStringValues Enumerates the set of values in String for OsTypeEnum +func GetOsTypeEnumStringValues() []string { + return []string{ + "WINDOWS", + "LINUX", + "GENERIC", + } +} + +// GetMappingOsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOsTypeEnum(val string) (OsTypeEnum, bool) { + enum, ok := mappingOsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/outcome.go b/fleetappsmanagement/outcome.go new file mode 100644 index 0000000000..59ba9765f2 --- /dev/null +++ b/fleetappsmanagement/outcome.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Outcome Execution Outcome +type Outcome struct { + + // A shortened version of Execution Output + Output *string `mandatory:"true" json:"output"` + + // Errors if any associated with the execution + Error *string `mandatory:"false" json:"error"` + + // Exit Code + ExitCode *string `mandatory:"false" json:"exitCode"` +} + +func (m Outcome) 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 Outcome) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/output_variable_details.go b/fleetappsmanagement/output_variable_details.go new file mode 100644 index 0000000000..93127d0c20 --- /dev/null +++ b/fleetappsmanagement/output_variable_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OutputVariableDetails The details of the output variable that will be used for mapping. +type OutputVariableDetails struct { + + // The name of the task step the output variable belongs to. + StepName *string `mandatory:"true" json:"stepName"` + + // The name of the output variable whose value that has to be mapped. + OutputVariableName *string `mandatory:"true" json:"outputVariableName"` +} + +func (m OutputVariableDetails) 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 OutputVariableDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/output_variable_input_argument.go b/fleetappsmanagement/output_variable_input_argument.go new file mode 100644 index 0000000000..25618b823a --- /dev/null +++ b/fleetappsmanagement/output_variable_input_argument.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OutputVariableInputArgument The details of the output variable that will be used as Input argument. +type OutputVariableInputArgument struct { + + // The name of the argument + Name *string `mandatory:"true" json:"name"` + + // The description of the argument. + Description *string `mandatory:"false" json:"description"` +} + +// GetName returns Name +func (m OutputVariableInputArgument) GetName() *string { + return m.Name +} + +// GetDescription returns Description +func (m OutputVariableInputArgument) GetDescription() *string { + return m.Description +} + +func (m OutputVariableInputArgument) 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 OutputVariableInputArgument) 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 OutputVariableInputArgument) MarshalJSON() (buff []byte, e error) { + type MarshalTypeOutputVariableInputArgument OutputVariableInputArgument + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeOutputVariableInputArgument + }{ + "OUTPUT_VARIABLE", + (MarshalTypeOutputVariableInputArgument)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/output_variable_mapping.go b/fleetappsmanagement/output_variable_mapping.go new file mode 100644 index 0000000000..fd09a97008 --- /dev/null +++ b/fleetappsmanagement/output_variable_mapping.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OutputVariableMapping The details of the output variable that will be used as Input argument. +type OutputVariableMapping struct { + + // The name of the input variable + Name *string `mandatory:"true" json:"name"` + + OutputVariableDetails *OutputVariableDetails `mandatory:"true" json:"outputVariableDetails"` +} + +func (m OutputVariableMapping) 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 OutputVariableMapping) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/plain_text_credential_details.go b/fleetappsmanagement/plain_text_credential_details.go new file mode 100644 index 0000000000..ce06c733ec --- /dev/null +++ b/fleetappsmanagement/plain_text_credential_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlainTextCredentialDetails Details for plain text credentials. +type PlainTextCredentialDetails struct { + + // The value corresponding to the credential + Value *string `mandatory:"true" json:"value"` +} + +func (m PlainTextCredentialDetails) 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 PlainTextCredentialDetails) 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 PlainTextCredentialDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypePlainTextCredentialDetails PlainTextCredentialDetails + s := struct { + DiscriminatorParam string `json:"credentialType"` + MarshalTypePlainTextCredentialDetails + }{ + "PLAIN_TEXT", + (MarshalTypePlainTextCredentialDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/preferences.go b/fleetappsmanagement/preferences.go new file mode 100644 index 0000000000..de1671c91a --- /dev/null +++ b/fleetappsmanagement/preferences.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Preferences Preferences to send notifications on the fleet activities +type Preferences struct { + + // Enables notification on upcoming schedule. + OnUpcomingSchedule *bool `mandatory:"false" json:"onUpcomingSchedule"` + + // Enables or disables notification on Job Failures.' + OnJobFailure *bool `mandatory:"false" json:"onJobFailure"` + + // Enables or disables notification on Environment Fleet Topology Modification. + OnTopologyModification *bool `mandatory:"false" json:"onTopologyModification"` +} + +func (m Preferences) 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 Preferences) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/properties.go b/fleetappsmanagement/properties.go new file mode 100644 index 0000000000..8c0934c29a --- /dev/null +++ b/fleetappsmanagement/properties.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Properties The properties of the task. +type Properties struct { + + // The number of retries allowed. + NumRetries *int `mandatory:"true" json:"numRetries"` + + // The timeout in seconds for the task. + TimeoutInSeconds *int `mandatory:"true" json:"timeoutInSeconds"` +} + +func (m Properties) 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 Properties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/property.go b/fleetappsmanagement/property.go new file mode 100644 index 0000000000..ad30cc6b6f --- /dev/null +++ b/fleetappsmanagement/property.go @@ -0,0 +1,197 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Property Taxonomy metadata aka Property . +type Property struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Associated region + ResourceRegion *string `mandatory:"true" json:"resourceRegion"` + + // The current state of the Property. + LifecycleState PropertyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // 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"` + + // Text selection of the category + Selection SelectionEnum `mandatory:"false" json:"selection,omitempty"` + + // Format of the value + ValueType ValueTypeEnum `mandatory:"false" json:"valueType,omitempty"` + + // Values of the property (must be a single value if selection = 'single choice') + Values []string `mandatory:"false" json:"values"` + + // The scope of the property + Scope ScopeEnum `mandatory:"false" json:"scope,omitempty"` + + // The type of the property. + Type PropertyTypeEnum `mandatory:"false" json:"type,omitempty"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Property) 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 Property) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPropertyLifecycleStateEnum(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(GetPropertyLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingSelectionEnum(string(m.Selection)); !ok && m.Selection != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Selection: %s. Supported values are: %s.", m.Selection, strings.Join(GetSelectionEnumStringValues(), ","))) + } + if _, ok := GetMappingValueTypeEnum(string(m.ValueType)); !ok && m.ValueType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ValueType: %s. Supported values are: %s.", m.ValueType, strings.Join(GetValueTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingScopeEnum(string(m.Scope)); !ok && m.Scope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Scope: %s. Supported values are: %s.", m.Scope, strings.Join(GetScopeEnumStringValues(), ","))) + } + if _, ok := GetMappingPropertyTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetPropertyTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PropertyLifecycleStateEnum Enum with underlying type: string +type PropertyLifecycleStateEnum string + +// Set of constants representing the allowable values for PropertyLifecycleStateEnum +const ( + PropertyLifecycleStateActive PropertyLifecycleStateEnum = "ACTIVE" + PropertyLifecycleStateDeleted PropertyLifecycleStateEnum = "DELETED" + PropertyLifecycleStateFailed PropertyLifecycleStateEnum = "FAILED" +) + +var mappingPropertyLifecycleStateEnum = map[string]PropertyLifecycleStateEnum{ + "ACTIVE": PropertyLifecycleStateActive, + "DELETED": PropertyLifecycleStateDeleted, + "FAILED": PropertyLifecycleStateFailed, +} + +var mappingPropertyLifecycleStateEnumLowerCase = map[string]PropertyLifecycleStateEnum{ + "active": PropertyLifecycleStateActive, + "deleted": PropertyLifecycleStateDeleted, + "failed": PropertyLifecycleStateFailed, +} + +// GetPropertyLifecycleStateEnumValues Enumerates the set of values for PropertyLifecycleStateEnum +func GetPropertyLifecycleStateEnumValues() []PropertyLifecycleStateEnum { + values := make([]PropertyLifecycleStateEnum, 0) + for _, v := range mappingPropertyLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPropertyLifecycleStateEnumStringValues Enumerates the set of values in String for PropertyLifecycleStateEnum +func GetPropertyLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingPropertyLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPropertyLifecycleStateEnum(val string) (PropertyLifecycleStateEnum, bool) { + enum, ok := mappingPropertyLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PropertyTypeEnum Enum with underlying type: string +type PropertyTypeEnum string + +// Set of constants representing the allowable values for PropertyTypeEnum +const ( + PropertyTypeUserDefined PropertyTypeEnum = "USER_DEFINED" + PropertyTypeOracleDefined PropertyTypeEnum = "ORACLE_DEFINED" + PropertyTypeSystemDefined PropertyTypeEnum = "SYSTEM_DEFINED" +) + +var mappingPropertyTypeEnum = map[string]PropertyTypeEnum{ + "USER_DEFINED": PropertyTypeUserDefined, + "ORACLE_DEFINED": PropertyTypeOracleDefined, + "SYSTEM_DEFINED": PropertyTypeSystemDefined, +} + +var mappingPropertyTypeEnumLowerCase = map[string]PropertyTypeEnum{ + "user_defined": PropertyTypeUserDefined, + "oracle_defined": PropertyTypeOracleDefined, + "system_defined": PropertyTypeSystemDefined, +} + +// GetPropertyTypeEnumValues Enumerates the set of values for PropertyTypeEnum +func GetPropertyTypeEnumValues() []PropertyTypeEnum { + values := make([]PropertyTypeEnum, 0) + for _, v := range mappingPropertyTypeEnum { + values = append(values, v) + } + return values +} + +// GetPropertyTypeEnumStringValues Enumerates the set of values in String for PropertyTypeEnum +func GetPropertyTypeEnumStringValues() []string { + return []string{ + "USER_DEFINED", + "ORACLE_DEFINED", + "SYSTEM_DEFINED", + } +} + +// GetMappingPropertyTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPropertyTypeEnum(val string) (PropertyTypeEnum, bool) { + enum, ok := mappingPropertyTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/property_collection.go b/fleetappsmanagement/property_collection.go new file mode 100644 index 0000000000..89fe698abc --- /dev/null +++ b/fleetappsmanagement/property_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PropertyCollection Results of a property search. Contains boh PropertySummary items and other information, such as metadata. +type PropertyCollection struct { + + // List of propertys. + Items []PropertySummary `mandatory:"true" json:"items"` +} + +func (m PropertyCollection) 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 PropertyCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/property_summary.go b/fleetappsmanagement/property_summary.go new file mode 100644 index 0000000000..0b06d03975 --- /dev/null +++ b/fleetappsmanagement/property_summary.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PropertySummary Summary of the Property. +type PropertySummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Associated region + ResourceRegion *string `mandatory:"true" json:"resourceRegion"` + + // The current state of the Property. + LifecycleState PropertyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // 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"` + + // Text selection of the category + Selection SelectionEnum `mandatory:"false" json:"selection,omitempty"` + + // Format of the value + ValueType ValueTypeEnum `mandatory:"false" json:"valueType,omitempty"` + + // Values of the property (must be a single value if selection = 'single choice') + Values []string `mandatory:"false" json:"values"` + + // The scope of the property + Scope ScopeEnum `mandatory:"false" json:"scope,omitempty"` + + // The type of the property. + Type PropertyTypeEnum `mandatory:"false" json:"type,omitempty"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m PropertySummary) 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 PropertySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPropertyLifecycleStateEnum(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(GetPropertyLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingSelectionEnum(string(m.Selection)); !ok && m.Selection != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Selection: %s. Supported values are: %s.", m.Selection, strings.Join(GetSelectionEnumStringValues(), ","))) + } + if _, ok := GetMappingValueTypeEnum(string(m.ValueType)); !ok && m.ValueType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ValueType: %s. Supported values are: %s.", m.ValueType, strings.Join(GetValueTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingScopeEnum(string(m.Scope)); !ok && m.Scope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Scope: %s. Supported values are: %s.", m.Scope, strings.Join(GetScopeEnumStringValues(), ","))) + } + if _, ok := GetMappingPropertyTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetPropertyTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/request_resource_validation_details.go b/fleetappsmanagement/request_resource_validation_details.go new file mode 100644 index 0000000000..aabe2aa5d4 --- /dev/null +++ b/fleetappsmanagement/request_resource_validation_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RequestResourceValidationDetails Request to initiate resource validation +type RequestResourceValidationDetails struct { + + // A boolean flag which decides if all resources within the fleet should be part of vaidation. + IsApplicableToAllResources *bool `mandatory:"false" json:"isApplicableToAllResources"` + + // Resource OCIDS that need to be included for validation. + ResourceIds []string `mandatory:"false" json:"resourceIds"` +} + +func (m RequestResourceValidationDetails) 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 RequestResourceValidationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/request_resource_validation_request_response.go b/fleetappsmanagement/request_resource_validation_request_response.go new file mode 100644 index 0000000000..b4c1b34be4 --- /dev/null +++ b/fleetappsmanagement/request_resource_validation_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RequestResourceValidationRequest wrapper for the RequestResourceValidation operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/RequestResourceValidation.go.html to see an example of how to use RequestResourceValidationRequest. +type RequestResourceValidationRequest struct { + + // Details for requesting resource validation + RequestResourceValidationDetails `contributesTo:"body"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 RequestResourceValidationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RequestResourceValidationRequest) 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 RequestResourceValidationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RequestResourceValidationRequest) 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 RequestResourceValidationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RequestResourceValidationResponse wrapper for the RequestResourceValidation operation +type RequestResourceValidationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RequestResourceValidationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RequestResourceValidationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/request_target_discovery_details.go b/fleetappsmanagement/request_target_discovery_details.go new file mode 100644 index 0000000000..2cbdcd5c30 --- /dev/null +++ b/fleetappsmanagement/request_target_discovery_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RequestTargetDiscoveryDetails Request to initiate target discovery +type RequestTargetDiscoveryDetails struct { + + // A boolean flag which decides if all resources within the fleet should be part of discovery. + IsApplicableToAllResources *bool `mandatory:"false" json:"isApplicableToAllResources"` + + // Resource OCIDS that need to be included for discovery. + ResourceIds []string `mandatory:"false" json:"resourceIds"` +} + +func (m RequestTargetDiscoveryDetails) 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 RequestTargetDiscoveryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/request_target_discovery_request_response.go b/fleetappsmanagement/request_target_discovery_request_response.go new file mode 100644 index 0000000000..a38f6a149c --- /dev/null +++ b/fleetappsmanagement/request_target_discovery_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RequestTargetDiscoveryRequest wrapper for the RequestTargetDiscovery operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/RequestTargetDiscovery.go.html to see an example of how to use RequestTargetDiscoveryRequest. +type RequestTargetDiscoveryRequest struct { + + // Details for requesting target discovery + RequestTargetDiscoveryDetails `contributesTo:"body"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // 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 RequestTargetDiscoveryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RequestTargetDiscoveryRequest) 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 RequestTargetDiscoveryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RequestTargetDiscoveryRequest) 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 RequestTargetDiscoveryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RequestTargetDiscoveryResponse wrapper for the RequestTargetDiscovery operation +type RequestTargetDiscoveryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RequestTargetDiscoveryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RequestTargetDiscoveryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/resource_tag_check_details.go b/fleetappsmanagement/resource_tag_check_details.go new file mode 100644 index 0000000000..70ce712098 --- /dev/null +++ b/fleetappsmanagement/resource_tag_check_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResourceTagCheckDetails Request to check resource tagging +type ResourceTagCheckDetails struct { + + // Tag enablement Information for resources. + TagEnablementInfo []ResourceTagEnablementInfo `mandatory:"true" json:"tagEnablementInfo"` +} + +func (m ResourceTagCheckDetails) 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 ResourceTagCheckDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/resource_tag_enablement_info.go b/fleetappsmanagement/resource_tag_enablement_info.go new file mode 100644 index 0000000000..00171f46ed --- /dev/null +++ b/fleetappsmanagement/resource_tag_enablement_info.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResourceTagEnablementInfo Resource tag enablement Information +type ResourceTagEnablementInfo struct { + + // The OCID of the resource. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // A value which represents if resource can be tagged with Fleet name + IsTaggingPossible *bool `mandatory:"true" json:"isTaggingPossible"` +} + +func (m ResourceTagEnablementInfo) 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 ResourceTagEnablementInfo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/rule.go b/fleetappsmanagement/rule.go new file mode 100644 index 0000000000..2c2fbc061b --- /dev/null +++ b/fleetappsmanagement/rule.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Rule Rule Selection Criteria +type Rule struct { + + // Please provide the root compartmentId (TenancyId). + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Resource Compartment Id.Provide the compartmentId the resource belongs to. + ResourceCompartmentId *string `mandatory:"true" json:"resourceCompartmentId"` + + // Rule Conditions + Conditions []Condition `mandatory:"true" json:"conditions"` + + // Rule to be be applied on. + Basis *string `mandatory:"false" json:"basis"` +} + +func (m Rule) 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 Rule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/runbook.go b/fleetappsmanagement/runbook.go new file mode 100644 index 0000000000..0a14f25309 --- /dev/null +++ b/fleetappsmanagement/runbook.go @@ -0,0 +1,248 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Runbook Runbook definition. +type Runbook struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The type of the runbook. + Type RunbookTypeEnum `mandatory:"true" json:"type"` + + // Type of runbook structure. + RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"true" json:"runbookRelevance"` + + // The lifecycle operation performed by the task. + Operation *string `mandatory:"true" json:"operation"` + + // The OS type for the runbook. + OsType OsTypeEnum `mandatory:"true" json:"osType"` + + // The platform of the runbook. + Platform *string `mandatory:"true" json:"platform"` + + // Is the runbook default? + IsDefault *bool `mandatory:"true" json:"isDefault"` + + // The current state of the Runbook. + LifecycleState RunbookLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Estimated time to successfully complete the runbook execution + EstimatedTime *string `mandatory:"false" json:"estimatedTime"` + + // 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"` + + Associations *Associations `mandatory:"false" json:"associations"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Runbook) 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 Runbook) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRunbookTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetRunbookTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRunbookRunbookRelevanceEnum(string(m.RunbookRelevance)); !ok && m.RunbookRelevance != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RunbookRelevance: %s. Supported values are: %s.", m.RunbookRelevance, strings.Join(GetRunbookRunbookRelevanceEnumStringValues(), ","))) + } + if _, ok := GetMappingOsTypeEnum(string(m.OsType)); !ok && m.OsType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsType: %s. Supported values are: %s.", m.OsType, strings.Join(GetOsTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRunbookLifecycleStateEnum(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(GetRunbookLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RunbookTypeEnum Enum with underlying type: string +type RunbookTypeEnum string + +// Set of constants representing the allowable values for RunbookTypeEnum +const ( + RunbookTypeUserDefined RunbookTypeEnum = "USER_DEFINED" + RunbookTypeOracleDefined RunbookTypeEnum = "ORACLE_DEFINED" + RunbookTypeSystemDefined RunbookTypeEnum = "SYSTEM_DEFINED" +) + +var mappingRunbookTypeEnum = map[string]RunbookTypeEnum{ + "USER_DEFINED": RunbookTypeUserDefined, + "ORACLE_DEFINED": RunbookTypeOracleDefined, + "SYSTEM_DEFINED": RunbookTypeSystemDefined, +} + +var mappingRunbookTypeEnumLowerCase = map[string]RunbookTypeEnum{ + "user_defined": RunbookTypeUserDefined, + "oracle_defined": RunbookTypeOracleDefined, + "system_defined": RunbookTypeSystemDefined, +} + +// GetRunbookTypeEnumValues Enumerates the set of values for RunbookTypeEnum +func GetRunbookTypeEnumValues() []RunbookTypeEnum { + values := make([]RunbookTypeEnum, 0) + for _, v := range mappingRunbookTypeEnum { + values = append(values, v) + } + return values +} + +// GetRunbookTypeEnumStringValues Enumerates the set of values in String for RunbookTypeEnum +func GetRunbookTypeEnumStringValues() []string { + return []string{ + "USER_DEFINED", + "ORACLE_DEFINED", + "SYSTEM_DEFINED", + } +} + +// GetMappingRunbookTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRunbookTypeEnum(val string) (RunbookTypeEnum, bool) { + enum, ok := mappingRunbookTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// RunbookRunbookRelevanceEnum Enum with underlying type: string +type RunbookRunbookRelevanceEnum string + +// Set of constants representing the allowable values for RunbookRunbookRelevanceEnum +const ( + RunbookRunbookRelevanceProductGroup RunbookRunbookRelevanceEnum = "PRODUCT_GROUP" + RunbookRunbookRelevanceProduct RunbookRunbookRelevanceEnum = "PRODUCT" +) + +var mappingRunbookRunbookRelevanceEnum = map[string]RunbookRunbookRelevanceEnum{ + "PRODUCT_GROUP": RunbookRunbookRelevanceProductGroup, + "PRODUCT": RunbookRunbookRelevanceProduct, +} + +var mappingRunbookRunbookRelevanceEnumLowerCase = map[string]RunbookRunbookRelevanceEnum{ + "product_group": RunbookRunbookRelevanceProductGroup, + "product": RunbookRunbookRelevanceProduct, +} + +// GetRunbookRunbookRelevanceEnumValues Enumerates the set of values for RunbookRunbookRelevanceEnum +func GetRunbookRunbookRelevanceEnumValues() []RunbookRunbookRelevanceEnum { + values := make([]RunbookRunbookRelevanceEnum, 0) + for _, v := range mappingRunbookRunbookRelevanceEnum { + values = append(values, v) + } + return values +} + +// GetRunbookRunbookRelevanceEnumStringValues Enumerates the set of values in String for RunbookRunbookRelevanceEnum +func GetRunbookRunbookRelevanceEnumStringValues() []string { + return []string{ + "PRODUCT_GROUP", + "PRODUCT", + } +} + +// GetMappingRunbookRunbookRelevanceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRunbookRunbookRelevanceEnum(val string) (RunbookRunbookRelevanceEnum, bool) { + enum, ok := mappingRunbookRunbookRelevanceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// RunbookLifecycleStateEnum Enum with underlying type: string +type RunbookLifecycleStateEnum string + +// Set of constants representing the allowable values for RunbookLifecycleStateEnum +const ( + RunbookLifecycleStateActive RunbookLifecycleStateEnum = "ACTIVE" + RunbookLifecycleStateDeleted RunbookLifecycleStateEnum = "DELETED" + RunbookLifecycleStateFailed RunbookLifecycleStateEnum = "FAILED" +) + +var mappingRunbookLifecycleStateEnum = map[string]RunbookLifecycleStateEnum{ + "ACTIVE": RunbookLifecycleStateActive, + "DELETED": RunbookLifecycleStateDeleted, + "FAILED": RunbookLifecycleStateFailed, +} + +var mappingRunbookLifecycleStateEnumLowerCase = map[string]RunbookLifecycleStateEnum{ + "active": RunbookLifecycleStateActive, + "deleted": RunbookLifecycleStateDeleted, + "failed": RunbookLifecycleStateFailed, +} + +// GetRunbookLifecycleStateEnumValues Enumerates the set of values for RunbookLifecycleStateEnum +func GetRunbookLifecycleStateEnumValues() []RunbookLifecycleStateEnum { + values := make([]RunbookLifecycleStateEnum, 0) + for _, v := range mappingRunbookLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetRunbookLifecycleStateEnumStringValues Enumerates the set of values in String for RunbookLifecycleStateEnum +func GetRunbookLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingRunbookLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRunbookLifecycleStateEnum(val string) (RunbookLifecycleStateEnum, bool) { + enum, ok := mappingRunbookLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/runbook_collection.go b/fleetappsmanagement/runbook_collection.go new file mode 100644 index 0000000000..499f1f728b --- /dev/null +++ b/fleetappsmanagement/runbook_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RunbookCollection Results of a runbook search. Contains boh RunbookSummary items and other information, such as metadata. +type RunbookCollection struct { + + // List of runbooks. + Items []RunbookSummary `mandatory:"true" json:"items"` +} + +func (m RunbookCollection) 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 RunbookCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/runbook_summary.go b/fleetappsmanagement/runbook_summary.go new file mode 100644 index 0000000000..ab12cc7c25 --- /dev/null +++ b/fleetappsmanagement/runbook_summary.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RunbookSummary Summary of the Runbook. +type RunbookSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The type of the runbook. + Type RunbookTypeEnum `mandatory:"true" json:"type"` + + // Type of runbook structure. + RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"true" json:"runbookRelevance"` + + // The lifecycle operation performed by the task. + Operation *string `mandatory:"true" json:"operation"` + + // The OS type for the runbook. + OsType OsTypeEnum `mandatory:"true" json:"osType"` + + // The platform of the runbook. + Platform *string `mandatory:"true" json:"platform"` + + // Is the runbook default? + IsDefault *bool `mandatory:"true" json:"isDefault"` + + // The current state of the Runbook. + LifecycleState RunbookLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Estimated time to successfully complete the runbook execution + EstimatedTime *string `mandatory:"false" json:"estimatedTime"` + + // 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"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m RunbookSummary) 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 RunbookSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRunbookTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetRunbookTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRunbookRunbookRelevanceEnum(string(m.RunbookRelevance)); !ok && m.RunbookRelevance != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RunbookRelevance: %s. Supported values are: %s.", m.RunbookRelevance, strings.Join(GetRunbookRunbookRelevanceEnumStringValues(), ","))) + } + if _, ok := GetMappingOsTypeEnum(string(m.OsType)); !ok && m.OsType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsType: %s. Supported values are: %s.", m.OsType, strings.Join(GetOsTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRunbookLifecycleStateEnum(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(GetRunbookLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/schedule.go b/fleetappsmanagement/schedule.go new file mode 100644 index 0000000000..c5010cfce1 --- /dev/null +++ b/fleetappsmanagement/schedule.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Schedule Schedule Information. +type Schedule struct { + + // Schedule Type + Type ScheduleTypeEnum `mandatory:"true" json:"type"` + + // Start Date for the schedule. An RFC3339 formatted datetime string + ExecutionStartdate *common.SDKTime `mandatory:"true" json:"executionStartdate"` + + // Provide MaintenanceWindowId if Schedule Type is Maintenance Window + MaintenanceWindowId *string `mandatory:"false" json:"maintenanceWindowId"` + + // Recurrence rule specification if Schedule Type is Custom and Recurring + Recurrences *string `mandatory:"false" json:"recurrences"` + + // Duration if schedule type is Custom + Duration *string `mandatory:"false" json:"duration"` +} + +func (m Schedule) 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 Schedule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingScheduleTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetScheduleTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ScheduleTypeEnum Enum with underlying type: string +type ScheduleTypeEnum string + +// Set of constants representing the allowable values for ScheduleTypeEnum +const ( + ScheduleTypeCustom ScheduleTypeEnum = "CUSTOM" + ScheduleTypeMaintenanceWindow ScheduleTypeEnum = "MAINTENANCE_WINDOW" +) + +var mappingScheduleTypeEnum = map[string]ScheduleTypeEnum{ + "CUSTOM": ScheduleTypeCustom, + "MAINTENANCE_WINDOW": ScheduleTypeMaintenanceWindow, +} + +var mappingScheduleTypeEnumLowerCase = map[string]ScheduleTypeEnum{ + "custom": ScheduleTypeCustom, + "maintenance_window": ScheduleTypeMaintenanceWindow, +} + +// GetScheduleTypeEnumValues Enumerates the set of values for ScheduleTypeEnum +func GetScheduleTypeEnumValues() []ScheduleTypeEnum { + values := make([]ScheduleTypeEnum, 0) + for _, v := range mappingScheduleTypeEnum { + values = append(values, v) + } + return values +} + +// GetScheduleTypeEnumStringValues Enumerates the set of values in String for ScheduleTypeEnum +func GetScheduleTypeEnumStringValues() []string { + return []string{ + "CUSTOM", + "MAINTENANCE_WINDOW", + } +} + +// GetMappingScheduleTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingScheduleTypeEnum(val string) (ScheduleTypeEnum, bool) { + enum, ok := mappingScheduleTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/scheduled_fleet_collection.go b/fleetappsmanagement/scheduled_fleet_collection.go new file mode 100644 index 0000000000..e4e82f5711 --- /dev/null +++ b/fleetappsmanagement/scheduled_fleet_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ScheduledFleetCollection Results of a Scheduled ActionGroup search. +type ScheduledFleetCollection struct { + + // List of ScheduledFleets. + Items []ScheduledFleetSummary `mandatory:"true" json:"items"` +} + +func (m ScheduledFleetCollection) 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 ScheduledFleetCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/scheduled_fleet_summary.go b/fleetappsmanagement/scheduled_fleet_summary.go new file mode 100644 index 0000000000..ae68bf9e17 --- /dev/null +++ b/fleetappsmanagement/scheduled_fleet_summary.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ScheduledFleetSummary Summary of Fleet part of the Schedule. +type ScheduledFleetSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // OCID of the tenancy to which the resource belongs to. + TenancyId *string `mandatory:"false" json:"tenancyId"` + + // Count of Resources affected by the Schedule + CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` + + // Count of Targets affected by the Schedule + CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` + + // All ActionGroup Types part of the schedule. + ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` + + // All application types part of the schedule. + ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m ScheduledFleetSummary) 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 ScheduledFleetSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.ActionGroupTypes { + if _, ok := GetMappingLifeCycleActionGroupTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionGroupTypes: %s. Supported values are: %s.", val, strings.Join(GetLifeCycleActionGroupTypeEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/scheduler_definition.go b/fleetappsmanagement/scheduler_definition.go new file mode 100644 index 0000000000..c0c38acf2c --- /dev/null +++ b/fleetappsmanagement/scheduler_definition.go @@ -0,0 +1,185 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerDefinition Definition of a Schedule. +type SchedulerDefinition struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the SchedulerDefinition. + LifecycleState SchedulerDefinitionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Scheduled date for the next run of the Job. + TimeOfNextRun *common.SDKTime `mandatory:"false" json:"timeOfNextRun"` + + // Activity Initiation Cut Off + ActivityInitiationCutOff *int `mandatory:"false" json:"activityInitiationCutOff"` + + Schedule *Schedule `mandatory:"false" json:"schedule"` + + // Count of Action Groups affected by the Schedule. + CountOfAffectedActionGroups *int `mandatory:"false" json:"countOfAffectedActionGroups"` + + // Count of Resources affected by the Schedule + CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` + + // Count of Targets affected by the Schedule + CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` + + // All ActionGroup Types part of the schedule. + ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` + + // All application types part of the schedule for ENVIRONMENT ActionGroup Type. + ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` + + // All products part of the schedule for PRODUCT ActionGroup Type. + Products []string `mandatory:"false" json:"products"` + + // All LifeCycle Operations part of the schedule + LifecycleOperations []string `mandatory:"false" json:"lifecycleOperations"` + + // Action Groups associated with the Schedule. + ActionGroups []ActionGroup `mandatory:"false" json:"actionGroups"` + + // Runbooks. + RunBooks []OperationRunbook `mandatory:"false" json:"runBooks"` + + // 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"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m SchedulerDefinition) 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 SchedulerDefinition) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSchedulerDefinitionLifecycleStateEnum(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(GetSchedulerDefinitionLifecycleStateEnumStringValues(), ","))) + } + + for _, val := range m.ActionGroupTypes { + if _, ok := GetMappingLifeCycleActionGroupTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionGroupTypes: %s. Supported values are: %s.", val, strings.Join(GetLifeCycleActionGroupTypeEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SchedulerDefinitionLifecycleStateEnum Enum with underlying type: string +type SchedulerDefinitionLifecycleStateEnum string + +// Set of constants representing the allowable values for SchedulerDefinitionLifecycleStateEnum +const ( + SchedulerDefinitionLifecycleStateCreating SchedulerDefinitionLifecycleStateEnum = "CREATING" + SchedulerDefinitionLifecycleStateUpdating SchedulerDefinitionLifecycleStateEnum = "UPDATING" + SchedulerDefinitionLifecycleStateActive SchedulerDefinitionLifecycleStateEnum = "ACTIVE" + SchedulerDefinitionLifecycleStateDeleting SchedulerDefinitionLifecycleStateEnum = "DELETING" + SchedulerDefinitionLifecycleStateDeleted SchedulerDefinitionLifecycleStateEnum = "DELETED" + SchedulerDefinitionLifecycleStateFailed SchedulerDefinitionLifecycleStateEnum = "FAILED" + SchedulerDefinitionLifecycleStateInactive SchedulerDefinitionLifecycleStateEnum = "INACTIVE" +) + +var mappingSchedulerDefinitionLifecycleStateEnum = map[string]SchedulerDefinitionLifecycleStateEnum{ + "CREATING": SchedulerDefinitionLifecycleStateCreating, + "UPDATING": SchedulerDefinitionLifecycleStateUpdating, + "ACTIVE": SchedulerDefinitionLifecycleStateActive, + "DELETING": SchedulerDefinitionLifecycleStateDeleting, + "DELETED": SchedulerDefinitionLifecycleStateDeleted, + "FAILED": SchedulerDefinitionLifecycleStateFailed, + "INACTIVE": SchedulerDefinitionLifecycleStateInactive, +} + +var mappingSchedulerDefinitionLifecycleStateEnumLowerCase = map[string]SchedulerDefinitionLifecycleStateEnum{ + "creating": SchedulerDefinitionLifecycleStateCreating, + "updating": SchedulerDefinitionLifecycleStateUpdating, + "active": SchedulerDefinitionLifecycleStateActive, + "deleting": SchedulerDefinitionLifecycleStateDeleting, + "deleted": SchedulerDefinitionLifecycleStateDeleted, + "failed": SchedulerDefinitionLifecycleStateFailed, + "inactive": SchedulerDefinitionLifecycleStateInactive, +} + +// GetSchedulerDefinitionLifecycleStateEnumValues Enumerates the set of values for SchedulerDefinitionLifecycleStateEnum +func GetSchedulerDefinitionLifecycleStateEnumValues() []SchedulerDefinitionLifecycleStateEnum { + values := make([]SchedulerDefinitionLifecycleStateEnum, 0) + for _, v := range mappingSchedulerDefinitionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSchedulerDefinitionLifecycleStateEnumStringValues Enumerates the set of values in String for SchedulerDefinitionLifecycleStateEnum +func GetSchedulerDefinitionLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + "INACTIVE", + } +} + +// GetMappingSchedulerDefinitionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchedulerDefinitionLifecycleStateEnum(val string) (SchedulerDefinitionLifecycleStateEnum, bool) { + enum, ok := mappingSchedulerDefinitionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/scheduler_definition_collection.go b/fleetappsmanagement/scheduler_definition_collection.go new file mode 100644 index 0000000000..7bf4c59830 --- /dev/null +++ b/fleetappsmanagement/scheduler_definition_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerDefinitionCollection Results of a schedulerDefinition search. Contains boh SchedulerDefinitionSummary items and other information, such as metadata. +type SchedulerDefinitionCollection struct { + + // List of schedulerDefinitions. + Items []SchedulerDefinitionSummary `mandatory:"true" json:"items"` +} + +func (m SchedulerDefinitionCollection) 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 SchedulerDefinitionCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/scheduler_definition_summary.go b/fleetappsmanagement/scheduler_definition_summary.go new file mode 100644 index 0000000000..4932a89802 --- /dev/null +++ b/fleetappsmanagement/scheduler_definition_summary.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerDefinitionSummary Summary of the SchedulerDefinition. +type SchedulerDefinitionSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Scheduled date for the next run of the Job. + TimeOfNextRun *common.SDKTime `mandatory:"false" json:"timeOfNextRun"` + + Schedule *Schedule `mandatory:"false" json:"schedule"` + + // Count of Action Groups affected by the Schedule. + CountOfAffectedActionGroups *int `mandatory:"false" json:"countOfAffectedActionGroups"` + + // Count of Resources affected by the Schedule + CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` + + // Count of Targets affected by the Schedule + CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` + + // All ActionGroup Types part of the schedule. + ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` + + // All application types part of the schedule for ENVIRONMENT ActionGroup Type. + ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` + + // All products part of the schedule for PRODUCT ActionGroup Type. + Products []string `mandatory:"false" json:"products"` + + // All LifeCycle Operations part of the schedule + LifecycleOperations []string `mandatory:"false" json:"lifecycleOperations"` + + // The current state of the SchedulerDefinition. + LifecycleState SchedulerDefinitionLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // 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"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m SchedulerDefinitionSummary) 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 SchedulerDefinitionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.ActionGroupTypes { + if _, ok := GetMappingLifeCycleActionGroupTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionGroupTypes: %s. Supported values are: %s.", val, strings.Join(GetLifeCycleActionGroupTypeEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSchedulerDefinitionLifecycleStateEnum(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(GetSchedulerDefinitionLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/scheduler_job.go b/fleetappsmanagement/scheduler_job.go new file mode 100644 index 0000000000..932a301bc7 --- /dev/null +++ b/fleetappsmanagement/scheduler_job.go @@ -0,0 +1,162 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerJob A SchedulerJob resource. +type SchedulerJob struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the SchedulerJob. + LifecycleState SchedulerJobLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // 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:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Scheduled date for the Job. + TimeScheduled *common.SDKTime `mandatory:"false" json:"timeScheduled"` + + // Actual Start time for the Job + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // Actual End time for the Job + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + + // Count of ActionGroups affected by the Schedule. + CountOfAffectedActionGroups *int `mandatory:"false" json:"countOfAffectedActionGroups"` + + // Count of Resources affected by the Schedule + CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` + + // Count of Targets affected by the Schedule + CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` + + // All ActionGroup Types part of the schedule. + ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` + + // All application types part of the schedule for ENVIRONMENT ActionGroup Type. + ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` + + // All products part of the schedule for PRODUCT AcionGroup Type. + Products []string `mandatory:"false" json:"products"` + + // All LifeCycle Operations part of the schedule + LifecycleOperations []string `mandatory:"false" json:"lifecycleOperations"` + + // Action Groups associated with the Schedule. + ActionGroups []ActionGroupDetails `mandatory:"false" json:"actionGroups"` + + AssociatedScheduleDefinition *AssociatedSchedulerDefinition `mandatory:"false" json:"associatedScheduleDefinition"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m SchedulerJob) 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 SchedulerJob) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSchedulerJobLifecycleStateEnum(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(GetSchedulerJobLifecycleStateEnumStringValues(), ","))) + } + + for _, val := range m.ActionGroupTypes { + if _, ok := GetMappingLifeCycleActionGroupTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionGroupTypes: %s. Supported values are: %s.", val, strings.Join(GetLifeCycleActionGroupTypeEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SchedulerJobLifecycleStateEnum Enum with underlying type: string +type SchedulerJobLifecycleStateEnum string + +// Set of constants representing the allowable values for SchedulerJobLifecycleStateEnum +const ( + SchedulerJobLifecycleStateActive SchedulerJobLifecycleStateEnum = "ACTIVE" + SchedulerJobLifecycleStateDeleted SchedulerJobLifecycleStateEnum = "DELETED" + SchedulerJobLifecycleStateFailed SchedulerJobLifecycleStateEnum = "FAILED" +) + +var mappingSchedulerJobLifecycleStateEnum = map[string]SchedulerJobLifecycleStateEnum{ + "ACTIVE": SchedulerJobLifecycleStateActive, + "DELETED": SchedulerJobLifecycleStateDeleted, + "FAILED": SchedulerJobLifecycleStateFailed, +} + +var mappingSchedulerJobLifecycleStateEnumLowerCase = map[string]SchedulerJobLifecycleStateEnum{ + "active": SchedulerJobLifecycleStateActive, + "deleted": SchedulerJobLifecycleStateDeleted, + "failed": SchedulerJobLifecycleStateFailed, +} + +// GetSchedulerJobLifecycleStateEnumValues Enumerates the set of values for SchedulerJobLifecycleStateEnum +func GetSchedulerJobLifecycleStateEnumValues() []SchedulerJobLifecycleStateEnum { + values := make([]SchedulerJobLifecycleStateEnum, 0) + for _, v := range mappingSchedulerJobLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSchedulerJobLifecycleStateEnumStringValues Enumerates the set of values in String for SchedulerJobLifecycleStateEnum +func GetSchedulerJobLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingSchedulerJobLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchedulerJobLifecycleStateEnum(val string) (SchedulerJobLifecycleStateEnum, bool) { + enum, ok := mappingSchedulerJobLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/scheduler_job_collection.go b/fleetappsmanagement/scheduler_job_collection.go new file mode 100644 index 0000000000..cdb66ea5e0 --- /dev/null +++ b/fleetappsmanagement/scheduler_job_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerJobCollection Results of a schedulerJob search. Contains boh SchedulerJobSummary items and other information, such as metadata. +type SchedulerJobCollection struct { + + // List of schedulerJobs. + Items []SchedulerJobSummary `mandatory:"true" json:"items"` +} + +func (m SchedulerJobCollection) 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 SchedulerJobCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/scheduler_job_summary.go b/fleetappsmanagement/scheduler_job_summary.go new file mode 100644 index 0000000000..ee66c90932 --- /dev/null +++ b/fleetappsmanagement/scheduler_job_summary.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerJobSummary Summary of the SchedulerJob. +type SchedulerJobSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the SchedulerJob. + LifecycleState SchedulerJobLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // 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:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Scheduled date for the Job.Provide only the date + TimeScheduled *common.SDKTime `mandatory:"false" json:"timeScheduled"` + + // Count of ActionGroups affected by the Schedule. + CountOfAffectedActionGroups *int `mandatory:"false" json:"countOfAffectedActionGroups"` + + // Count of Resources affected by the Schedule + CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` + + // Count of Targets affected by the Schedule + CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` + + // All ActionGroup Types part of the schedule. + ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` + + // All application types part of the schedule for ENVIRONMENT ActionGroup Type. + ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` + + // All products part of the schedule for PRODUCT ActionGroup Type. + Products []string `mandatory:"false" json:"products"` + + // All LifeCycle Operations part of the schedule + LifecycleOperations []string `mandatory:"false" json:"lifecycleOperations"` + + // Action Groups associated with the Schedule. + ActionGroups []ActionGroupDetails `mandatory:"false" json:"actionGroups"` + + AssociatedScheduleDefinition *AssociatedSchedulerDefinition `mandatory:"false" json:"associatedScheduleDefinition"` + + // 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"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m SchedulerJobSummary) 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 SchedulerJobSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSchedulerJobLifecycleStateEnum(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(GetSchedulerJobLifecycleStateEnumStringValues(), ","))) + } + + for _, val := range m.ActionGroupTypes { + if _, ok := GetMappingLifeCycleActionGroupTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionGroupTypes: %s. Supported values are: %s.", val, strings.Join(GetLifeCycleActionGroupTypeEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/scope.go b/fleetappsmanagement/scope.go new file mode 100644 index 0000000000..7689b33b97 --- /dev/null +++ b/fleetappsmanagement/scope.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// ScopeEnum Enum with underlying type: string +type ScopeEnum string + +// Set of constants representing the allowable values for ScopeEnum +const ( + ScopeTaxonomy ScopeEnum = "TAXONOMY" + ScopePlatformConfig ScopeEnum = "PLATFORM_CONFIG" +) + +var mappingScopeEnum = map[string]ScopeEnum{ + "TAXONOMY": ScopeTaxonomy, + "PLATFORM_CONFIG": ScopePlatformConfig, +} + +var mappingScopeEnumLowerCase = map[string]ScopeEnum{ + "taxonomy": ScopeTaxonomy, + "platform_config": ScopePlatformConfig, +} + +// GetScopeEnumValues Enumerates the set of values for ScopeEnum +func GetScopeEnumValues() []ScopeEnum { + values := make([]ScopeEnum, 0) + for _, v := range mappingScopeEnum { + values = append(values, v) + } + return values +} + +// GetScopeEnumStringValues Enumerates the set of values in String for ScopeEnum +func GetScopeEnumStringValues() []string { + return []string{ + "TAXONOMY", + "PLATFORM_CONFIG", + } +} + +// GetMappingScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingScopeEnum(val string) (ScopeEnum, bool) { + enum, ok := mappingScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/script_based_execution_details.go b/fleetappsmanagement/script_based_execution_details.go new file mode 100644 index 0000000000..37fbb94767 --- /dev/null +++ b/fleetappsmanagement/script_based_execution_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ScriptBasedExecutionDetails Details for script based execution +type ScriptBasedExecutionDetails struct { + Variables *TaskVariable `mandatory:"false" json:"variables"` + + Content ContentDetails `mandatory:"false" json:"content"` + + // Optional Command to execute the content. + Command *string `mandatory:"false" json:"command"` +} + +func (m ScriptBasedExecutionDetails) 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 ScriptBasedExecutionDetails) 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 ScriptBasedExecutionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeScriptBasedExecutionDetails ScriptBasedExecutionDetails + s := struct { + DiscriminatorParam string `json:"executionType"` + MarshalTypeScriptBasedExecutionDetails + }{ + "SCRIPT", + (MarshalTypeScriptBasedExecutionDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *ScriptBasedExecutionDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Variables *TaskVariable `json:"variables"` + Content contentdetails `json:"content"` + Command *string `json:"command"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Variables = model.Variables + + nn, e = model.Content.UnmarshalPolymorphicJSON(model.Content.JsonData) + if e != nil { + return + } + if nn != nil { + m.Content = nn.(ContentDetails) + } else { + m.Content = nil + } + + m.Command = model.Command + + return +} diff --git a/fleetappsmanagement/selection.go b/fleetappsmanagement/selection.go new file mode 100644 index 0000000000..bb99c9a618 --- /dev/null +++ b/fleetappsmanagement/selection.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// SelectionEnum Enum with underlying type: string +type SelectionEnum string + +// Set of constants representing the allowable values for SelectionEnum +const ( + SelectionSingleChoice SelectionEnum = "SINGLE_CHOICE" + SelectionMultiChoice SelectionEnum = "MULTI_CHOICE" + SelectionDefaultText SelectionEnum = "DEFAULT_TEXT" +) + +var mappingSelectionEnum = map[string]SelectionEnum{ + "SINGLE_CHOICE": SelectionSingleChoice, + "MULTI_CHOICE": SelectionMultiChoice, + "DEFAULT_TEXT": SelectionDefaultText, +} + +var mappingSelectionEnumLowerCase = map[string]SelectionEnum{ + "single_choice": SelectionSingleChoice, + "multi_choice": SelectionMultiChoice, + "default_text": SelectionDefaultText, +} + +// GetSelectionEnumValues Enumerates the set of values for SelectionEnum +func GetSelectionEnumValues() []SelectionEnum { + values := make([]SelectionEnum, 0) + for _, v := range mappingSelectionEnum { + values = append(values, v) + } + return values +} + +// GetSelectionEnumStringValues Enumerates the set of values in String for SelectionEnum +func GetSelectionEnumStringValues() []string { + return []string{ + "SINGLE_CHOICE", + "MULTI_CHOICE", + "DEFAULT_TEXT", + } +} + +// GetMappingSelectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSelectionEnum(val string) (SelectionEnum, bool) { + enum, ok := mappingSelectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/selection_criteria.go b/fleetappsmanagement/selection_criteria.go new file mode 100644 index 0000000000..ca1a3a8be0 --- /dev/null +++ b/fleetappsmanagement/selection_criteria.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelectionCriteria Rule Selection Criteria +type SelectionCriteria struct { + + // Rule selection match condition. + MatchCondition SelectionCriteriaMatchConditionEnum `mandatory:"true" json:"matchCondition"` + + // Rules. + Rules []Rule `mandatory:"true" json:"rules"` +} + +func (m SelectionCriteria) 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 SelectionCriteria) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSelectionCriteriaMatchConditionEnum(string(m.MatchCondition)); !ok && m.MatchCondition != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MatchCondition: %s. Supported values are: %s.", m.MatchCondition, strings.Join(GetSelectionCriteriaMatchConditionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SelectionCriteriaMatchConditionEnum Enum with underlying type: string +type SelectionCriteriaMatchConditionEnum string + +// Set of constants representing the allowable values for SelectionCriteriaMatchConditionEnum +const ( + SelectionCriteriaMatchConditionMatchAll SelectionCriteriaMatchConditionEnum = "MATCH_ALL" + SelectionCriteriaMatchConditionAny SelectionCriteriaMatchConditionEnum = "ANY" +) + +var mappingSelectionCriteriaMatchConditionEnum = map[string]SelectionCriteriaMatchConditionEnum{ + "MATCH_ALL": SelectionCriteriaMatchConditionMatchAll, + "ANY": SelectionCriteriaMatchConditionAny, +} + +var mappingSelectionCriteriaMatchConditionEnumLowerCase = map[string]SelectionCriteriaMatchConditionEnum{ + "match_all": SelectionCriteriaMatchConditionMatchAll, + "any": SelectionCriteriaMatchConditionAny, +} + +// GetSelectionCriteriaMatchConditionEnumValues Enumerates the set of values for SelectionCriteriaMatchConditionEnum +func GetSelectionCriteriaMatchConditionEnumValues() []SelectionCriteriaMatchConditionEnum { + values := make([]SelectionCriteriaMatchConditionEnum, 0) + for _, v := range mappingSelectionCriteriaMatchConditionEnum { + values = append(values, v) + } + return values +} + +// GetSelectionCriteriaMatchConditionEnumStringValues Enumerates the set of values in String for SelectionCriteriaMatchConditionEnum +func GetSelectionCriteriaMatchConditionEnumStringValues() []string { + return []string{ + "MATCH_ALL", + "ANY", + } +} + +// GetMappingSelectionCriteriaMatchConditionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSelectionCriteriaMatchConditionEnum(val string) (SelectionCriteriaMatchConditionEnum, bool) { + enum, ok := mappingSelectionCriteriaMatchConditionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/sort_order.go b/fleetappsmanagement/sort_order.go new file mode 100644 index 0000000000..459c720849 --- /dev/null +++ b/fleetappsmanagement/sort_order.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// SortOrderEnum Enum with underlying type: string +type SortOrderEnum string + +// Set of constants representing the allowable values for SortOrderEnum +const ( + SortOrderAsc SortOrderEnum = "ASC" + SortOrderDesc SortOrderEnum = "DESC" +) + +var mappingSortOrderEnum = map[string]SortOrderEnum{ + "ASC": SortOrderAsc, + "DESC": SortOrderDesc, +} + +var mappingSortOrderEnumLowerCase = map[string]SortOrderEnum{ + "asc": SortOrderAsc, + "desc": SortOrderDesc, +} + +// GetSortOrderEnumValues Enumerates the set of values for SortOrderEnum +func GetSortOrderEnumValues() []SortOrderEnum { + values := make([]SortOrderEnum, 0) + for _, v := range mappingSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSortOrderEnumStringValues Enumerates the set of values in String for SortOrderEnum +func GetSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSortOrderEnum(val string) (SortOrderEnum, bool) { + enum, ok := mappingSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/string_input_argument.go b/fleetappsmanagement/string_input_argument.go new file mode 100644 index 0000000000..2a8a1b7a1d --- /dev/null +++ b/fleetappsmanagement/string_input_argument.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StringInputArgument The details of the String Input argument. +type StringInputArgument struct { + + // The name of the argument + Name *string `mandatory:"true" json:"name"` + + // The description of the argument. + Description *string `mandatory:"false" json:"description"` +} + +// GetName returns Name +func (m StringInputArgument) GetName() *string { + return m.Name +} + +// GetDescription returns Description +func (m StringInputArgument) GetDescription() *string { + return m.Description +} + +func (m StringInputArgument) 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 StringInputArgument) 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 StringInputArgument) MarshalJSON() (buff []byte, e error) { + type MarshalTypeStringInputArgument StringInputArgument + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeStringInputArgument + }{ + "STRING", + (MarshalTypeStringInputArgument)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/target_credential_entity_specific_details.go b/fleetappsmanagement/target_credential_entity_specific_details.go new file mode 100644 index 0000000000..4b925d210c --- /dev/null +++ b/fleetappsmanagement/target_credential_entity_specific_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TargetCredentialEntitySpecificDetails Fleet Credential Specific Details. +type TargetCredentialEntitySpecificDetails struct { + + // OCID of the resource associated with the target for which credential is created + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Target associated with the Credential + Target *string `mandatory:"true" json:"target"` +} + +func (m TargetCredentialEntitySpecificDetails) 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 TargetCredentialEntitySpecificDetails) 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 TargetCredentialEntitySpecificDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTargetCredentialEntitySpecificDetails TargetCredentialEntitySpecificDetails + s := struct { + DiscriminatorParam string `json:"credentialLevel"` + MarshalTypeTargetCredentialEntitySpecificDetails + }{ + "TARGET", + (MarshalTypeTargetCredentialEntitySpecificDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/target_resource.go b/fleetappsmanagement/target_resource.go new file mode 100644 index 0000000000..d405a164ad --- /dev/null +++ b/fleetappsmanagement/target_resource.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TargetResource Resource Information for the Target +type TargetResource struct { + + // The OCID of the resource. + ResourceId *string `mandatory:"false" json:"resourceId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + ResourceDisplayName *string `mandatory:"false" json:"resourceDisplayName"` +} + +func (m TargetResource) 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 TargetResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/task.go b/fleetappsmanagement/task.go new file mode 100644 index 0000000000..43cbf1d9b7 --- /dev/null +++ b/fleetappsmanagement/task.go @@ -0,0 +1,128 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Task The details of the task +type Task struct { + + // The name of the task step. + StepName *string `mandatory:"true" json:"stepName"` + + // The association type of the task + AssociationType TaskAssociationTypeEnum `mandatory:"true" json:"associationType"` + + TaskRecordDetails AssociatedTaskDetails `mandatory:"true" json:"taskRecordDetails"` + + StepProperties *ComponentProperties `mandatory:"false" json:"stepProperties"` + + // Mapping output variables of previous tasks to the input variables of the current task. + OutputVariableMappings []OutputVariableMapping `mandatory:"false" json:"outputVariableMappings"` +} + +func (m Task) 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 Task) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTaskAssociationTypeEnum(string(m.AssociationType)); !ok && m.AssociationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssociationType: %s. Supported values are: %s.", m.AssociationType, strings.Join(GetTaskAssociationTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *Task) UnmarshalJSON(data []byte) (e error) { + model := struct { + StepProperties *ComponentProperties `json:"stepProperties"` + OutputVariableMappings []OutputVariableMapping `json:"outputVariableMappings"` + StepName *string `json:"stepName"` + AssociationType TaskAssociationTypeEnum `json:"associationType"` + TaskRecordDetails associatedtaskdetails `json:"taskRecordDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.StepProperties = model.StepProperties + + m.OutputVariableMappings = make([]OutputVariableMapping, len(model.OutputVariableMappings)) + copy(m.OutputVariableMappings, model.OutputVariableMappings) + m.StepName = model.StepName + + m.AssociationType = model.AssociationType + + nn, e = model.TaskRecordDetails.UnmarshalPolymorphicJSON(model.TaskRecordDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.TaskRecordDetails = nn.(AssociatedTaskDetails) + } else { + m.TaskRecordDetails = nil + } + + return +} + +// TaskAssociationTypeEnum Enum with underlying type: string +type TaskAssociationTypeEnum string + +// Set of constants representing the allowable values for TaskAssociationTypeEnum +const ( + TaskAssociationTypeTask TaskAssociationTypeEnum = "TASK" +) + +var mappingTaskAssociationTypeEnum = map[string]TaskAssociationTypeEnum{ + "TASK": TaskAssociationTypeTask, +} + +var mappingTaskAssociationTypeEnumLowerCase = map[string]TaskAssociationTypeEnum{ + "task": TaskAssociationTypeTask, +} + +// GetTaskAssociationTypeEnumValues Enumerates the set of values for TaskAssociationTypeEnum +func GetTaskAssociationTypeEnumValues() []TaskAssociationTypeEnum { + values := make([]TaskAssociationTypeEnum, 0) + for _, v := range mappingTaskAssociationTypeEnum { + values = append(values, v) + } + return values +} + +// GetTaskAssociationTypeEnumStringValues Enumerates the set of values in String for TaskAssociationTypeEnum +func GetTaskAssociationTypeEnumStringValues() []string { + return []string{ + "TASK", + } +} + +// GetMappingTaskAssociationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTaskAssociationTypeEnum(val string) (TaskAssociationTypeEnum, bool) { + enum, ok := mappingTaskAssociationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/task_argument.go b/fleetappsmanagement/task_argument.go new file mode 100644 index 0000000000..d0ea87ac56 --- /dev/null +++ b/fleetappsmanagement/task_argument.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TaskArgument A variable that holds a value +type TaskArgument struct { + + // Name of the output variable + Name *string `mandatory:"true" json:"name"` + + // The task output + Value *string `mandatory:"false" json:"value"` +} + +func (m TaskArgument) 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 TaskArgument) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/task_execution_type.go b/fleetappsmanagement/task_execution_type.go new file mode 100644 index 0000000000..d831b6805e --- /dev/null +++ b/fleetappsmanagement/task_execution_type.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// TaskExecutionTypeEnum Enum with underlying type: string +type TaskExecutionTypeEnum string + +// Set of constants representing the allowable values for TaskExecutionTypeEnum +const ( + TaskExecutionTypeScript TaskExecutionTypeEnum = "SCRIPT" + TaskExecutionTypeApi TaskExecutionTypeEnum = "API" +) + +var mappingTaskExecutionTypeEnum = map[string]TaskExecutionTypeEnum{ + "SCRIPT": TaskExecutionTypeScript, + "API": TaskExecutionTypeApi, +} + +var mappingTaskExecutionTypeEnumLowerCase = map[string]TaskExecutionTypeEnum{ + "script": TaskExecutionTypeScript, + "api": TaskExecutionTypeApi, +} + +// GetTaskExecutionTypeEnumValues Enumerates the set of values for TaskExecutionTypeEnum +func GetTaskExecutionTypeEnumValues() []TaskExecutionTypeEnum { + values := make([]TaskExecutionTypeEnum, 0) + for _, v := range mappingTaskExecutionTypeEnum { + values = append(values, v) + } + return values +} + +// GetTaskExecutionTypeEnumStringValues Enumerates the set of values in String for TaskExecutionTypeEnum +func GetTaskExecutionTypeEnumStringValues() []string { + return []string{ + "SCRIPT", + "API", + } +} + +// GetMappingTaskExecutionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTaskExecutionTypeEnum(val string) (TaskExecutionTypeEnum, bool) { + enum, ok := mappingTaskExecutionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/task_record.go b/fleetappsmanagement/task_record.go new file mode 100644 index 0000000000..5e3c4e3ede --- /dev/null +++ b/fleetappsmanagement/task_record.go @@ -0,0 +1,197 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TaskRecord Description of TaskRecord. +type TaskRecord struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Task type. + Type TaskRecordTypeEnum `mandatory:"true" json:"type"` + + // The current state of the TaskRecord. + LifecycleState TaskRecordLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + Details *Details `mandatory:"true" json:"details"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // 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 version of the task + Version *string `mandatory:"false" json:"version"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m TaskRecord) 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 TaskRecord) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTaskRecordTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetTaskRecordTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingTaskRecordLifecycleStateEnum(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(GetTaskRecordLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TaskRecordTypeEnum Enum with underlying type: string +type TaskRecordTypeEnum string + +// Set of constants representing the allowable values for TaskRecordTypeEnum +const ( + TaskRecordTypeUserDefined TaskRecordTypeEnum = "USER_DEFINED" + TaskRecordTypeOracleDefined TaskRecordTypeEnum = "ORACLE_DEFINED" + TaskRecordTypeSystemDefined TaskRecordTypeEnum = "SYSTEM_DEFINED" +) + +var mappingTaskRecordTypeEnum = map[string]TaskRecordTypeEnum{ + "USER_DEFINED": TaskRecordTypeUserDefined, + "ORACLE_DEFINED": TaskRecordTypeOracleDefined, + "SYSTEM_DEFINED": TaskRecordTypeSystemDefined, +} + +var mappingTaskRecordTypeEnumLowerCase = map[string]TaskRecordTypeEnum{ + "user_defined": TaskRecordTypeUserDefined, + "oracle_defined": TaskRecordTypeOracleDefined, + "system_defined": TaskRecordTypeSystemDefined, +} + +// GetTaskRecordTypeEnumValues Enumerates the set of values for TaskRecordTypeEnum +func GetTaskRecordTypeEnumValues() []TaskRecordTypeEnum { + values := make([]TaskRecordTypeEnum, 0) + for _, v := range mappingTaskRecordTypeEnum { + values = append(values, v) + } + return values +} + +// GetTaskRecordTypeEnumStringValues Enumerates the set of values in String for TaskRecordTypeEnum +func GetTaskRecordTypeEnumStringValues() []string { + return []string{ + "USER_DEFINED", + "ORACLE_DEFINED", + "SYSTEM_DEFINED", + } +} + +// GetMappingTaskRecordTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTaskRecordTypeEnum(val string) (TaskRecordTypeEnum, bool) { + enum, ok := mappingTaskRecordTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// TaskRecordLifecycleStateEnum Enum with underlying type: string +type TaskRecordLifecycleStateEnum string + +// Set of constants representing the allowable values for TaskRecordLifecycleStateEnum +const ( + TaskRecordLifecycleStateActive TaskRecordLifecycleStateEnum = "ACTIVE" + TaskRecordLifecycleStateInactive TaskRecordLifecycleStateEnum = "INACTIVE" + TaskRecordLifecycleStateDeleted TaskRecordLifecycleStateEnum = "DELETED" + TaskRecordLifecycleStateDeleting TaskRecordLifecycleStateEnum = "DELETING" + TaskRecordLifecycleStateFailed TaskRecordLifecycleStateEnum = "FAILED" + TaskRecordLifecycleStateUpdating TaskRecordLifecycleStateEnum = "UPDATING" +) + +var mappingTaskRecordLifecycleStateEnum = map[string]TaskRecordLifecycleStateEnum{ + "ACTIVE": TaskRecordLifecycleStateActive, + "INACTIVE": TaskRecordLifecycleStateInactive, + "DELETED": TaskRecordLifecycleStateDeleted, + "DELETING": TaskRecordLifecycleStateDeleting, + "FAILED": TaskRecordLifecycleStateFailed, + "UPDATING": TaskRecordLifecycleStateUpdating, +} + +var mappingTaskRecordLifecycleStateEnumLowerCase = map[string]TaskRecordLifecycleStateEnum{ + "active": TaskRecordLifecycleStateActive, + "inactive": TaskRecordLifecycleStateInactive, + "deleted": TaskRecordLifecycleStateDeleted, + "deleting": TaskRecordLifecycleStateDeleting, + "failed": TaskRecordLifecycleStateFailed, + "updating": TaskRecordLifecycleStateUpdating, +} + +// GetTaskRecordLifecycleStateEnumValues Enumerates the set of values for TaskRecordLifecycleStateEnum +func GetTaskRecordLifecycleStateEnumValues() []TaskRecordLifecycleStateEnum { + values := make([]TaskRecordLifecycleStateEnum, 0) + for _, v := range mappingTaskRecordLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetTaskRecordLifecycleStateEnumStringValues Enumerates the set of values in String for TaskRecordLifecycleStateEnum +func GetTaskRecordLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "DELETED", + "DELETING", + "FAILED", + "UPDATING", + } +} + +// GetMappingTaskRecordLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTaskRecordLifecycleStateEnum(val string) (TaskRecordLifecycleStateEnum, bool) { + enum, ok := mappingTaskRecordLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/task_record_collection.go b/fleetappsmanagement/task_record_collection.go new file mode 100644 index 0000000000..944a5dfc38 --- /dev/null +++ b/fleetappsmanagement/task_record_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TaskRecordCollection Results of a taskRecord search. Contains boh TaskRecordSummary items and other information, such as metadata. +type TaskRecordCollection struct { + + // List of taskRecords. + Items []TaskRecordSummary `mandatory:"true" json:"items"` +} + +func (m TaskRecordCollection) 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 TaskRecordCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/task_record_summary.go b/fleetappsmanagement/task_record_summary.go new file mode 100644 index 0000000000..d7e858f2de --- /dev/null +++ b/fleetappsmanagement/task_record_summary.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TaskRecordSummary Summary of the TaskRecord. +type TaskRecordSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Task type. + Type TaskRecordTypeEnum `mandatory:"true" json:"type"` + + // The current state of the TaskRecord. + LifecycleState TaskRecordLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + Details *Details `mandatory:"true" json:"details"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // 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 version of the task + Version *string `mandatory:"false" json:"version"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m TaskRecordSummary) 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 TaskRecordSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTaskRecordTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetTaskRecordTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingTaskRecordLifecycleStateEnum(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(GetTaskRecordLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/task_scope.go b/fleetappsmanagement/task_scope.go new file mode 100644 index 0000000000..63b0206f67 --- /dev/null +++ b/fleetappsmanagement/task_scope.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// TaskScopeEnum Enum with underlying type: string +type TaskScopeEnum string + +// Set of constants representing the allowable values for TaskScopeEnum +const ( + TaskScopeLocal TaskScopeEnum = "LOCAL" + TaskScopeShared TaskScopeEnum = "SHARED" +) + +var mappingTaskScopeEnum = map[string]TaskScopeEnum{ + "LOCAL": TaskScopeLocal, + "SHARED": TaskScopeShared, +} + +var mappingTaskScopeEnumLowerCase = map[string]TaskScopeEnum{ + "local": TaskScopeLocal, + "shared": TaskScopeShared, +} + +// GetTaskScopeEnumValues Enumerates the set of values for TaskScopeEnum +func GetTaskScopeEnumValues() []TaskScopeEnum { + values := make([]TaskScopeEnum, 0) + for _, v := range mappingTaskScopeEnum { + values = append(values, v) + } + return values +} + +// GetTaskScopeEnumStringValues Enumerates the set of values in String for TaskScopeEnum +func GetTaskScopeEnumStringValues() []string { + return []string{ + "LOCAL", + "SHARED", + } +} + +// GetMappingTaskScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTaskScopeEnum(val string) (TaskScopeEnum, bool) { + enum, ok := mappingTaskScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/task_variable.go b/fleetappsmanagement/task_variable.go new file mode 100644 index 0000000000..b61eaa9177 --- /dev/null +++ b/fleetappsmanagement/task_variable.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TaskVariable The variable of the task.Atleast one of dynamicArguments or output needs to be provided. +type TaskVariable struct { + + // The input variables for the task. + InputVariables []InputArgument `mandatory:"false" json:"inputVariables"` + + // The list of output variables. + OutputVariables []string `mandatory:"false" json:"outputVariables"` +} + +func (m TaskVariable) 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 TaskVariable) 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 *TaskVariable) UnmarshalJSON(data []byte) (e error) { + model := struct { + InputVariables []inputargument `json:"inputVariables"` + OutputVariables []string `json:"outputVariables"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.InputVariables = make([]InputArgument, len(model.InputVariables)) + for i, n := range model.InputVariables { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.InputVariables[i] = nn.(InputArgument) + } else { + m.InputVariables[i] = nil + } + } + m.OutputVariables = make([]string, len(model.OutputVariables)) + copy(m.OutputVariables, model.OutputVariables) + return +} diff --git a/fleetappsmanagement/update_fleet_credential_details.go b/fleetappsmanagement/update_fleet_credential_details.go new file mode 100644 index 0000000000..b8f1466695 --- /dev/null +++ b/fleetappsmanagement/update_fleet_credential_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateFleetCredentialDetails The information to be updated. +type UpdateFleetCredentialDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + EntitySpecifics CredentialEntitySpecificDetails `mandatory:"false" json:"entitySpecifics"` + + User CredentialDetails `mandatory:"false" json:"user"` + + Password CredentialDetails `mandatory:"false" json:"password"` +} + +func (m UpdateFleetCredentialDetails) 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 UpdateFleetCredentialDetails) 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 *UpdateFleetCredentialDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + EntitySpecifics credentialentityspecificdetails `json:"entitySpecifics"` + User credentialdetails `json:"user"` + Password credentialdetails `json:"password"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + nn, e = model.EntitySpecifics.UnmarshalPolymorphicJSON(model.EntitySpecifics.JsonData) + if e != nil { + return + } + if nn != nil { + m.EntitySpecifics = nn.(CredentialEntitySpecificDetails) + } else { + m.EntitySpecifics = nil + } + + nn, e = model.User.UnmarshalPolymorphicJSON(model.User.JsonData) + if e != nil { + return + } + if nn != nil { + m.User = nn.(CredentialDetails) + } else { + m.User = nil + } + + nn, e = model.Password.UnmarshalPolymorphicJSON(model.Password.JsonData) + if e != nil { + return + } + if nn != nil { + m.Password = nn.(CredentialDetails) + } else { + m.Password = nil + } + + return +} diff --git a/fleetappsmanagement/update_fleet_credential_request_response.go b/fleetappsmanagement/update_fleet_credential_request_response.go new file mode 100644 index 0000000000..370d5fb864 --- /dev/null +++ b/fleetappsmanagement/update_fleet_credential_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateFleetCredentialRequest wrapper for the UpdateFleetCredential operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleetCredential.go.html to see an example of how to use UpdateFleetCredentialRequest. +type UpdateFleetCredentialRequest struct { + + // unique FleetCredential identifier + FleetCredentialId *string `mandatory:"true" contributesTo:"path" name:"fleetCredentialId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The information to be updated. + UpdateFleetCredentialDetails `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 UpdateFleetCredentialRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateFleetCredentialRequest) 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 UpdateFleetCredentialRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateFleetCredentialRequest) 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 UpdateFleetCredentialRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateFleetCredentialResponse wrapper for the UpdateFleetCredential operation +type UpdateFleetCredentialResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateFleetCredentialResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateFleetCredentialResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/update_fleet_details.go b/fleetappsmanagement/update_fleet_details.go new file mode 100644 index 0000000000..2c009557ec --- /dev/null +++ b/fleetappsmanagement/update_fleet_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateFleetDetails The information to be updated. +type UpdateFleetDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + NotificationPreferences *NotificationPreferences `mandatory:"false" json:"notificationPreferences"` + + RuleSelectionCriteria *SelectionCriteria `mandatory:"false" json:"ruleSelectionCriteria"` + + // A value which represents if auto confirming of the targets can be enabled + IsTargetAutoConfirm *bool `mandatory:"false" json:"isTargetAutoConfirm"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateFleetDetails) 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 UpdateFleetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/update_fleet_property_details.go b/fleetappsmanagement/update_fleet_property_details.go new file mode 100644 index 0000000000..325782ef5e --- /dev/null +++ b/fleetappsmanagement/update_fleet_property_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateFleetPropertyDetails The information to be updated. +type UpdateFleetPropertyDetails struct { + + // Value of the Property + Value *string `mandatory:"false" json:"value"` +} + +func (m UpdateFleetPropertyDetails) 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 UpdateFleetPropertyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/update_fleet_property_request_response.go b/fleetappsmanagement/update_fleet_property_request_response.go new file mode 100644 index 0000000000..42b9adf28a --- /dev/null +++ b/fleetappsmanagement/update_fleet_property_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateFleetPropertyRequest wrapper for the UpdateFleetProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleetProperty.go.html to see an example of how to use UpdateFleetPropertyRequest. +type UpdateFleetPropertyRequest struct { + + // unique FleetProperty identifier + FleetPropertyId *string `mandatory:"true" contributesTo:"path" name:"fleetPropertyId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The information to be updated. + UpdateFleetPropertyDetails `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 UpdateFleetPropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateFleetPropertyRequest) 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 UpdateFleetPropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateFleetPropertyRequest) 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 UpdateFleetPropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateFleetPropertyResponse wrapper for the UpdateFleetProperty operation +type UpdateFleetPropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FleetProperty instance + FleetProperty `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateFleetPropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateFleetPropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/update_fleet_request_response.go b/fleetappsmanagement/update_fleet_request_response.go new file mode 100644 index 0000000000..13dbb99ec5 --- /dev/null +++ b/fleetappsmanagement/update_fleet_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateFleetRequest wrapper for the UpdateFleet operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleet.go.html to see an example of how to use UpdateFleetRequest. +type UpdateFleetRequest struct { + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The information to be updated. + UpdateFleetDetails `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 UpdateFleetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateFleetRequest) 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 UpdateFleetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateFleetRequest) 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 UpdateFleetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateFleetResponse wrapper for the UpdateFleet operation +type UpdateFleetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Fleet instance + Fleet `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateFleetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateFleetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/update_fleet_resource_details.go b/fleetappsmanagement/update_fleet_resource_details.go new file mode 100644 index 0000000000..d2a52216a4 --- /dev/null +++ b/fleetappsmanagement/update_fleet_resource_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateFleetResourceDetails The information to be updated. +type UpdateFleetResourceDetails struct { + + // OCID of the tenancy to which the resource belongs to. + TenancyId *string `mandatory:"false" json:"tenancyId"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m UpdateFleetResourceDetails) 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 UpdateFleetResourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/update_fleet_resource_request_response.go b/fleetappsmanagement/update_fleet_resource_request_response.go new file mode 100644 index 0000000000..1b4b71687d --- /dev/null +++ b/fleetappsmanagement/update_fleet_resource_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateFleetResourceRequest wrapper for the UpdateFleetResource operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleetResource.go.html to see an example of how to use UpdateFleetResourceRequest. +type UpdateFleetResourceRequest struct { + + // unique FleetResource identifier + FleetResourceId *string `mandatory:"true" contributesTo:"path" name:"fleetResourceId"` + + // unique Fleet identifier + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The information to be updated. + UpdateFleetResourceDetails `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 UpdateFleetResourceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateFleetResourceRequest) 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 UpdateFleetResourceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateFleetResourceRequest) 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 UpdateFleetResourceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateFleetResourceResponse wrapper for the UpdateFleetResource operation +type UpdateFleetResourceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateFleetResourceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateFleetResourceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/update_maintenance_window_details.go b/fleetappsmanagement/update_maintenance_window_details.go new file mode 100644 index 0000000000..556fa5016b --- /dev/null +++ b/fleetappsmanagement/update_maintenance_window_details.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMaintenanceWindowDetails Maintenance Window information to be updated. +type UpdateMaintenanceWindowDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // MaintenanceWindow Identifier + MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` + + // Does the maintenenace window cause outage? + IsOutage *bool `mandatory:"false" json:"isOutage"` + + // Start time of schedule + TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` + + // Duration if schedule type is Custom + Duration *string `mandatory:"false" json:"duration"` + + // Is this is a recurring maintenance window + IsRecurring *bool `mandatory:"false" json:"isRecurring"` + + // Recurrence rule specification if recurring + Recurrences *string `mandatory:"false" json:"recurrences"` + + // Task initiation cutoff + TaskInitiationCutoff *int `mandatory:"false" json:"taskInitiationCutoff"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateMaintenanceWindowDetails) 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 UpdateMaintenanceWindowDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingMaintenanceWindowTypeEnum(string(m.MaintenanceWindowType)); !ok && m.MaintenanceWindowType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceWindowType: %s. Supported values are: %s.", m.MaintenanceWindowType, strings.Join(GetMaintenanceWindowTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/update_maintenance_window_request_response.go b/fleetappsmanagement/update_maintenance_window_request_response.go new file mode 100644 index 0000000000..520ef68413 --- /dev/null +++ b/fleetappsmanagement/update_maintenance_window_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateMaintenanceWindowRequest wrapper for the UpdateMaintenanceWindow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateMaintenanceWindow.go.html to see an example of how to use UpdateMaintenanceWindowRequest. +type UpdateMaintenanceWindowRequest struct { + + // unique MaintenanceWindow identifier + MaintenanceWindowId *string `mandatory:"true" contributesTo:"path" name:"maintenanceWindowId"` + + // The information to be updated. + UpdateMaintenanceWindowDetails `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 UpdateMaintenanceWindowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateMaintenanceWindowRequest) 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 UpdateMaintenanceWindowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateMaintenanceWindowRequest) 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 UpdateMaintenanceWindowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateMaintenanceWindowResponse wrapper for the UpdateMaintenanceWindow operation +type UpdateMaintenanceWindowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateMaintenanceWindowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateMaintenanceWindowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/update_property_details.go b/fleetappsmanagement/update_property_details.go new file mode 100644 index 0000000000..365bd7d74a --- /dev/null +++ b/fleetappsmanagement/update_property_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePropertyDetails The information to be updated. +type UpdatePropertyDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Text selection of the category + Selection SelectionEnum `mandatory:"false" json:"selection,omitempty"` + + // Format of the value + ValueType ValueTypeEnum `mandatory:"false" json:"valueType,omitempty"` + + // Values of the property (must be a single value if selection = 'single choice') + Values []string `mandatory:"false" json:"values"` +} + +func (m UpdatePropertyDetails) 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 UpdatePropertyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingSelectionEnum(string(m.Selection)); !ok && m.Selection != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Selection: %s. Supported values are: %s.", m.Selection, strings.Join(GetSelectionEnumStringValues(), ","))) + } + if _, ok := GetMappingValueTypeEnum(string(m.ValueType)); !ok && m.ValueType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ValueType: %s. Supported values are: %s.", m.ValueType, strings.Join(GetValueTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/update_property_request_response.go b/fleetappsmanagement/update_property_request_response.go new file mode 100644 index 0000000000..13f5cc8ca7 --- /dev/null +++ b/fleetappsmanagement/update_property_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePropertyRequest wrapper for the UpdateProperty operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateProperty.go.html to see an example of how to use UpdatePropertyRequest. +type UpdatePropertyRequest struct { + + // unique Property identifier + PropertyId *string `mandatory:"true" contributesTo:"path" name:"propertyId"` + + // The information to be updated. + UpdatePropertyDetails `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 UpdatePropertyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePropertyRequest) 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 UpdatePropertyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePropertyRequest) 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 UpdatePropertyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePropertyResponse wrapper for the UpdateProperty operation +type UpdatePropertyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Property instance + Property `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePropertyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePropertyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/update_scheduler_definition_details.go b/fleetappsmanagement/update_scheduler_definition_details.go new file mode 100644 index 0000000000..3f0235a1bc --- /dev/null +++ b/fleetappsmanagement/update_scheduler_definition_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateSchedulerDefinitionDetails The information to be updated. +type UpdateSchedulerDefinitionDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Activity Initiation Cut Off + ActivityInitiationCutOff *int `mandatory:"false" json:"activityInitiationCutOff"` + + Schedule *Schedule `mandatory:"false" json:"schedule"` + + // Action Groups associated with the Schedule. + ActionGroups []ActionGroup `mandatory:"false" json:"actionGroups"` + + // Runbooks. + RunBooks []OperationRunbook `mandatory:"false" json:"runBooks"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateSchedulerDefinitionDetails) 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 UpdateSchedulerDefinitionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/update_scheduler_definition_request_response.go b/fleetappsmanagement/update_scheduler_definition_request_response.go new file mode 100644 index 0000000000..c53a0bdd3c --- /dev/null +++ b/fleetappsmanagement/update_scheduler_definition_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateSchedulerDefinitionRequest wrapper for the UpdateSchedulerDefinition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateSchedulerDefinition.go.html to see an example of how to use UpdateSchedulerDefinitionRequest. +type UpdateSchedulerDefinitionRequest struct { + + // unique SchedulerDefinition identifier + SchedulerDefinitionId *string `mandatory:"true" contributesTo:"path" name:"schedulerDefinitionId"` + + // The information to be updated. + UpdateSchedulerDefinitionDetails `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 UpdateSchedulerDefinitionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateSchedulerDefinitionRequest) 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 UpdateSchedulerDefinitionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSchedulerDefinitionRequest) 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 UpdateSchedulerDefinitionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateSchedulerDefinitionResponse wrapper for the UpdateSchedulerDefinition operation +type UpdateSchedulerDefinitionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateSchedulerDefinitionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSchedulerDefinitionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/update_scheduler_job_details.go b/fleetappsmanagement/update_scheduler_job_details.go new file mode 100644 index 0000000000..3749060215 --- /dev/null +++ b/fleetappsmanagement/update_scheduler_job_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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateSchedulerJobDetails The information to be updated. +type UpdateSchedulerJobDetails struct { + + // Scheduled date for the Job.Provide only the date + TimeScheduled *common.SDKTime `mandatory:"false" json:"timeScheduled"` + + // 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"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateSchedulerJobDetails) 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 UpdateSchedulerJobDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/update_scheduler_job_request_response.go b/fleetappsmanagement/update_scheduler_job_request_response.go new file mode 100644 index 0000000000..bc0a224d36 --- /dev/null +++ b/fleetappsmanagement/update_scheduler_job_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 fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateSchedulerJobRequest wrapper for the UpdateSchedulerJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateSchedulerJob.go.html to see an example of how to use UpdateSchedulerJobRequest. +type UpdateSchedulerJobRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // The information to be updated. + UpdateSchedulerJobDetails `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 UpdateSchedulerJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateSchedulerJobRequest) 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 UpdateSchedulerJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSchedulerJobRequest) 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 UpdateSchedulerJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateSchedulerJobResponse wrapper for the UpdateSchedulerJob operation +type UpdateSchedulerJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SchedulerJob instance + SchedulerJob `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateSchedulerJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSchedulerJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fleetappsmanagement/value_type.go b/fleetappsmanagement/value_type.go new file mode 100644 index 0000000000..65f8b9ffce --- /dev/null +++ b/fleetappsmanagement/value_type.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// ValueTypeEnum Enum with underlying type: string +type ValueTypeEnum string + +// Set of constants representing the allowable values for ValueTypeEnum +const ( + ValueTypeString ValueTypeEnum = "STRING" + ValueTypeNumeric ValueTypeEnum = "NUMERIC" +) + +var mappingValueTypeEnum = map[string]ValueTypeEnum{ + "STRING": ValueTypeString, + "NUMERIC": ValueTypeNumeric, +} + +var mappingValueTypeEnumLowerCase = map[string]ValueTypeEnum{ + "string": ValueTypeString, + "numeric": ValueTypeNumeric, +} + +// GetValueTypeEnumValues Enumerates the set of values for ValueTypeEnum +func GetValueTypeEnumValues() []ValueTypeEnum { + values := make([]ValueTypeEnum, 0) + for _, v := range mappingValueTypeEnum { + values = append(values, v) + } + return values +} + +// GetValueTypeEnumStringValues Enumerates the set of values in String for ValueTypeEnum +func GetValueTypeEnumStringValues() []string { + return []string{ + "STRING", + "NUMERIC", + } +} + +// GetMappingValueTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingValueTypeEnum(val string) (ValueTypeEnum, bool) { + enum, ok := mappingValueTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/vault_secret_credential_details.go b/fleetappsmanagement/vault_secret_credential_details.go new file mode 100644 index 0000000000..455c3a316b --- /dev/null +++ b/fleetappsmanagement/vault_secret_credential_details.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VaultSecretCredentialDetails Secret details. +type VaultSecretCredentialDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret. + SecretId *string `mandatory:"true" json:"secretId"` + + // The secret version. + SecretVersion *string `mandatory:"false" json:"secretVersion"` +} + +func (m VaultSecretCredentialDetails) 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 VaultSecretCredentialDetails) 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 VaultSecretCredentialDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVaultSecretCredentialDetails VaultSecretCredentialDetails + s := struct { + DiscriminatorParam string `json:"credentialType"` + MarshalTypeVaultSecretCredentialDetails + }{ + "VAULT_SECRET", + (MarshalTypeVaultSecretCredentialDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/work_request.go b/fleetappsmanagement/work_request.go new file mode 100644 index 0000000000..3aeeff8386 --- /dev/null +++ b/fleetappsmanagement/work_request.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequest A description of workrequest status +type WorkRequest struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment that contains the work request. Work requests should be scoped to + // the same compartment as the resource the work request affects. If the work request affects multiple resources, + // and those resources are not in the same compartment, it is up to the service team to pick the primary + // resource whose compartment should be used + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` + + // The date and time the object was updated, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` +} + +func (m WorkRequest) 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 WorkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(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(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/work_request_error.go b/fleetappsmanagement/work_request_error.go new file mode 100644 index 0000000000..b6fd7c1105 --- /dev/null +++ b/fleetappsmanagement/work_request_error.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestError An error encountered while executing a work request. +type WorkRequestError struct { + + // A machine-usable code for the error that occured. Error codes are listed on + // (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + Code *string `mandatory:"true" json:"code"` + + // A human readable description of the issue encountered. + Message *string `mandatory:"true" json:"message"` + + // The time the error occured. An RFC3339 formatted datetime string. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestError) 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 WorkRequestError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/work_request_error_collection.go b/fleetappsmanagement/work_request_error_collection.go new file mode 100644 index 0000000000..89a65d8cde --- /dev/null +++ b/fleetappsmanagement/work_request_error_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestErrorCollection Results of a workRequestError search. Contains both WorkRequestError items and other information, such as metadata. +type WorkRequestErrorCollection struct { + + // List of workRequestError objects. + Items []WorkRequestError `mandatory:"true" json:"items"` +} + +func (m WorkRequestErrorCollection) 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 WorkRequestErrorCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/work_request_log_entry.go b/fleetappsmanagement/work_request_log_entry.go new file mode 100644 index 0000000000..d1de0cb51e --- /dev/null +++ b/fleetappsmanagement/work_request_log_entry.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntry A log message from the execution of a work request. +type WorkRequestLogEntry struct { + + // Human-readable log message. + Message *string `mandatory:"true" json:"message"` + + // The time the log message was written. An RFC3339 formatted datetime string + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestLogEntry) 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 WorkRequestLogEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/work_request_log_entry_collection.go b/fleetappsmanagement/work_request_log_entry_collection.go new file mode 100644 index 0000000000..0530381582 --- /dev/null +++ b/fleetappsmanagement/work_request_log_entry_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntryCollection Results of a workRequestLog search. Contains both workRequestLog items and other information, such as metadata. +type WorkRequestLogEntryCollection struct { + + // List of workRequestLogEntries. + Items []WorkRequestLogEntry `mandatory:"true" json:"items"` +} + +func (m WorkRequestLogEntryCollection) 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 WorkRequestLogEntryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/work_request_resource.go b/fleetappsmanagement/work_request_resource.go new file mode 100644 index 0000000000..0ada71ce1c --- /dev/null +++ b/fleetappsmanagement/work_request_resource.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestResource A resource created or operated on by a work request. +type WorkRequestResource struct { + + // The resource type the work request affects. + EntityType *string `mandatory:"true" json:"entityType"` + + // The way in which this resource is affected by the work tracked in the work request. + // A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + // work is complete for that resource at which point it will transition to CREATED, UPDATED, + // or DELETED, respectively. + ActionType ActionTypeEnum `mandatory:"true" json:"actionType"` + + // The identifier of the resource the work request affects. + Identifier *string `mandatory:"true" json:"identifier"` + + // The URI path that the user can do a GET on to access the resource metadata + EntityUri *string `mandatory:"false" json:"entityUri"` + + // Additional information that helps to explain the resource. + Metadata map[string]string `mandatory:"false" json:"metadata"` +} + +func (m WorkRequestResource) 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 WorkRequestResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingActionTypeEnum(string(m.ActionType)); !ok && m.ActionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionType: %s. Supported values are: %s.", m.ActionType, strings.Join(GetActionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/work_request_resource_metadata_key.go b/fleetappsmanagement/work_request_resource_metadata_key.go new file mode 100644 index 0000000000..bb539e072d --- /dev/null +++ b/fleetappsmanagement/work_request_resource_metadata_key.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "strings" +) + +// WorkRequestResourceMetadataKeyEnum Enum with underlying type: string +type WorkRequestResourceMetadataKeyEnum string + +// Set of constants representing the allowable values for WorkRequestResourceMetadataKeyEnum +const ( + WorkRequestResourceMetadataKeyIsDryRun WorkRequestResourceMetadataKeyEnum = "IS_DRY_RUN" +) + +var mappingWorkRequestResourceMetadataKeyEnum = map[string]WorkRequestResourceMetadataKeyEnum{ + "IS_DRY_RUN": WorkRequestResourceMetadataKeyIsDryRun, +} + +var mappingWorkRequestResourceMetadataKeyEnumLowerCase = map[string]WorkRequestResourceMetadataKeyEnum{ + "is_dry_run": WorkRequestResourceMetadataKeyIsDryRun, +} + +// GetWorkRequestResourceMetadataKeyEnumValues Enumerates the set of values for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumValues() []WorkRequestResourceMetadataKeyEnum { + values := make([]WorkRequestResourceMetadataKeyEnum, 0) + for _, v := range mappingWorkRequestResourceMetadataKeyEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestResourceMetadataKeyEnumStringValues Enumerates the set of values in String for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumStringValues() []string { + return []string{ + "IS_DRY_RUN", + } +} + +// GetMappingWorkRequestResourceMetadataKeyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestResourceMetadataKeyEnum(val string) (WorkRequestResourceMetadataKeyEnum, bool) { + enum, ok := mappingWorkRequestResourceMetadataKeyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/work_request_summary.go b/fleetappsmanagement/work_request_summary.go new file mode 100644 index 0000000000..9e392e6621 --- /dev/null +++ b/fleetappsmanagement/work_request_summary.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummary A summary of the status of a work request. +type WorkRequestSummary struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment that contains the work request. Work requests should be scoped to + // the same compartment as the resource the work request affects. If the work request affects multiple resources, + // and those resources are not in the same compartment, it is up to the service team to pick the primary + // resource whose compartment should be used + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` + + // The date and time the object was updated, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` +} + +func (m WorkRequestSummary) 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 WorkRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(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(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/work_request_summary_collection.go b/fleetappsmanagement/work_request_summary_collection.go new file mode 100644 index 0000000000..39eb6d3a43 --- /dev/null +++ b/fleetappsmanagement/work_request_summary_collection.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummaryCollection Results of a workRequest search. Contains both WorkRequest items and other information, such as metadata. +type WorkRequestSummaryCollection struct { + + // List of workRequestSummary objects. + Items []WorkRequestSummary `mandatory:"true" json:"items"` +} + +func (m WorkRequestSummaryCollection) 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 WorkRequestSummaryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fleetappsmanagement/workflow_component.go b/fleetappsmanagement/workflow_component.go new file mode 100644 index 0000000000..0afe403a67 --- /dev/null +++ b/fleetappsmanagement/workflow_component.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkflowComponent Workflow Component Details. +type WorkflowComponent interface { +} + +type workflowcomponent struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *workflowcomponent) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerworkflowcomponent workflowcomponent + s := struct { + Model Unmarshalerworkflowcomponent + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *workflowcomponent) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "PARALLEL_TASK_GROUP": + mm := WorkflowGroupComponent{} + err = json.Unmarshal(data, &mm) + return mm, err + case "TASK": + mm := WorkflowTaskComponent{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for WorkflowComponent: %s.", m.Type) + return *m, nil + } +} + +func (m workflowcomponent) 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 workflowcomponent) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// WorkflowComponentTypeEnum Enum with underlying type: string +type WorkflowComponentTypeEnum string + +// Set of constants representing the allowable values for WorkflowComponentTypeEnum +const ( + WorkflowComponentTypeTask WorkflowComponentTypeEnum = "TASK" + WorkflowComponentTypeParallelTaskGroup WorkflowComponentTypeEnum = "PARALLEL_TASK_GROUP" +) + +var mappingWorkflowComponentTypeEnum = map[string]WorkflowComponentTypeEnum{ + "TASK": WorkflowComponentTypeTask, + "PARALLEL_TASK_GROUP": WorkflowComponentTypeParallelTaskGroup, +} + +var mappingWorkflowComponentTypeEnumLowerCase = map[string]WorkflowComponentTypeEnum{ + "task": WorkflowComponentTypeTask, + "parallel_task_group": WorkflowComponentTypeParallelTaskGroup, +} + +// GetWorkflowComponentTypeEnumValues Enumerates the set of values for WorkflowComponentTypeEnum +func GetWorkflowComponentTypeEnumValues() []WorkflowComponentTypeEnum { + values := make([]WorkflowComponentTypeEnum, 0) + for _, v := range mappingWorkflowComponentTypeEnum { + values = append(values, v) + } + return values +} + +// GetWorkflowComponentTypeEnumStringValues Enumerates the set of values in String for WorkflowComponentTypeEnum +func GetWorkflowComponentTypeEnumStringValues() []string { + return []string{ + "TASK", + "PARALLEL_TASK_GROUP", + } +} + +// GetMappingWorkflowComponentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkflowComponentTypeEnum(val string) (WorkflowComponentTypeEnum, bool) { + enum, ok := mappingWorkflowComponentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/workflow_group.go b/fleetappsmanagement/workflow_group.go new file mode 100644 index 0000000000..cf3703bee2 --- /dev/null +++ b/fleetappsmanagement/workflow_group.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. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkflowGroup Workflow Group Layout. +type WorkflowGroup struct { + + // Provide the name of the group. + GroupName *string `mandatory:"true" json:"groupName"` + + // Workflow Group Details. + Type WorkflowGroupTypeEnum `mandatory:"true" json:"type"` + + // Steps within the Group. + Steps []WorkflowComponent `mandatory:"true" json:"steps"` +} + +func (m WorkflowGroup) 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 WorkflowGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingWorkflowGroupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetWorkflowGroupTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *WorkflowGroup) UnmarshalJSON(data []byte) (e error) { + model := struct { + GroupName *string `json:"groupName"` + Type WorkflowGroupTypeEnum `json:"type"` + Steps []workflowcomponent `json:"steps"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.GroupName = model.GroupName + + m.Type = model.Type + + m.Steps = make([]WorkflowComponent, len(model.Steps)) + for i, n := range model.Steps { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Steps[i] = nn.(WorkflowComponent) + } else { + m.Steps[i] = nil + } + } + return +} + +// WorkflowGroupTypeEnum Enum with underlying type: string +type WorkflowGroupTypeEnum string + +// Set of constants representing the allowable values for WorkflowGroupTypeEnum +const ( + WorkflowGroupTypeParallelResourceGroup WorkflowGroupTypeEnum = "PARALLEL_RESOURCE_GROUP" + WorkflowGroupTypeRollingResourceGroup WorkflowGroupTypeEnum = "ROLLING_RESOURCE_GROUP" +) + +var mappingWorkflowGroupTypeEnum = map[string]WorkflowGroupTypeEnum{ + "PARALLEL_RESOURCE_GROUP": WorkflowGroupTypeParallelResourceGroup, + "ROLLING_RESOURCE_GROUP": WorkflowGroupTypeRollingResourceGroup, +} + +var mappingWorkflowGroupTypeEnumLowerCase = map[string]WorkflowGroupTypeEnum{ + "parallel_resource_group": WorkflowGroupTypeParallelResourceGroup, + "rolling_resource_group": WorkflowGroupTypeRollingResourceGroup, +} + +// GetWorkflowGroupTypeEnumValues Enumerates the set of values for WorkflowGroupTypeEnum +func GetWorkflowGroupTypeEnumValues() []WorkflowGroupTypeEnum { + values := make([]WorkflowGroupTypeEnum, 0) + for _, v := range mappingWorkflowGroupTypeEnum { + values = append(values, v) + } + return values +} + +// GetWorkflowGroupTypeEnumStringValues Enumerates the set of values in String for WorkflowGroupTypeEnum +func GetWorkflowGroupTypeEnumStringValues() []string { + return []string{ + "PARALLEL_RESOURCE_GROUP", + "ROLLING_RESOURCE_GROUP", + } +} + +// GetMappingWorkflowGroupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkflowGroupTypeEnum(val string) (WorkflowGroupTypeEnum, bool) { + enum, ok := mappingWorkflowGroupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/fleetappsmanagement/workflow_group_component.go b/fleetappsmanagement/workflow_group_component.go new file mode 100644 index 0000000000..c4d4aa8d7a --- /dev/null +++ b/fleetappsmanagement/workflow_group_component.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkflowGroupComponent Workflow Group Component Details. +type WorkflowGroupComponent struct { + + // Provide the name of the group. + GroupName *string `mandatory:"true" json:"groupName"` + + // Tasks within the Group. + // Provide the stepName for all tasks that are applicable + Steps []string `mandatory:"false" json:"steps"` +} + +func (m WorkflowGroupComponent) 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 WorkflowGroupComponent) 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 WorkflowGroupComponent) MarshalJSON() (buff []byte, e error) { + type MarshalTypeWorkflowGroupComponent WorkflowGroupComponent + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeWorkflowGroupComponent + }{ + "PARALLEL_TASK_GROUP", + (MarshalTypeWorkflowGroupComponent)(m), + } + + return json.Marshal(&s) +} diff --git a/fleetappsmanagement/workflow_task_component.go b/fleetappsmanagement/workflow_task_component.go new file mode 100644 index 0000000000..a64aaa38d3 --- /dev/null +++ b/fleetappsmanagement/workflow_task_component.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management Service API. Use this API to for all FAMS related activities. +// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkflowTaskComponent Workflow Task Component Details. +type WorkflowTaskComponent struct { + + // Provide StepName for the Task. + StepName *string `mandatory:"true" json:"stepName"` +} + +func (m WorkflowTaskComponent) 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 WorkflowTaskComponent) 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 WorkflowTaskComponent) MarshalJSON() (buff []byte, e error) { + type MarshalTypeWorkflowTaskComponent WorkflowTaskComponent + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeWorkflowTaskComponent + }{ + "TASK", + (MarshalTypeWorkflowTaskComponent)(m), + } + + return json.Marshal(&s) +} diff --git a/integration/extend_data_retention_details.go b/integration/extend_data_retention_details.go new file mode 100644 index 0000000000..e00c591544 --- /dev/null +++ b/integration/extend_data_retention_details.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. + +// Oracle Integration API +// +// Oracle Integration API. +// + +package integration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExtendDataRetentionDetails Details for extending data retention for given integration instance +type ExtendDataRetentionDetails struct { + + // Data retention period set for given integration instance + DataRetentionPeriod ExtendDataRetentionDetailsDataRetentionPeriodEnum `mandatory:"true" json:"dataRetentionPeriod"` +} + +func (m ExtendDataRetentionDetails) 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 ExtendDataRetentionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingExtendDataRetentionDetailsDataRetentionPeriodEnum(string(m.DataRetentionPeriod)); !ok && m.DataRetentionPeriod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DataRetentionPeriod: %s. Supported values are: %s.", m.DataRetentionPeriod, strings.Join(GetExtendDataRetentionDetailsDataRetentionPeriodEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExtendDataRetentionDetailsDataRetentionPeriodEnum Enum with underlying type: string +type ExtendDataRetentionDetailsDataRetentionPeriodEnum string + +// Set of constants representing the allowable values for ExtendDataRetentionDetailsDataRetentionPeriodEnum +const ( + ExtendDataRetentionDetailsDataRetentionPeriod1 ExtendDataRetentionDetailsDataRetentionPeriodEnum = "MONTHS_1" + ExtendDataRetentionDetailsDataRetentionPeriod3 ExtendDataRetentionDetailsDataRetentionPeriodEnum = "MONTHS_3" + ExtendDataRetentionDetailsDataRetentionPeriod6 ExtendDataRetentionDetailsDataRetentionPeriodEnum = "MONTHS_6" +) + +var mappingExtendDataRetentionDetailsDataRetentionPeriodEnum = map[string]ExtendDataRetentionDetailsDataRetentionPeriodEnum{ + "MONTHS_1": ExtendDataRetentionDetailsDataRetentionPeriod1, + "MONTHS_3": ExtendDataRetentionDetailsDataRetentionPeriod3, + "MONTHS_6": ExtendDataRetentionDetailsDataRetentionPeriod6, +} + +var mappingExtendDataRetentionDetailsDataRetentionPeriodEnumLowerCase = map[string]ExtendDataRetentionDetailsDataRetentionPeriodEnum{ + "months_1": ExtendDataRetentionDetailsDataRetentionPeriod1, + "months_3": ExtendDataRetentionDetailsDataRetentionPeriod3, + "months_6": ExtendDataRetentionDetailsDataRetentionPeriod6, +} + +// GetExtendDataRetentionDetailsDataRetentionPeriodEnumValues Enumerates the set of values for ExtendDataRetentionDetailsDataRetentionPeriodEnum +func GetExtendDataRetentionDetailsDataRetentionPeriodEnumValues() []ExtendDataRetentionDetailsDataRetentionPeriodEnum { + values := make([]ExtendDataRetentionDetailsDataRetentionPeriodEnum, 0) + for _, v := range mappingExtendDataRetentionDetailsDataRetentionPeriodEnum { + values = append(values, v) + } + return values +} + +// GetExtendDataRetentionDetailsDataRetentionPeriodEnumStringValues Enumerates the set of values in String for ExtendDataRetentionDetailsDataRetentionPeriodEnum +func GetExtendDataRetentionDetailsDataRetentionPeriodEnumStringValues() []string { + return []string{ + "MONTHS_1", + "MONTHS_3", + "MONTHS_6", + } +} + +// GetMappingExtendDataRetentionDetailsDataRetentionPeriodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExtendDataRetentionDetailsDataRetentionPeriodEnum(val string) (ExtendDataRetentionDetailsDataRetentionPeriodEnum, bool) { + enum, ok := mappingExtendDataRetentionDetailsDataRetentionPeriodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/integration/extend_data_retention_request_response.go b/integration/extend_data_retention_request_response.go new file mode 100644 index 0000000000..747288af01 --- /dev/null +++ b/integration/extend_data_retention_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 integration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ExtendDataRetentionRequest wrapper for the ExtendDataRetention operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/integration/ExtendDataRetention.go.html to see an example of how to use ExtendDataRetentionRequest. +type ExtendDataRetentionRequest struct { + + // Unique Integration Instance identifier. + IntegrationInstanceId *string `mandatory:"true" contributesTo:"path" name:"integrationInstanceId"` + + // Extend Data Retention period for integration instance. + ExtendDataRetentionDetails `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"` + + // 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 ExtendDataRetentionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ExtendDataRetentionRequest) 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 ExtendDataRetentionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ExtendDataRetentionRequest) 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 ExtendDataRetentionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExtendDataRetentionResponse wrapper for the ExtendDataRetention operation +type ExtendDataRetentionResponse 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, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ExtendDataRetentionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ExtendDataRetentionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/integration/integration_instance.go b/integration/integration_instance.go index cd434d5e82..7de2097105 100644 --- a/integration/integration_instance.go +++ b/integration/integration_instance.go @@ -93,6 +93,9 @@ type IntegrationInstance struct { Shape IntegrationInstanceShapeEnum `mandatory:"false" json:"shape,omitempty"` PrivateEndpointOutboundConnection OutboundConnection `mandatory:"false" json:"privateEndpointOutboundConnection"` + + // Data retention period set for given integration instance + DataRetentionPeriod IntegrationInstanceDataRetentionPeriodEnum `mandatory:"false" json:"dataRetentionPeriod,omitempty"` } func (m IntegrationInstance) String() string { @@ -117,6 +120,9 @@ func (m IntegrationInstance) ValidateEnumValue() (bool, error) { if _, ok := GetMappingIntegrationInstanceShapeEnum(string(m.Shape)); !ok && m.Shape != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Shape: %s. Supported values are: %s.", m.Shape, strings.Join(GetIntegrationInstanceShapeEnumStringValues(), ","))) } + if _, ok := GetMappingIntegrationInstanceDataRetentionPeriodEnum(string(m.DataRetentionPeriod)); !ok && m.DataRetentionPeriod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DataRetentionPeriod: %s. Supported values are: %s.", m.DataRetentionPeriod, strings.Join(GetIntegrationInstanceDataRetentionPeriodEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -143,6 +149,7 @@ func (m *IntegrationInstance) UnmarshalJSON(data []byte) (e error) { Attachments []AttachmentDetails `json:"attachments"` Shape IntegrationInstanceShapeEnum `json:"shape"` PrivateEndpointOutboundConnection outboundconnection `json:"privateEndpointOutboundConnection"` + DataRetentionPeriod IntegrationInstanceDataRetentionPeriodEnum `json:"dataRetentionPeriod"` Id *string `json:"id"` DisplayName *string `json:"displayName"` CompartmentId *string `json:"compartmentId"` @@ -207,6 +214,8 @@ func (m *IntegrationInstance) UnmarshalJSON(data []byte) (e error) { m.PrivateEndpointOutboundConnection = nil } + m.DataRetentionPeriod = model.DataRetentionPeriod + m.Id = model.Id m.DisplayName = model.DisplayName @@ -290,6 +299,7 @@ const ( IntegrationInstanceLifecycleStateDeleting IntegrationInstanceLifecycleStateEnum = "DELETING" IntegrationInstanceLifecycleStateDeleted IntegrationInstanceLifecycleStateEnum = "DELETED" IntegrationInstanceLifecycleStateFailed IntegrationInstanceLifecycleStateEnum = "FAILED" + IntegrationInstanceLifecycleStateStandby IntegrationInstanceLifecycleStateEnum = "STANDBY" ) var mappingIntegrationInstanceLifecycleStateEnum = map[string]IntegrationInstanceLifecycleStateEnum{ @@ -300,6 +310,7 @@ var mappingIntegrationInstanceLifecycleStateEnum = map[string]IntegrationInstanc "DELETING": IntegrationInstanceLifecycleStateDeleting, "DELETED": IntegrationInstanceLifecycleStateDeleted, "FAILED": IntegrationInstanceLifecycleStateFailed, + "STANDBY": IntegrationInstanceLifecycleStateStandby, } var mappingIntegrationInstanceLifecycleStateEnumLowerCase = map[string]IntegrationInstanceLifecycleStateEnum{ @@ -310,6 +321,7 @@ var mappingIntegrationInstanceLifecycleStateEnumLowerCase = map[string]Integrati "deleting": IntegrationInstanceLifecycleStateDeleting, "deleted": IntegrationInstanceLifecycleStateDeleted, "failed": IntegrationInstanceLifecycleStateFailed, + "standby": IntegrationInstanceLifecycleStateStandby, } // GetIntegrationInstanceLifecycleStateEnumValues Enumerates the set of values for IntegrationInstanceLifecycleStateEnum @@ -331,6 +343,7 @@ func GetIntegrationInstanceLifecycleStateEnumStringValues() []string { "DELETING", "DELETED", "FAILED", + "STANDBY", } } @@ -427,3 +440,49 @@ func GetMappingIntegrationInstanceShapeEnum(val string) (IntegrationInstanceShap enum, ok := mappingIntegrationInstanceShapeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// IntegrationInstanceDataRetentionPeriodEnum Enum with underlying type: string +type IntegrationInstanceDataRetentionPeriodEnum string + +// Set of constants representing the allowable values for IntegrationInstanceDataRetentionPeriodEnum +const ( + IntegrationInstanceDataRetentionPeriod1 IntegrationInstanceDataRetentionPeriodEnum = "MONTHS_1" + IntegrationInstanceDataRetentionPeriod3 IntegrationInstanceDataRetentionPeriodEnum = "MONTHS_3" + IntegrationInstanceDataRetentionPeriod6 IntegrationInstanceDataRetentionPeriodEnum = "MONTHS_6" +) + +var mappingIntegrationInstanceDataRetentionPeriodEnum = map[string]IntegrationInstanceDataRetentionPeriodEnum{ + "MONTHS_1": IntegrationInstanceDataRetentionPeriod1, + "MONTHS_3": IntegrationInstanceDataRetentionPeriod3, + "MONTHS_6": IntegrationInstanceDataRetentionPeriod6, +} + +var mappingIntegrationInstanceDataRetentionPeriodEnumLowerCase = map[string]IntegrationInstanceDataRetentionPeriodEnum{ + "months_1": IntegrationInstanceDataRetentionPeriod1, + "months_3": IntegrationInstanceDataRetentionPeriod3, + "months_6": IntegrationInstanceDataRetentionPeriod6, +} + +// GetIntegrationInstanceDataRetentionPeriodEnumValues Enumerates the set of values for IntegrationInstanceDataRetentionPeriodEnum +func GetIntegrationInstanceDataRetentionPeriodEnumValues() []IntegrationInstanceDataRetentionPeriodEnum { + values := make([]IntegrationInstanceDataRetentionPeriodEnum, 0) + for _, v := range mappingIntegrationInstanceDataRetentionPeriodEnum { + values = append(values, v) + } + return values +} + +// GetIntegrationInstanceDataRetentionPeriodEnumStringValues Enumerates the set of values in String for IntegrationInstanceDataRetentionPeriodEnum +func GetIntegrationInstanceDataRetentionPeriodEnumStringValues() []string { + return []string{ + "MONTHS_1", + "MONTHS_3", + "MONTHS_6", + } +} + +// GetMappingIntegrationInstanceDataRetentionPeriodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntegrationInstanceDataRetentionPeriodEnum(val string) (IntegrationInstanceDataRetentionPeriodEnum, bool) { + enum, ok := mappingIntegrationInstanceDataRetentionPeriodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/integration/integration_instance_summary.go b/integration/integration_instance_summary.go index 5d24cfc833..76f867b644 100644 --- a/integration/integration_instance_summary.go +++ b/integration/integration_instance_summary.go @@ -88,6 +88,9 @@ type IntegrationInstanceSummary struct { Shape IntegrationInstanceSummaryShapeEnum `mandatory:"false" json:"shape,omitempty"` PrivateEndpointOutboundConnection OutboundConnection `mandatory:"false" json:"privateEndpointOutboundConnection"` + + // Data retention period set for given integration instance + DataRetentionPeriod IntegrationInstanceSummaryDataRetentionPeriodEnum `mandatory:"false" json:"dataRetentionPeriod,omitempty"` } func (m IntegrationInstanceSummary) String() string { @@ -112,6 +115,9 @@ func (m IntegrationInstanceSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingIntegrationInstanceSummaryShapeEnum(string(m.Shape)); !ok && m.Shape != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Shape: %s. Supported values are: %s.", m.Shape, strings.Join(GetIntegrationInstanceSummaryShapeEnumStringValues(), ","))) } + if _, ok := GetMappingIntegrationInstanceSummaryDataRetentionPeriodEnum(string(m.DataRetentionPeriod)); !ok && m.DataRetentionPeriod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DataRetentionPeriod: %s. Supported values are: %s.", m.DataRetentionPeriod, strings.Join(GetIntegrationInstanceSummaryDataRetentionPeriodEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -136,6 +142,7 @@ func (m *IntegrationInstanceSummary) UnmarshalJSON(data []byte) (e error) { SystemTags map[string]map[string]interface{} `json:"systemTags"` Shape IntegrationInstanceSummaryShapeEnum `json:"shape"` PrivateEndpointOutboundConnection outboundconnection `json:"privateEndpointOutboundConnection"` + DataRetentionPeriod IntegrationInstanceSummaryDataRetentionPeriodEnum `json:"dataRetentionPeriod"` Id *string `json:"id"` DisplayName *string `json:"displayName"` CompartmentId *string `json:"compartmentId"` @@ -196,6 +203,8 @@ func (m *IntegrationInstanceSummary) UnmarshalJSON(data []byte) (e error) { m.PrivateEndpointOutboundConnection = nil } + m.DataRetentionPeriod = model.DataRetentionPeriod + m.Id = model.Id m.DisplayName = model.DisplayName @@ -279,6 +288,7 @@ const ( IntegrationInstanceSummaryLifecycleStateDeleting IntegrationInstanceSummaryLifecycleStateEnum = "DELETING" IntegrationInstanceSummaryLifecycleStateDeleted IntegrationInstanceSummaryLifecycleStateEnum = "DELETED" IntegrationInstanceSummaryLifecycleStateFailed IntegrationInstanceSummaryLifecycleStateEnum = "FAILED" + IntegrationInstanceSummaryLifecycleStateStandby IntegrationInstanceSummaryLifecycleStateEnum = "STANDBY" ) var mappingIntegrationInstanceSummaryLifecycleStateEnum = map[string]IntegrationInstanceSummaryLifecycleStateEnum{ @@ -289,6 +299,7 @@ var mappingIntegrationInstanceSummaryLifecycleStateEnum = map[string]Integration "DELETING": IntegrationInstanceSummaryLifecycleStateDeleting, "DELETED": IntegrationInstanceSummaryLifecycleStateDeleted, "FAILED": IntegrationInstanceSummaryLifecycleStateFailed, + "STANDBY": IntegrationInstanceSummaryLifecycleStateStandby, } var mappingIntegrationInstanceSummaryLifecycleStateEnumLowerCase = map[string]IntegrationInstanceSummaryLifecycleStateEnum{ @@ -299,6 +310,7 @@ var mappingIntegrationInstanceSummaryLifecycleStateEnumLowerCase = map[string]In "deleting": IntegrationInstanceSummaryLifecycleStateDeleting, "deleted": IntegrationInstanceSummaryLifecycleStateDeleted, "failed": IntegrationInstanceSummaryLifecycleStateFailed, + "standby": IntegrationInstanceSummaryLifecycleStateStandby, } // GetIntegrationInstanceSummaryLifecycleStateEnumValues Enumerates the set of values for IntegrationInstanceSummaryLifecycleStateEnum @@ -320,6 +332,7 @@ func GetIntegrationInstanceSummaryLifecycleStateEnumStringValues() []string { "DELETING", "DELETED", "FAILED", + "STANDBY", } } @@ -416,3 +429,49 @@ func GetMappingIntegrationInstanceSummaryShapeEnum(val string) (IntegrationInsta enum, ok := mappingIntegrationInstanceSummaryShapeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// IntegrationInstanceSummaryDataRetentionPeriodEnum Enum with underlying type: string +type IntegrationInstanceSummaryDataRetentionPeriodEnum string + +// Set of constants representing the allowable values for IntegrationInstanceSummaryDataRetentionPeriodEnum +const ( + IntegrationInstanceSummaryDataRetentionPeriod1 IntegrationInstanceSummaryDataRetentionPeriodEnum = "MONTHS_1" + IntegrationInstanceSummaryDataRetentionPeriod3 IntegrationInstanceSummaryDataRetentionPeriodEnum = "MONTHS_3" + IntegrationInstanceSummaryDataRetentionPeriod6 IntegrationInstanceSummaryDataRetentionPeriodEnum = "MONTHS_6" +) + +var mappingIntegrationInstanceSummaryDataRetentionPeriodEnum = map[string]IntegrationInstanceSummaryDataRetentionPeriodEnum{ + "MONTHS_1": IntegrationInstanceSummaryDataRetentionPeriod1, + "MONTHS_3": IntegrationInstanceSummaryDataRetentionPeriod3, + "MONTHS_6": IntegrationInstanceSummaryDataRetentionPeriod6, +} + +var mappingIntegrationInstanceSummaryDataRetentionPeriodEnumLowerCase = map[string]IntegrationInstanceSummaryDataRetentionPeriodEnum{ + "months_1": IntegrationInstanceSummaryDataRetentionPeriod1, + "months_3": IntegrationInstanceSummaryDataRetentionPeriod3, + "months_6": IntegrationInstanceSummaryDataRetentionPeriod6, +} + +// GetIntegrationInstanceSummaryDataRetentionPeriodEnumValues Enumerates the set of values for IntegrationInstanceSummaryDataRetentionPeriodEnum +func GetIntegrationInstanceSummaryDataRetentionPeriodEnumValues() []IntegrationInstanceSummaryDataRetentionPeriodEnum { + values := make([]IntegrationInstanceSummaryDataRetentionPeriodEnum, 0) + for _, v := range mappingIntegrationInstanceSummaryDataRetentionPeriodEnum { + values = append(values, v) + } + return values +} + +// GetIntegrationInstanceSummaryDataRetentionPeriodEnumStringValues Enumerates the set of values in String for IntegrationInstanceSummaryDataRetentionPeriodEnum +func GetIntegrationInstanceSummaryDataRetentionPeriodEnumStringValues() []string { + return []string{ + "MONTHS_1", + "MONTHS_3", + "MONTHS_6", + } +} + +// GetMappingIntegrationInstanceSummaryDataRetentionPeriodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntegrationInstanceSummaryDataRetentionPeriodEnum(val string) (IntegrationInstanceSummaryDataRetentionPeriodEnum, bool) { + enum, ok := mappingIntegrationInstanceSummaryDataRetentionPeriodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/integration/integration_integrationinstance_client.go b/integration/integration_integrationinstance_client.go index 7c81eb2c94..91f7df05f9 100644 --- a/integration/integration_integrationinstance_client.go +++ b/integration/integration_integrationinstance_client.go @@ -461,6 +461,69 @@ func (client IntegrationInstanceClient) enableProcessAutomation(ctx context.Cont return response, err } +// ExtendDataRetention Extend Data Retention period for given Integration Instance +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/integration/ExtendDataRetention.go.html to see an example of how to use ExtendDataRetention API. +// A default retry strategy applies to this operation ExtendDataRetention() +func (client IntegrationInstanceClient) ExtendDataRetention(ctx context.Context, request ExtendDataRetentionRequest) (response ExtendDataRetentionResponse, 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.extendDataRetention, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ExtendDataRetentionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ExtendDataRetentionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ExtendDataRetentionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ExtendDataRetentionResponse") + } + return +} + +// extendDataRetention implements the OCIOperation interface (enables retrying operations) +func (client IntegrationInstanceClient) extendDataRetention(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/integrationInstances/{integrationInstanceId}/actions/extendDataRetention", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ExtendDataRetentionResponse + 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/integration/20190131/IntegrationInstance/ExtendDataRetention" + err = common.PostProcessServiceError(err, "IntegrationInstance", "ExtendDataRetention", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetIntegrationInstance Gets a IntegrationInstance by identifier // // # See also diff --git a/integration/list_integration_instances_request_response.go b/integration/list_integration_instances_request_response.go index c7f2e1fb3a..36ea16688f 100644 --- a/integration/list_integration_instances_request_response.go +++ b/integration/list_integration_instances_request_response.go @@ -138,6 +138,7 @@ const ( ListIntegrationInstancesLifecycleStateDeleting ListIntegrationInstancesLifecycleStateEnum = "DELETING" ListIntegrationInstancesLifecycleStateDeleted ListIntegrationInstancesLifecycleStateEnum = "DELETED" ListIntegrationInstancesLifecycleStateFailed ListIntegrationInstancesLifecycleStateEnum = "FAILED" + ListIntegrationInstancesLifecycleStateStandby ListIntegrationInstancesLifecycleStateEnum = "STANDBY" ) var mappingListIntegrationInstancesLifecycleStateEnum = map[string]ListIntegrationInstancesLifecycleStateEnum{ @@ -148,6 +149,7 @@ var mappingListIntegrationInstancesLifecycleStateEnum = map[string]ListIntegrati "DELETING": ListIntegrationInstancesLifecycleStateDeleting, "DELETED": ListIntegrationInstancesLifecycleStateDeleted, "FAILED": ListIntegrationInstancesLifecycleStateFailed, + "STANDBY": ListIntegrationInstancesLifecycleStateStandby, } var mappingListIntegrationInstancesLifecycleStateEnumLowerCase = map[string]ListIntegrationInstancesLifecycleStateEnum{ @@ -158,6 +160,7 @@ var mappingListIntegrationInstancesLifecycleStateEnumLowerCase = map[string]List "deleting": ListIntegrationInstancesLifecycleStateDeleting, "deleted": ListIntegrationInstancesLifecycleStateDeleted, "failed": ListIntegrationInstancesLifecycleStateFailed, + "standby": ListIntegrationInstancesLifecycleStateStandby, } // GetListIntegrationInstancesLifecycleStateEnumValues Enumerates the set of values for ListIntegrationInstancesLifecycleStateEnum @@ -179,6 +182,7 @@ func GetListIntegrationInstancesLifecycleStateEnumStringValues() []string { "DELETING", "DELETED", "FAILED", + "STANDBY", } } diff --git a/integration/work_request.go b/integration/work_request.go index 80738fc0cd..1eb470cd9f 100644 --- a/integration/work_request.go +++ b/integration/work_request.go @@ -89,6 +89,7 @@ const ( WorkRequestOperationTypeDeleteIntegrationInstance WorkRequestOperationTypeEnum = "DELETE_INTEGRATION_INSTANCE" WorkRequestOperationTypeChangePrivateEndpointOutboundConnection WorkRequestOperationTypeEnum = "CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION" WorkRequestOperationTypeEnableProcessAutomation WorkRequestOperationTypeEnum = "ENABLE_PROCESS_AUTOMATION" + WorkRequestOperationTypeExtendDataRetention WorkRequestOperationTypeEnum = "EXTEND_DATA_RETENTION" ) var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ @@ -99,6 +100,7 @@ var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnu "DELETE_INTEGRATION_INSTANCE": WorkRequestOperationTypeDeleteIntegrationInstance, "CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION": WorkRequestOperationTypeChangePrivateEndpointOutboundConnection, "ENABLE_PROCESS_AUTOMATION": WorkRequestOperationTypeEnableProcessAutomation, + "EXTEND_DATA_RETENTION": WorkRequestOperationTypeExtendDataRetention, } var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ @@ -109,6 +111,7 @@ var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperati "delete_integration_instance": WorkRequestOperationTypeDeleteIntegrationInstance, "change_private_endpoint_outbound_connection": WorkRequestOperationTypeChangePrivateEndpointOutboundConnection, "enable_process_automation": WorkRequestOperationTypeEnableProcessAutomation, + "extend_data_retention": WorkRequestOperationTypeExtendDataRetention, } // GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum @@ -130,6 +133,7 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "DELETE_INTEGRATION_INSTANCE", "CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION", "ENABLE_PROCESS_AUTOMATION", + "EXTEND_DATA_RETENTION", } } diff --git a/integration/work_request_summary.go b/integration/work_request_summary.go index 949be3c581..25ddc958a1 100644 --- a/integration/work_request_summary.go +++ b/integration/work_request_summary.go @@ -89,6 +89,7 @@ const ( WorkRequestSummaryOperationTypeDeleteIntegrationInstance WorkRequestSummaryOperationTypeEnum = "DELETE_INTEGRATION_INSTANCE" WorkRequestSummaryOperationTypeChangePrivateEndpointOutboundConnection WorkRequestSummaryOperationTypeEnum = "CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION" WorkRequestSummaryOperationTypeEnableProcessAutomation WorkRequestSummaryOperationTypeEnum = "ENABLE_PROCESS_AUTOMATION" + WorkRequestSummaryOperationTypeExtendDataRetention WorkRequestSummaryOperationTypeEnum = "EXTEND_DATA_RETENTION" ) var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOperationTypeEnum{ @@ -99,6 +100,7 @@ var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOp "DELETE_INTEGRATION_INSTANCE": WorkRequestSummaryOperationTypeDeleteIntegrationInstance, "CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION": WorkRequestSummaryOperationTypeChangePrivateEndpointOutboundConnection, "ENABLE_PROCESS_AUTOMATION": WorkRequestSummaryOperationTypeEnableProcessAutomation, + "EXTEND_DATA_RETENTION": WorkRequestSummaryOperationTypeExtendDataRetention, } var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequestSummaryOperationTypeEnum{ @@ -109,6 +111,7 @@ var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequest "delete_integration_instance": WorkRequestSummaryOperationTypeDeleteIntegrationInstance, "change_private_endpoint_outbound_connection": WorkRequestSummaryOperationTypeChangePrivateEndpointOutboundConnection, "enable_process_automation": WorkRequestSummaryOperationTypeEnableProcessAutomation, + "extend_data_retention": WorkRequestSummaryOperationTypeExtendDataRetention, } // GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestSummaryOperationTypeEnum @@ -130,6 +133,7 @@ func GetWorkRequestSummaryOperationTypeEnumStringValues() []string { "DELETE_INTEGRATION_INSTANCE", "CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION", "ENABLE_PROCESS_AUTOMATION", + "EXTEND_DATA_RETENTION", } } diff --git a/jms/jms_javamanagementservice_client.go b/jms/jms_javamanagementservice_client.go index 9136974651..2dec04afec 100644 --- a/jms/jms_javamanagementservice_client.go +++ b/jms/jms_javamanagementservice_client.go @@ -145,7 +145,7 @@ func (client JavaManagementServiceClient) addFleetInstallationSites(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/AddFleetInstallationSites" 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 := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/CancelWorkRequest" 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 := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ChangeFleetCompartment" 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 := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/CreateBlocklist" err = common.PostProcessServiceError(err, "JavaManagementService", "CreateBlocklist", apiReferenceLink) return response, err } @@ -392,7 +392,7 @@ func (client JavaManagementServiceClient) createDrsFile(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateDrsFile" 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 := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateFleet" err = common.PostProcessServiceError(err, "JavaManagementService", "CreateFleet", apiReferenceLink) return response, err } @@ -525,7 +525,7 @@ func (client JavaManagementServiceClient) createJmsPlugin(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JmsPlugin/CreateJmsPlugin" err = common.PostProcessServiceError(err, "JavaManagementService", "CreateJmsPlugin", apiReferenceLink) return response, err } @@ -583,7 +583,7 @@ func (client JavaManagementServiceClient) deleteBlocklist(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/DeleteBlocklist" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteBlocklist", apiReferenceLink) return response, err } @@ -641,7 +641,7 @@ func (client JavaManagementServiceClient) deleteCryptoAnalysisResult(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/DeleteCryptoAnalysisResult" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteCryptoAnalysisResult", apiReferenceLink) return response, err } @@ -699,7 +699,7 @@ func (client JavaManagementServiceClient) deleteDrsFile(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/DeleteDrsFile" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteDrsFile", apiReferenceLink) return response, err } @@ -757,7 +757,7 @@ func (client JavaManagementServiceClient) deleteFleet(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DeleteFleet" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteFleet", apiReferenceLink) return response, err } @@ -815,7 +815,7 @@ func (client JavaManagementServiceClient) deleteJavaMigrationAnalysisResult(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/DeleteJavaMigrationAnalysisResult" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteJavaMigrationAnalysisResult", apiReferenceLink) return response, err } @@ -874,7 +874,7 @@ func (client JavaManagementServiceClient) deleteJmsPlugin(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JmsPlugin/DeleteJmsPlugin" err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteJmsPlugin", apiReferenceLink) return response, err } @@ -932,7 +932,7 @@ func (client JavaManagementServiceClient) deletePerformanceTuningAnalysisResult( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/DeletePerformanceTuningAnalysisResult" err = common.PostProcessServiceError(err, "JavaManagementService", "DeletePerformanceTuningAnalysisResult", apiReferenceLink) return response, err } @@ -995,7 +995,7 @@ func (client JavaManagementServiceClient) disableDrs(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DisableDrs" err = common.PostProcessServiceError(err, "JavaManagementService", "DisableDrs", apiReferenceLink) return response, err } @@ -1058,7 +1058,7 @@ func (client JavaManagementServiceClient) enableDrs(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/EnableDrs" err = common.PostProcessServiceError(err, "JavaManagementService", "EnableDrs", apiReferenceLink) return response, err } @@ -1115,7 +1115,7 @@ func (client JavaManagementServiceClient) generateAgentDeployScript(ctx context. httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GenerateAgentDeployScript" err = common.PostProcessServiceError(err, "JavaManagementService", "GenerateAgentDeployScript", apiReferenceLink) return response, err } @@ -1172,7 +1172,7 @@ func (client JavaManagementServiceClient) generateAgentInstallerConfiguration(ct httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/AgentInstallerSummary/GenerateAgentInstallerConfiguration" err = common.PostProcessServiceError(err, "JavaManagementService", "GenerateAgentInstallerConfiguration", apiReferenceLink) return response, err } @@ -1229,7 +1229,7 @@ func (client JavaManagementServiceClient) generateLoadPipelineScript(ctx context httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GenerateLoadPipelineScript" err = common.PostProcessServiceError(err, "JavaManagementService", "GenerateLoadPipelineScript", apiReferenceLink) return response, err } @@ -1287,7 +1287,7 @@ func (client JavaManagementServiceClient) getCryptoAnalysisResult(ctx context.Co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/GetCryptoAnalysisResult" err = common.PostProcessServiceError(err, "JavaManagementService", "GetCryptoAnalysisResult", apiReferenceLink) return response, err } @@ -1345,7 +1345,7 @@ func (client JavaManagementServiceClient) getDrsFile(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/GetDrsFile" err = common.PostProcessServiceError(err, "JavaManagementService", "GetDrsFile", apiReferenceLink) return response, err } @@ -1403,7 +1403,7 @@ func (client JavaManagementServiceClient) getExportSetting(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/GetExportSetting" err = common.PostProcessServiceError(err, "JavaManagementService", "GetExportSetting", apiReferenceLink) return response, err } @@ -1461,7 +1461,7 @@ func (client JavaManagementServiceClient) getExportStatus(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportStatus/GetExportStatus" err = common.PostProcessServiceError(err, "JavaManagementService", "GetExportStatus", apiReferenceLink) return response, err } @@ -1519,7 +1519,7 @@ func (client JavaManagementServiceClient) getFleet(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GetFleet" err = common.PostProcessServiceError(err, "JavaManagementService", "GetFleet", apiReferenceLink) return response, err } @@ -1577,7 +1577,7 @@ func (client JavaManagementServiceClient) getFleetAdvancedFeatureConfiguration(c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/GetFleetAdvancedFeatureConfiguration" err = common.PostProcessServiceError(err, "JavaManagementService", "GetFleetAdvancedFeatureConfiguration", apiReferenceLink) return response, err } @@ -1635,7 +1635,7 @@ func (client JavaManagementServiceClient) getFleetAgentConfiguration(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/GetFleetAgentConfiguration" err = common.PostProcessServiceError(err, "JavaManagementService", "GetFleetAgentConfiguration", apiReferenceLink) return response, err } @@ -1693,7 +1693,7 @@ func (client JavaManagementServiceClient) getJavaFamily(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/GetJavaFamily" err = common.PostProcessServiceError(err, "JavaManagementService", "GetJavaFamily", apiReferenceLink) return response, err } @@ -1751,7 +1751,7 @@ func (client JavaManagementServiceClient) getJavaMigrationAnalysisResult(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/GetJavaMigrationAnalysisResult" err = common.PostProcessServiceError(err, "JavaManagementService", "GetJavaMigrationAnalysisResult", apiReferenceLink) return response, err } @@ -1809,7 +1809,7 @@ func (client JavaManagementServiceClient) getJavaRelease(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/GetJavaRelease" err = common.PostProcessServiceError(err, "JavaManagementService", "GetJavaRelease", apiReferenceLink) return response, err } @@ -1867,7 +1867,7 @@ func (client JavaManagementServiceClient) getJmsPlugin(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JmsPlugin/GetJmsPlugin" err = common.PostProcessServiceError(err, "JavaManagementService", "GetJmsPlugin", apiReferenceLink) return response, err } @@ -1925,7 +1925,7 @@ func (client JavaManagementServiceClient) getPerformanceTuningAnalysisResult(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/GetPerformanceTuningAnalysisResult" err = common.PostProcessServiceError(err, "JavaManagementService", "GetPerformanceTuningAnalysisResult", apiReferenceLink) return response, err } @@ -1983,7 +1983,7 @@ func (client JavaManagementServiceClient) getWorkRequest(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "JavaManagementService", "GetWorkRequest", apiReferenceLink) return response, err } @@ -2041,7 +2041,7 @@ func (client JavaManagementServiceClient) listAgentInstallers(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/AgentInstallerSummary/ListAgentInstallers" err = common.PostProcessServiceError(err, "JavaManagementService", "ListAgentInstallers", apiReferenceLink) return response, err } @@ -2099,7 +2099,7 @@ func (client JavaManagementServiceClient) listAnnouncements(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/AnnouncementCollection/ListAnnouncements" err = common.PostProcessServiceError(err, "JavaManagementService", "ListAnnouncements", apiReferenceLink) return response, err } @@ -2157,7 +2157,7 @@ func (client JavaManagementServiceClient) listBlocklists(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/ListBlocklists" err = common.PostProcessServiceError(err, "JavaManagementService", "ListBlocklists", apiReferenceLink) return response, err } @@ -2215,7 +2215,7 @@ func (client JavaManagementServiceClient) listCryptoAnalysisResults(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/ListCryptoAnalysisResults" err = common.PostProcessServiceError(err, "JavaManagementService", "ListCryptoAnalysisResults", apiReferenceLink) return response, err } @@ -2273,7 +2273,7 @@ func (client JavaManagementServiceClient) listDrsFiles(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFileCollection/ListDrsFiles" err = common.PostProcessServiceError(err, "JavaManagementService", "ListDrsFiles", apiReferenceLink) return response, err } @@ -2331,7 +2331,7 @@ func (client JavaManagementServiceClient) listFleetDiagnoses(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetDiagnosisSummary/ListFleetDiagnoses" err = common.PostProcessServiceError(err, "JavaManagementService", "ListFleetDiagnoses", apiReferenceLink) return response, err } @@ -2390,7 +2390,7 @@ func (client JavaManagementServiceClient) listFleets(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ListFleets" err = common.PostProcessServiceError(err, "JavaManagementService", "ListFleets", apiReferenceLink) return response, err } @@ -2448,7 +2448,7 @@ func (client JavaManagementServiceClient) listInstallationSites(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/ListInstallationSites" err = common.PostProcessServiceError(err, "JavaManagementService", "ListInstallationSites", apiReferenceLink) return response, err } @@ -2507,7 +2507,7 @@ func (client JavaManagementServiceClient) listJavaFamilies(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/ListJavaFamilies" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJavaFamilies", apiReferenceLink) return response, err } @@ -2565,7 +2565,7 @@ func (client JavaManagementServiceClient) listJavaMigrationAnalysisResults(ctx c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/ListJavaMigrationAnalysisResults" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJavaMigrationAnalysisResults", apiReferenceLink) return response, err } @@ -2623,7 +2623,7 @@ func (client JavaManagementServiceClient) listJavaReleases(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/ListJavaReleases" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJavaReleases", apiReferenceLink) return response, err } @@ -2681,7 +2681,7 @@ func (client JavaManagementServiceClient) listJmsPlugins(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JmsPlugin/ListJmsPlugins" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJmsPlugins", apiReferenceLink) return response, err } @@ -2739,7 +2739,7 @@ func (client JavaManagementServiceClient) listJreUsage(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/ListJreUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "ListJreUsage", apiReferenceLink) return response, err } @@ -2797,7 +2797,7 @@ func (client JavaManagementServiceClient) listPerformanceTuningAnalysisResults(c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/ListPerformanceTuningAnalysisResults" err = common.PostProcessServiceError(err, "JavaManagementService", "ListPerformanceTuningAnalysisResults", apiReferenceLink) return response, err } @@ -2855,7 +2855,7 @@ func (client JavaManagementServiceClient) listWorkItems(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkItemSummary/ListWorkItems" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkItems", apiReferenceLink) return response, err } @@ -2913,7 +2913,7 @@ func (client JavaManagementServiceClient) listWorkRequestErrors(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestError/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -2971,7 +2971,7 @@ func (client JavaManagementServiceClient) listWorkRequestLogs(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestLogEntry/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -3029,7 +3029,7 @@ func (client JavaManagementServiceClient) listWorkRequests(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/ListWorkRequests" err = common.PostProcessServiceError(err, "JavaManagementService", "ListWorkRequests", apiReferenceLink) return response, err } @@ -3092,7 +3092,7 @@ func (client JavaManagementServiceClient) removeFleetInstallationSites(ctx conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/RemoveFleetInstallationSites" err = common.PostProcessServiceError(err, "JavaManagementService", "RemoveFleetInstallationSites", apiReferenceLink) return response, err } @@ -3150,7 +3150,7 @@ func (client JavaManagementServiceClient) requestCryptoAnalyses(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestCryptoAnalyses" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestCryptoAnalyses", apiReferenceLink) return response, err } @@ -3209,7 +3209,7 @@ func (client JavaManagementServiceClient) requestDeployedApplicationMigrationAna defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestDeployedApplicationMigrationAnalyses" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestDeployedApplicationMigrationAnalyses", apiReferenceLink) return response, err } @@ -3268,7 +3268,7 @@ func (client JavaManagementServiceClient) requestJavaMigrationAnalyses(ctx conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJavaMigrationAnalyses" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestJavaMigrationAnalyses", apiReferenceLink) return response, err } @@ -3326,7 +3326,7 @@ func (client JavaManagementServiceClient) requestJfrRecordings(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJfrRecordings" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestJfrRecordings", apiReferenceLink) return response, err } @@ -3385,7 +3385,7 @@ func (client JavaManagementServiceClient) requestPerformanceTuningAnalyses(ctx c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestPerformanceTuningAnalyses" err = common.PostProcessServiceError(err, "JavaManagementService", "RequestPerformanceTuningAnalyses", apiReferenceLink) return response, err } @@ -3448,7 +3448,7 @@ func (client JavaManagementServiceClient) scanJavaServerUsage(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/ScanJavaServerUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "ScanJavaServerUsage", apiReferenceLink) return response, err } @@ -3511,7 +3511,7 @@ func (client JavaManagementServiceClient) scanLibraryUsage(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/ScanLibraryUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "ScanLibraryUsage", apiReferenceLink) return response, err } @@ -3569,7 +3569,7 @@ func (client JavaManagementServiceClient) summarizeApplicationInstallationUsage( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationInstallationUsageSummary/SummarizeApplicationInstallationUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeApplicationInstallationUsage", apiReferenceLink) return response, err } @@ -3627,7 +3627,7 @@ func (client JavaManagementServiceClient) summarizeApplicationUsage(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationUsage/SummarizeApplicationUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeApplicationUsage", apiReferenceLink) return response, err } @@ -3685,7 +3685,7 @@ func (client JavaManagementServiceClient) summarizeDeployedApplicationInstallati defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationInstallationUsageSummary/SummarizeDeployedApplicationInstallationUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeDeployedApplicationInstallationUsage", apiReferenceLink) return response, err } @@ -3743,7 +3743,7 @@ func (client JavaManagementServiceClient) summarizeDeployedApplicationUsage(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationUsage/SummarizeDeployedApplicationUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeDeployedApplicationUsage", apiReferenceLink) return response, err } @@ -3801,7 +3801,7 @@ func (client JavaManagementServiceClient) summarizeInstallationUsage(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationUsage/SummarizeInstallationUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeInstallationUsage", apiReferenceLink) return response, err } @@ -3859,7 +3859,7 @@ func (client JavaManagementServiceClient) summarizeJavaServerInstanceUsage(ctx c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerInstanceUsage/SummarizeJavaServerInstanceUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeJavaServerInstanceUsage", apiReferenceLink) return response, err } @@ -3917,7 +3917,7 @@ func (client JavaManagementServiceClient) summarizeJavaServerUsage(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/SummarizeJavaServerUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeJavaServerUsage", apiReferenceLink) return response, err } @@ -3975,7 +3975,7 @@ func (client JavaManagementServiceClient) summarizeJreUsage(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/SummarizeJreUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeJreUsage", apiReferenceLink) return response, err } @@ -4033,7 +4033,7 @@ func (client JavaManagementServiceClient) summarizeLibraryUsage(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/SummarizeLibraryUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeLibraryUsage", apiReferenceLink) return response, err } @@ -4091,7 +4091,7 @@ func (client JavaManagementServiceClient) summarizeManagedInstanceUsage(ctx cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ManagedInstanceUsage/SummarizeManagedInstanceUsage" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeManagedInstanceUsage", apiReferenceLink) return response, err } @@ -4149,7 +4149,7 @@ func (client JavaManagementServiceClient) summarizeResourceInventory(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/SummarizeResourceInventory" err = common.PostProcessServiceError(err, "JavaManagementService", "SummarizeResourceInventory", apiReferenceLink) return response, err } @@ -4212,7 +4212,7 @@ func (client JavaManagementServiceClient) updateDrsFile(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateDrsFile" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateDrsFile", apiReferenceLink) return response, err } @@ -4270,7 +4270,7 @@ func (client JavaManagementServiceClient) updateExportSetting(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/UpdateExportSetting" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateExportSetting", apiReferenceLink) return response, err } @@ -4328,7 +4328,7 @@ func (client JavaManagementServiceClient) updateFleet(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateFleet" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateFleet", apiReferenceLink) return response, err } @@ -4392,7 +4392,7 @@ func (client JavaManagementServiceClient) updateFleetAdvancedFeatureConfiguratio defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/UpdateFleetAdvancedFeatureConfiguration" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateFleetAdvancedFeatureConfiguration", apiReferenceLink) return response, err } @@ -4450,7 +4450,7 @@ func (client JavaManagementServiceClient) updateFleetAgentConfiguration(ctx cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/UpdateFleetAgentConfiguration" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateFleetAgentConfiguration", apiReferenceLink) return response, err } @@ -4508,7 +4508,7 @@ func (client JavaManagementServiceClient) updateJmsPlugin(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JmsPlugin/UpdateJmsPlugin" err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateJmsPlugin", apiReferenceLink) return response, err } diff --git a/jmsjavadownloads/jmsjavadownloads_javadownload_client.go b/jmsjavadownloads/jmsjavadownloads_javadownload_client.go index ef37b027d6..8101d28b87 100644 --- a/jmsjavadownloads/jmsjavadownloads_javadownload_client.go +++ b/jmsjavadownloads/jmsjavadownloads_javadownload_client.go @@ -140,7 +140,7 @@ func (client JavaDownloadClient) cancelWorkRequest(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/WorkRequest/CancelWorkRequest" err = common.PostProcessServiceError(err, "JavaDownload", "CancelWorkRequest", apiReferenceLink) return response, err } @@ -204,7 +204,7 @@ func (client JavaDownloadClient) createJavaDownloadReport(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadReport/CreateJavaDownloadReport" err = common.PostProcessServiceError(err, "JavaDownload", "CreateJavaDownloadReport", apiReferenceLink) return response, err } @@ -268,7 +268,7 @@ func (client JavaDownloadClient) createJavaDownloadToken(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadToken/CreateJavaDownloadToken" err = common.PostProcessServiceError(err, "JavaDownload", "CreateJavaDownloadToken", apiReferenceLink) return response, err } @@ -331,7 +331,7 @@ func (client JavaDownloadClient) createJavaLicenseAcceptanceRecord(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaLicenseAcceptanceRecord/CreateJavaLicenseAcceptanceRecord" err = common.PostProcessServiceError(err, "JavaDownload", "CreateJavaLicenseAcceptanceRecord", apiReferenceLink) return response, err } @@ -389,7 +389,7 @@ func (client JavaDownloadClient) deleteJavaDownloadReport(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadReport/DeleteJavaDownloadReport" err = common.PostProcessServiceError(err, "JavaDownload", "DeleteJavaDownloadReport", apiReferenceLink) return response, err } @@ -447,7 +447,7 @@ func (client JavaDownloadClient) deleteJavaDownloadToken(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadToken/DeleteJavaDownloadToken" err = common.PostProcessServiceError(err, "JavaDownload", "DeleteJavaDownloadToken", apiReferenceLink) return response, err } @@ -505,7 +505,7 @@ func (client JavaDownloadClient) deleteJavaLicenseAcceptanceRecord(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaLicenseAcceptanceRecord/DeleteJavaLicenseAcceptanceRecord" err = common.PostProcessServiceError(err, "JavaDownload", "DeleteJavaLicenseAcceptanceRecord", apiReferenceLink) return response, err } @@ -567,7 +567,7 @@ func (client JavaDownloadClient) generateArtifactDownloadUrl(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/DownloadUrl/GenerateArtifactDownloadUrl" err = common.PostProcessServiceError(err, "JavaDownload", "GenerateArtifactDownloadUrl", apiReferenceLink) return response, err } @@ -625,7 +625,7 @@ func (client JavaDownloadClient) getJavaDownloadReport(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadReport/GetJavaDownloadReport" err = common.PostProcessServiceError(err, "JavaDownload", "GetJavaDownloadReport", apiReferenceLink) return response, err } @@ -682,7 +682,7 @@ func (client JavaDownloadClient) getJavaDownloadReportContent(ctx context.Contex httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadReport/GetJavaDownloadReportContent" err = common.PostProcessServiceError(err, "JavaDownload", "GetJavaDownloadReportContent", apiReferenceLink) return response, err } @@ -740,7 +740,7 @@ func (client JavaDownloadClient) getJavaDownloadToken(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadToken/GetJavaDownloadToken" err = common.PostProcessServiceError(err, "JavaDownload", "GetJavaDownloadToken", apiReferenceLink) return response, err } @@ -798,7 +798,7 @@ func (client JavaDownloadClient) getJavaLicense(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaLicense/GetJavaLicense" err = common.PostProcessServiceError(err, "JavaDownload", "GetJavaLicense", apiReferenceLink) return response, err } @@ -856,7 +856,7 @@ func (client JavaDownloadClient) getJavaLicenseAcceptanceRecord(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaLicenseAcceptanceRecord/GetJavaLicenseAcceptanceRecord" err = common.PostProcessServiceError(err, "JavaDownload", "GetJavaLicenseAcceptanceRecord", apiReferenceLink) return response, err } @@ -914,7 +914,7 @@ func (client JavaDownloadClient) getWorkRequest(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "JavaDownload", "GetWorkRequest", apiReferenceLink) return response, err } @@ -974,7 +974,7 @@ func (client JavaDownloadClient) listJavaDownloadRecords(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadRecord/ListJavaDownloadRecords" err = common.PostProcessServiceError(err, "JavaDownload", "ListJavaDownloadRecords", apiReferenceLink) return response, err } @@ -1032,7 +1032,7 @@ func (client JavaDownloadClient) listJavaDownloadReports(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadReport/ListJavaDownloadReports" err = common.PostProcessServiceError(err, "JavaDownload", "ListJavaDownloadReports", apiReferenceLink) return response, err } @@ -1090,7 +1090,7 @@ func (client JavaDownloadClient) listJavaDownloadTokens(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadToken/ListJavaDownloadTokens" err = common.PostProcessServiceError(err, "JavaDownload", "ListJavaDownloadTokens", apiReferenceLink) return response, err } @@ -1148,7 +1148,7 @@ func (client JavaDownloadClient) listJavaLicenseAcceptanceRecords(ctx context.Co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaLicenseAcceptanceRecord/ListJavaLicenseAcceptanceRecords" err = common.PostProcessServiceError(err, "JavaDownload", "ListJavaLicenseAcceptanceRecords", apiReferenceLink) return response, err } @@ -1206,7 +1206,7 @@ func (client JavaDownloadClient) listJavaLicenses(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaLicense/ListJavaLicenses" err = common.PostProcessServiceError(err, "JavaDownload", "ListJavaLicenses", apiReferenceLink) return response, err } @@ -1264,7 +1264,7 @@ func (client JavaDownloadClient) listWorkRequestErrors(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/WorkRequestError/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "JavaDownload", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -1322,7 +1322,7 @@ func (client JavaDownloadClient) listWorkRequestLogs(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/WorkRequestLogEntry/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "JavaDownload", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -1380,7 +1380,7 @@ func (client JavaDownloadClient) listWorkRequests(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/WorkRequest/ListWorkRequests" err = common.PostProcessServiceError(err, "JavaDownload", "ListWorkRequests", apiReferenceLink) return response, err } @@ -1438,7 +1438,7 @@ func (client JavaDownloadClient) requestSummarizedJavaDownloadCounts(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadCountAggregation/RequestSummarizedJavaDownloadCounts" err = common.PostProcessServiceError(err, "JavaDownload", "RequestSummarizedJavaDownloadCounts", apiReferenceLink) return response, err } @@ -1496,7 +1496,7 @@ func (client JavaDownloadClient) updateJavaDownloadToken(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaDownloadToken/UpdateJavaDownloadToken" err = common.PostProcessServiceError(err, "JavaDownload", "UpdateJavaDownloadToken", apiReferenceLink) return response, err } @@ -1554,7 +1554,7 @@ func (client JavaDownloadClient) updateJavaLicenseAcceptanceRecord(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/jms-java-download/20230601/JavaLicenseAcceptanceRecord/UpdateJavaLicenseAcceptanceRecord" err = common.PostProcessServiceError(err, "JavaDownload", "UpdateJavaLicenseAcceptanceRecord", apiReferenceLink) return response, err } diff --git a/mysql/create_db_system_details.go b/mysql/create_db_system_details.go index a9ef381543..c1799c3236 100644 --- a/mysql/create_db_system_details.go +++ b/mysql/create_db_system_details.go @@ -79,6 +79,8 @@ type CreateDbSystemDetails struct { // the log volume for the database will be scaled appropriately with its shape. DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + DataStorage *DataStorageDetails `mandatory:"false" json:"dataStorage"` + // The hostname for the primary endpoint of the DB System. Used for DNS. // The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) // (for example, "dbsystem-1" in FQDN "dbsystem-1.subnet123.vcn1.oraclevcn.com"). @@ -159,6 +161,7 @@ func (m *CreateDbSystemDetails) UnmarshalJSON(data []byte) (e error) { AdminUsername *string `json:"adminUsername"` AdminPassword *string `json:"adminPassword"` DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + DataStorage *DataStorageDetails `json:"dataStorage"` HostnameLabel *string `json:"hostnameLabel"` IpAddress *string `json:"ipAddress"` Port *int `json:"port"` @@ -202,6 +205,8 @@ func (m *CreateDbSystemDetails) UnmarshalJSON(data []byte) (e error) { m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + m.DataStorage = model.DataStorage + m.HostnameLabel = model.HostnameLabel m.IpAddress = model.IpAddress diff --git a/mysql/data_storage.go b/mysql/data_storage.go new file mode 100644 index 0000000000..4fd3c7b23a --- /dev/null +++ b/mysql/data_storage.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. + +// MySQL Database Service API +// +// The API for the MySQL Database Service +// + +package mysql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataStorage Data Storage information. +type DataStorage struct { + + // Enable/disable automatic storage expansion. When set to true, the DB System will automatically + // add storage incrementally up to the value specified in maxStorageSizeInGBs. + IsAutoExpandStorageEnabled *bool `mandatory:"false" json:"isAutoExpandStorageEnabled"` + + // Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + // is set to true, the DB System will add storage incrementally up to this value. + // DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + // DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + // DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + // DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + // It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + // than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + MaxStorageSizeInGBs *int `mandatory:"false" json:"maxStorageSizeInGBs"` + + // The actual allocated storage size for the DB System. This may be higher than dataStorageSizeInGBs + // if an automatic storage expansion has occurred. + AllocatedStorageSizeInGBs *int `mandatory:"false" json:"allocatedStorageSizeInGBs"` + + // User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + + // The absolute limit the DB System's storage size may ever expand to, either manually or automatically. + // This limit is based based on the initial dataStorageSizeInGBs when the DB System was first created. + // Both dataStorageSizeInGBs and maxDataStorageSizeInGBs can not exceed this value. + // DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + // DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + // DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + // DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + DataStorageSizeLimitInGBs *int `mandatory:"false" json:"dataStorageSizeLimitInGBs"` +} + +func (m DataStorage) 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 DataStorage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/mysql/data_storage_details.go b/mysql/data_storage_details.go new file mode 100644 index 0000000000..98920d15b3 --- /dev/null +++ b/mysql/data_storage_details.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. + +// MySQL Database Service API +// +// The API for the MySQL Database Service +// + +package mysql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataStorageDetails Data Storage configuration properties. +type DataStorageDetails struct { + + // Enable/disable automatic storage expansion. When set to true, the DB System will automatically + // add storage incrementally up to the value specified in maxStorageSizeInGBs. + IsAutoExpandStorageEnabled *bool `mandatory:"false" json:"isAutoExpandStorageEnabled"` + + // Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + // is set to true, the DB System will add storage incrementally up to this value. + // DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + // DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + // DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + // DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + // It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + // than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + MaxStorageSizeInGBs *int `mandatory:"false" json:"maxStorageSizeInGBs"` +} + +func (m DataStorageDetails) 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 DataStorageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/mysql/db_system.go b/mysql/db_system.go index 4ff0e57976..77fc678114 100644 --- a/mysql/db_system.go +++ b/mysql/db_system.go @@ -34,9 +34,12 @@ type DbSystem struct { // Name of the MySQL Version in use for the DB System. MysqlVersion *string `mandatory:"true" json:"mysqlVersion"` - // Initial size of the data volume in GiBs that will be created and attached. + // DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + // Replaced by dataStorage.dataStorageSizeInGBs. DataStorageSizeInGBs *int `mandatory:"true" json:"dataStorageSizeInGBs"` + DataStorage *DataStorage `mandatory:"true" json:"dataStorage"` + // The current state of the DB System. LifecycleState DbSystemLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` @@ -196,6 +199,7 @@ func (m *DbSystem) UnmarshalJSON(data []byte) (e error) { SubnetId *string `json:"subnetId"` MysqlVersion *string `json:"mysqlVersion"` DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + DataStorage *DataStorage `json:"dataStorage"` LifecycleState DbSystemLifecycleStateEnum `json:"lifecycleState"` Maintenance *MaintenanceDetails `json:"maintenance"` DeletionPolicy *DeletionPolicyDetails `json:"deletionPolicy"` @@ -276,6 +280,8 @@ func (m *DbSystem) UnmarshalJSON(data []byte) (e error) { m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + m.DataStorage = model.DataStorage + m.LifecycleState = model.LifecycleState m.Maintenance = model.Maintenance diff --git a/mysql/db_system_snapshot.go b/mysql/db_system_snapshot.go index ee4b0b05d8..3487e0e7c1 100644 --- a/mysql/db_system_snapshot.go +++ b/mysql/db_system_snapshot.go @@ -33,7 +33,8 @@ type DbSystemSnapshot struct { // Name of the MySQL Version in use for the DB System. MysqlVersion *string `mandatory:"true" json:"mysqlVersion"` - // Initial size of the data volume in GiBs that will be created and attached. + // DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + // Replaced by dataStorage.dataStorageSizeInGBs. DataStorageSizeInGBs *int `mandatory:"true" json:"dataStorageSizeInGBs"` Maintenance *MaintenanceDetails `mandatory:"true" json:"maintenance"` @@ -64,6 +65,8 @@ type DbSystemSnapshot struct { // The OCID of the Configuration to be used for Instances in this DB System. ConfigurationId *string `mandatory:"false" json:"configurationId"` + DataStorage *DataStorage `mandatory:"false" json:"dataStorage"` + // The hostname for the primary endpoint of the DB System. Used for DNS. // The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) // (for example, "dbsystem-1" in FQDN "dbsystem-1.subnet123.vcn1.oraclevcn.com"). diff --git a/mysql/update_db_system_details.go b/mysql/update_db_system_details.go index f4ade0f757..cc3ed64f91 100644 --- a/mysql/update_db_system_details.go +++ b/mysql/update_db_system_details.go @@ -82,6 +82,8 @@ type UpdateDbSystemDetails struct { // It is not possible to decrease data storage size. DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + DataStorage *DataStorageDetails `mandatory:"false" json:"dataStorage"` + // The hostname for the primary endpoint of the DB System. Used for DNS. // The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) // (for example, "dbsystem-1" in FQDN "dbsystem-1.subnet123.vcn1.oraclevcn.com"). diff --git a/redis/action_type.go b/redis/action_type.go index d0a68d7f6e..7a139cd3b2 100644 --- a/redis/action_type.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/change_redis_cluster_compartment_details.go b/redis/change_redis_cluster_compartment_details.go index 860d5e9f1f..7bf70b5c42 100644 --- a/redis/change_redis_cluster_compartment_details.go +++ b/redis/change_redis_cluster_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -19,7 +19,7 @@ import ( type ChangeRedisClusterCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment - // into which the Redis cluster should be moved. + // into which the cluster should be moved. CompartmentId *string `mandatory:"true" json:"compartmentId"` } diff --git a/redis/change_redis_cluster_compartment_request_response.go b/redis/change_redis_cluster_compartment_request_response.go index b870196ec2..744311af4c 100644 --- a/redis/change_redis_cluster_compartment_request_response.go +++ b/redis/change_redis_cluster_compartment_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/redis/ChangeRedisClusterCompartment.go.html to see an example of how to use ChangeRedisClusterCompartmentRequest. type ChangeRedisClusterCompartmentRequest struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. RedisClusterId *string `mandatory:"true" contributesTo:"path" name:"redisClusterId"` // The information to be updated. diff --git a/redis/create_redis_cluster_details.go b/redis/create_redis_cluster_details.go index 93c8838a58..3eed7d72c5 100644 --- a/redis/create_redis_cluster_details.go +++ b/redis/create_redis_cluster_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -15,30 +15,36 @@ import ( "strings" ) -// CreateRedisClusterDetails The configuration details for a new Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// CreateRedisClusterDetails The configuration details for a new OCI Cache cluster. An OCI Cache cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). type CreateRedisClusterDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"true" json:"displayName"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The number of nodes in the Redis cluster. + // The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. NodeCount *int `mandatory:"true" json:"nodeCount"` - // The Redis version that the cluster is running. + // The OCI Cache engine version that the cluster is running. SoftwareVersion RedisClusterSoftwareVersionEnum `mandatory:"true" json:"softwareVersion"` - // The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + // The amount of memory allocated to the cluster's nodes, in gigabytes. NodeMemoryInGBs *float32 `mandatory:"true" json:"nodeMemoryInGBs"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. SubnetId *string `mandatory:"true" json:"subnetId"` + // Specifies whether the cluster is sharded or non-sharded. + ClusterMode RedisClusterClusterModeEnum `mandatory:"false" json:"clusterMode,omitempty"` + + // The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + ShardCount *int `mandatory:"false" json:"shardCount"` + // A list of Network Security Group (NSG) OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) // associated with this cluster. For more information, - // see Using an NSG for Redis Clusters (https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup). + // see Using an NSG for Clusters (https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). NsgIds []string `mandatory:"false" json:"nsgIds"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. @@ -63,6 +69,9 @@ func (m CreateRedisClusterDetails) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SoftwareVersion: %s. Supported values are: %s.", m.SoftwareVersion, strings.Join(GetRedisClusterSoftwareVersionEnumStringValues(), ","))) } + if _, ok := GetMappingRedisClusterClusterModeEnum(string(m.ClusterMode)); !ok && m.ClusterMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterMode: %s. Supported values are: %s.", m.ClusterMode, strings.Join(GetRedisClusterClusterModeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/redis/create_redis_cluster_request_response.go b/redis/create_redis_cluster_request_response.go index 56428d8320..2ae2c0f9f1 100644 --- a/redis/create_redis_cluster_request_response.go +++ b/redis/create_redis_cluster_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/redis/CreateRedisCluster.go.html to see an example of how to use CreateRedisClusterRequest. type CreateRedisClusterRequest struct { - // Details for the new RedisCluster. + // Details for the new cluster. CreateRedisClusterDetails `contributesTo:"body"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/redis/delete_redis_cluster_request_response.go b/redis/delete_redis_cluster_request_response.go index ceef4a4085..410387e7db 100644 --- a/redis/delete_redis_cluster_request_response.go +++ b/redis/delete_redis_cluster_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/redis/DeleteRedisCluster.go.html to see an example of how to use DeleteRedisClusterRequest. type DeleteRedisClusterRequest struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. RedisClusterId *string `mandatory:"true" contributesTo:"path" name:"redisClusterId"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/redis/get_redis_cluster_request_response.go b/redis/get_redis_cluster_request_response.go index 63b481fd45..742e720fe6 100644 --- a/redis/get_redis_cluster_request_response.go +++ b/redis/get_redis_cluster_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/redis/GetRedisCluster.go.html to see an example of how to use GetRedisClusterRequest. type GetRedisClusterRequest struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. RedisClusterId *string `mandatory:"true" contributesTo:"path" name:"redisClusterId"` // The client request ID for tracing. diff --git a/redis/list_redis_cluster_nodes_request_response.go b/redis/list_redis_cluster_nodes_request_response.go new file mode 100644 index 0000000000..76a414e8d9 --- /dev/null +++ b/redis/list_redis_cluster_nodes_request_response.go @@ -0,0 +1,200 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 redis + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRedisClusterNodesRequest wrapper for the ListRedisClusterNodes operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/redis/ListRedisClusterNodes.go.html to see an example of how to use ListRedisClusterNodesRequest. +type ListRedisClusterNodesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. + RedisClusterId *string `mandatory:"true" contributesTo:"path" name:"redisClusterId"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListRedisClusterNodesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListRedisClusterNodesSortByEnum `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 ListRedisClusterNodesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRedisClusterNodesRequest) 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 ListRedisClusterNodesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRedisClusterNodesRequest) 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 ListRedisClusterNodesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListRedisClusterNodesSortOrderEnum(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(GetListRedisClusterNodesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListRedisClusterNodesSortByEnum(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(GetListRedisClusterNodesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRedisClusterNodesResponse wrapper for the ListRedisClusterNodes operation +type ListRedisClusterNodesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RedisNodeCollection instances + RedisNodeCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListRedisClusterNodesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRedisClusterNodesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListRedisClusterNodesSortOrderEnum Enum with underlying type: string +type ListRedisClusterNodesSortOrderEnum string + +// Set of constants representing the allowable values for ListRedisClusterNodesSortOrderEnum +const ( + ListRedisClusterNodesSortOrderAsc ListRedisClusterNodesSortOrderEnum = "ASC" + ListRedisClusterNodesSortOrderDesc ListRedisClusterNodesSortOrderEnum = "DESC" +) + +var mappingListRedisClusterNodesSortOrderEnum = map[string]ListRedisClusterNodesSortOrderEnum{ + "ASC": ListRedisClusterNodesSortOrderAsc, + "DESC": ListRedisClusterNodesSortOrderDesc, +} + +var mappingListRedisClusterNodesSortOrderEnumLowerCase = map[string]ListRedisClusterNodesSortOrderEnum{ + "asc": ListRedisClusterNodesSortOrderAsc, + "desc": ListRedisClusterNodesSortOrderDesc, +} + +// GetListRedisClusterNodesSortOrderEnumValues Enumerates the set of values for ListRedisClusterNodesSortOrderEnum +func GetListRedisClusterNodesSortOrderEnumValues() []ListRedisClusterNodesSortOrderEnum { + values := make([]ListRedisClusterNodesSortOrderEnum, 0) + for _, v := range mappingListRedisClusterNodesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListRedisClusterNodesSortOrderEnumStringValues Enumerates the set of values in String for ListRedisClusterNodesSortOrderEnum +func GetListRedisClusterNodesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListRedisClusterNodesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRedisClusterNodesSortOrderEnum(val string) (ListRedisClusterNodesSortOrderEnum, bool) { + enum, ok := mappingListRedisClusterNodesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRedisClusterNodesSortByEnum Enum with underlying type: string +type ListRedisClusterNodesSortByEnum string + +// Set of constants representing the allowable values for ListRedisClusterNodesSortByEnum +const ( + ListRedisClusterNodesSortByTimecreated ListRedisClusterNodesSortByEnum = "timeCreated" + ListRedisClusterNodesSortByDisplayname ListRedisClusterNodesSortByEnum = "displayName" +) + +var mappingListRedisClusterNodesSortByEnum = map[string]ListRedisClusterNodesSortByEnum{ + "timeCreated": ListRedisClusterNodesSortByTimecreated, + "displayName": ListRedisClusterNodesSortByDisplayname, +} + +var mappingListRedisClusterNodesSortByEnumLowerCase = map[string]ListRedisClusterNodesSortByEnum{ + "timecreated": ListRedisClusterNodesSortByTimecreated, + "displayname": ListRedisClusterNodesSortByDisplayname, +} + +// GetListRedisClusterNodesSortByEnumValues Enumerates the set of values for ListRedisClusterNodesSortByEnum +func GetListRedisClusterNodesSortByEnumValues() []ListRedisClusterNodesSortByEnum { + values := make([]ListRedisClusterNodesSortByEnum, 0) + for _, v := range mappingListRedisClusterNodesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListRedisClusterNodesSortByEnumStringValues Enumerates the set of values in String for ListRedisClusterNodesSortByEnum +func GetListRedisClusterNodesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListRedisClusterNodesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRedisClusterNodesSortByEnum(val string) (ListRedisClusterNodesSortByEnum, bool) { + enum, ok := mappingListRedisClusterNodesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/redis/list_redis_clusters_request_response.go b/redis/list_redis_clusters_request_response.go index 50e4a92840..7a74512214 100644 --- a/redis/list_redis_clusters_request_response.go +++ b/redis/list_redis_clusters_request_response.go @@ -27,7 +27,7 @@ type ListRedisClustersRequest struct { // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. Id *string `mandatory:"false" contributesTo:"query" name:"id"` // The maximum number of items to return. diff --git a/redis/node.go b/redis/node.go index a86900770c..646e8f0078 100644 --- a/redis/node.go +++ b/redis/node.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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -15,7 +15,7 @@ import ( "strings" ) -// Node The details of each node in the Redis cluster. +// Node The details of each node in the cluster. type Node struct { // The fully qualified domain name (FQDN) of the API endpoint to access a specific node. @@ -24,7 +24,7 @@ type Node struct { // The private IP address of the API endpoint to access a specific node. PrivateEndpointIpAddress *string `mandatory:"true" json:"privateEndpointIpAddress"` - // A user-friendly name of a Redis cluster node. + // A user-friendly name of a cluster node. DisplayName *string `mandatory:"true" json:"displayName"` } diff --git a/redis/node_collection.go b/redis/node_collection.go index a35ae8e5be..cabf2a7d74 100644 --- a/redis/node_collection.go +++ b/redis/node_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -15,7 +15,7 @@ import ( "strings" ) -// NodeCollection The collection of Redis cluster nodes. +// NodeCollection The collection of cluster nodes. type NodeCollection struct { // Collection of node objects. diff --git a/redis/node_summary.go b/redis/node_summary.go new file mode 100644 index 0000000000..e25467c441 --- /dev/null +++ b/redis/node_summary.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. + +// OCI Cache API +// +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). +// + +package redis + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeSummary The details of each node in the cluster. +type NodeSummary struct { + + // The fully qualified domain name (FQDN) of the API endpoint to access a specific node. + PrivateEndpointFqdn *string `mandatory:"true" json:"privateEndpointFqdn"` + + // The private IP address of the API endpoint to access a specific node. + PrivateEndpointIpAddress *string `mandatory:"true" json:"privateEndpointIpAddress"` + + // A user-friendly name of a cluster node. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the cluster + RedisClusterId *string `mandatory:"true" json:"redisClusterId"` + + // The shard number to which the node belongs to. + ShardNumber *int `mandatory:"false" json:"shardNumber"` +} + +func (m NodeSummary) 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 NodeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/redis/operation_status.go b/redis/operation_status.go index f7b0a3ebe7..b15b7cad75 100644 --- a/redis/operation_status.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/operation_type.go b/redis/operation_type.go index 82dedba518..31fd8ffd0a 100644 --- a/redis/operation_type.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/redis_cluster.go b/redis/redis_cluster.go index fa3311b506..78a31a95ca 100644 --- a/redis/redis_cluster.go +++ b/redis/redis_cluster.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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -15,59 +15,65 @@ import ( "strings" ) -// RedisCluster A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// RedisCluster An OCI Cache cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). type RedisCluster struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. Id *string `mandatory:"true" json:"id"` // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"true" json:"displayName"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The number of nodes in the Redis cluster. + // The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. NodeCount *int `mandatory:"true" json:"nodeCount"` - // The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + // The amount of memory allocated to the cluster's nodes, in gigabytes. NodeMemoryInGBs *float32 `mandatory:"true" json:"nodeMemoryInGBs"` - // The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + // The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. PrimaryFqdn *string `mandatory:"true" json:"primaryFqdn"` - // The private IP address of the API endpoint for the Redis cluster's primary node. + // The private IP address of the API endpoint for the cluster's primary node. PrimaryEndpointIpAddress *string `mandatory:"true" json:"primaryEndpointIpAddress"` - // The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + // The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. ReplicasFqdn *string `mandatory:"true" json:"replicasFqdn"` - // The private IP address of the API endpoint for the Redis cluster's replica nodes. + // The private IP address of the API endpoint for the cluster's replica nodes. ReplicasEndpointIpAddress *string `mandatory:"true" json:"replicasEndpointIpAddress"` - // The Redis version that the cluster is running. + // The OCI Cache engine version that the cluster is running. SoftwareVersion RedisClusterSoftwareVersionEnum `mandatory:"true" json:"softwareVersion"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. SubnetId *string `mandatory:"true" json:"subnetId"` NodeCollection *NodeCollection `mandatory:"true" json:"nodeCollection"` - // The current state of the Redis cluster. + // The current state of the cluster. LifecycleState RedisClusterLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` // A message describing the current state in more detail. For example, the message might provide actionable information for a resource in `FAILED` state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // The date and time the Redis cluster was created. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + // The date and time the cluster was created. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - // The date and time the Redis cluster was updated. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + // The date and time the cluster was updated. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // Specifies whether the cluster is sharded or non-sharded. + ClusterMode RedisClusterClusterModeEnum `mandatory:"false" json:"clusterMode,omitempty"` + + // The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + ShardCount *int `mandatory:"false" json:"shardCount"` + // A list of Network Security Group (NSG) OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) // associated with this cluster. For more information, - // see Using an NSG for Redis Clusters (https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup). + // see Using an NSG for Clusters (https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). NsgIds []string `mandatory:"false" json:"nsgIds"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. @@ -99,6 +105,9 @@ func (m RedisCluster) ValidateEnumValue() (bool, error) { if _, ok := GetMappingRedisClusterLifecycleStateEnum(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(GetRedisClusterLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingRedisClusterClusterModeEnum(string(m.ClusterMode)); !ok && m.ClusterMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterMode: %s. Supported values are: %s.", m.ClusterMode, strings.Join(GetRedisClusterClusterModeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -204,3 +213,45 @@ func GetMappingRedisClusterSoftwareVersionEnum(val string) (RedisClusterSoftware enum, ok := mappingRedisClusterSoftwareVersionEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// RedisClusterClusterModeEnum Enum with underlying type: string +type RedisClusterClusterModeEnum string + +// Set of constants representing the allowable values for RedisClusterClusterModeEnum +const ( + RedisClusterClusterModeSharded RedisClusterClusterModeEnum = "SHARDED" + RedisClusterClusterModeNonsharded RedisClusterClusterModeEnum = "NONSHARDED" +) + +var mappingRedisClusterClusterModeEnum = map[string]RedisClusterClusterModeEnum{ + "SHARDED": RedisClusterClusterModeSharded, + "NONSHARDED": RedisClusterClusterModeNonsharded, +} + +var mappingRedisClusterClusterModeEnumLowerCase = map[string]RedisClusterClusterModeEnum{ + "sharded": RedisClusterClusterModeSharded, + "nonsharded": RedisClusterClusterModeNonsharded, +} + +// GetRedisClusterClusterModeEnumValues Enumerates the set of values for RedisClusterClusterModeEnum +func GetRedisClusterClusterModeEnumValues() []RedisClusterClusterModeEnum { + values := make([]RedisClusterClusterModeEnum, 0) + for _, v := range mappingRedisClusterClusterModeEnum { + values = append(values, v) + } + return values +} + +// GetRedisClusterClusterModeEnumStringValues Enumerates the set of values in String for RedisClusterClusterModeEnum +func GetRedisClusterClusterModeEnumStringValues() []string { + return []string{ + "SHARDED", + "NONSHARDED", + } +} + +// GetMappingRedisClusterClusterModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRedisClusterClusterModeEnum(val string) (RedisClusterClusterModeEnum, bool) { + enum, ok := mappingRedisClusterClusterModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/redis/redis_cluster_collection.go b/redis/redis_cluster_collection.go index 10797f4369..e1ee7b266a 100644 --- a/redis/redis_cluster_collection.go +++ b/redis/redis_cluster_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -15,10 +15,10 @@ import ( "strings" ) -// RedisClusterCollection A list of Redis clusters that match filter criteria, if any. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// RedisClusterCollection A list of clusters that match filter criteria, if any. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). type RedisClusterCollection struct { - // The list of Redis clusters. + // The list of clusters. Items []RedisClusterSummary `mandatory:"true" json:"items"` } diff --git a/redis/redis_cluster_summary.go b/redis/redis_cluster_summary.go index cd1f68bb6a..40e13ac96f 100644 --- a/redis/redis_cluster_summary.go +++ b/redis/redis_cluster_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -15,57 +15,63 @@ import ( "strings" ) -// RedisClusterSummary Summary of information about a Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// RedisClusterSummary Summary of information about a cluster. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). type RedisClusterSummary struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. Id *string `mandatory:"true" json:"id"` // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"true" json:"displayName"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The number of nodes in the Redis cluster. + // The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. NodeCount *int `mandatory:"true" json:"nodeCount"` - // The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + // The amount of memory allocated to the cluster's nodes, in gigabytes. NodeMemoryInGBs *float32 `mandatory:"true" json:"nodeMemoryInGBs"` - // The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + // The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. PrimaryFqdn *string `mandatory:"true" json:"primaryFqdn"` - // The private IP address of the API endpoint for the Redis cluster's primary node. + // The private IP address of the API endpoint for the cluster's primary node. PrimaryEndpointIpAddress *string `mandatory:"true" json:"primaryEndpointIpAddress"` - // The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + // The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. ReplicasFqdn *string `mandatory:"true" json:"replicasFqdn"` - // The private IP address of the API endpoint for the Redis cluster's replica nodes. + // The private IP address of the API endpoint for the cluster's replica nodes. ReplicasEndpointIpAddress *string `mandatory:"true" json:"replicasEndpointIpAddress"` - // The Redis version that the cluster is running. + // The OCI Cache engine version that the cluster is running. SoftwareVersion RedisClusterSoftwareVersionEnum `mandatory:"true" json:"softwareVersion"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. SubnetId *string `mandatory:"true" json:"subnetId"` - // The current state of the Redis cluster. + // The current state of the cluster. LifecycleState RedisClusterLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` // A message describing the current state in more detail. For example, the message might provide actionable information for a resource in `FAILED` state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // The date and time the Redis cluster was created. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + // The date and time the cluster was created. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - // The date and time the Redis cluster was updated. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + // The date and time the cluster was updated. An RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // Specifies whether the cluster is sharded or non-sharded. + ClusterMode RedisClusterClusterModeEnum `mandatory:"false" json:"clusterMode,omitempty"` + + // The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + ShardCount *int `mandatory:"false" json:"shardCount"` + // A list of Network Security Group (NSG) OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) // associated with this cluster. For more information, - // see Using an NSG for Redis Clusters (https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup). + // see Using an NSG for Clusters (https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). NsgIds []string `mandatory:"false" json:"nsgIds"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. @@ -97,6 +103,9 @@ func (m RedisClusterSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingRedisClusterLifecycleStateEnum(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(GetRedisClusterLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingRedisClusterClusterModeEnum(string(m.ClusterMode)); !ok && m.ClusterMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterMode: %s. Supported values are: %s.", m.ClusterMode, strings.Join(GetRedisClusterClusterModeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/redis/redis_node_collection.go b/redis/redis_node_collection.go new file mode 100644 index 0000000000..174d703787 --- /dev/null +++ b/redis/redis_node_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. + +// OCI Cache API +// +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). +// + +package redis + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RedisNodeCollection A list of nodes in a cluster that match filter criteria, if any. +type RedisNodeCollection struct { + + // The list of nodes in a cluster. + Items []NodeSummary `mandatory:"true" json:"items"` +} + +func (m RedisNodeCollection) 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 RedisNodeCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/redis/redis_rediscluster_client.go b/redis/redis_rediscluster_client.go index 747821af12..04728851f5 100644 --- a/redis/redis_rediscluster_client.go +++ b/redis/redis_rediscluster_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -140,7 +140,7 @@ func (client RedisClusterClient) cancelWorkRequest(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/CancelWorkRequest" err = common.PostProcessServiceError(err, "RedisCluster", "CancelWorkRequest", apiReferenceLink) return response, err } @@ -149,7 +149,7 @@ func (client RedisClusterClient) cancelWorkRequest(ctx context.Context, request return response, err } -// ChangeRedisClusterCompartment Moves a Redis cluster into a different compartment within the same tenancy. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// ChangeRedisClusterCompartment Moves an OCI Cache cluster into a different compartment within the same tenancy. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // // # See also // @@ -203,7 +203,7 @@ func (client RedisClusterClient) changeRedisClusterCompartment(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/ChangeRedisClusterCompartment" err = common.PostProcessServiceError(err, "RedisCluster", "ChangeRedisClusterCompartment", apiReferenceLink) return response, err } @@ -212,7 +212,7 @@ func (client RedisClusterClient) changeRedisClusterCompartment(ctx context.Conte return response, err } -// CreateRedisCluster Creates a new Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// CreateRedisCluster Creates a new OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // // # See also // @@ -266,7 +266,7 @@ func (client RedisClusterClient) createRedisCluster(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/CreateRedisCluster" err = common.PostProcessServiceError(err, "RedisCluster", "CreateRedisCluster", apiReferenceLink) return response, err } @@ -275,7 +275,7 @@ func (client RedisClusterClient) createRedisCluster(ctx context.Context, request return response, err } -// DeleteRedisCluster Deletes the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// DeleteRedisCluster Deletes the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // // # See also // @@ -324,7 +324,7 @@ func (client RedisClusterClient) deleteRedisCluster(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/DeleteRedisCluster" err = common.PostProcessServiceError(err, "RedisCluster", "DeleteRedisCluster", apiReferenceLink) return response, err } @@ -333,7 +333,7 @@ func (client RedisClusterClient) deleteRedisCluster(ctx context.Context, request return response, err } -// GetRedisCluster Retrieves the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// GetRedisCluster Retrieves the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // // # See also // @@ -382,7 +382,7 @@ func (client RedisClusterClient) getRedisCluster(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/GetRedisCluster" err = common.PostProcessServiceError(err, "RedisCluster", "GetRedisCluster", apiReferenceLink) return response, err } @@ -440,7 +440,7 @@ func (client RedisClusterClient) getWorkRequest(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "RedisCluster", "GetWorkRequest", apiReferenceLink) return response, err } @@ -449,7 +449,65 @@ func (client RedisClusterClient) getWorkRequest(ctx context.Context, request com return response, err } -// ListRedisClusters Lists the Redis clusters in the specified compartment. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// ListRedisClusterNodes Gets the list of all nodes in a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/redis/ListRedisClusterNodes.go.html to see an example of how to use ListRedisClusterNodes API. +// A default retry strategy applies to this operation ListRedisClusterNodes() +func (client RedisClusterClient) ListRedisClusterNodes(ctx context.Context, request ListRedisClusterNodesRequest) (response ListRedisClusterNodesResponse, 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.listRedisClusterNodes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListRedisClusterNodesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListRedisClusterNodesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListRedisClusterNodesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRedisClusterNodesResponse") + } + return +} + +// listRedisClusterNodes implements the OCIOperation interface (enables retrying operations) +func (client RedisClusterClient) listRedisClusterNodes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/redisClusters/{redisClusterId}/nodes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListRedisClusterNodesResponse + 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/ocicache/20220315/NodeSummary/ListRedisClusterNodes" + err = common.PostProcessServiceError(err, "RedisCluster", "ListRedisClusterNodes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRedisClusters Lists the OCI Cache clusters in the specified compartment. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // // # See also // @@ -498,7 +556,7 @@ func (client RedisClusterClient) listRedisClusters(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisClusterSummary/ListRedisClusters" err = common.PostProcessServiceError(err, "RedisCluster", "ListRedisClusters", apiReferenceLink) return response, err } @@ -556,7 +614,7 @@ func (client RedisClusterClient) listWorkRequestErrors(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequestError/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "RedisCluster", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -614,7 +672,7 @@ func (client RedisClusterClient) listWorkRequestLogs(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequestLogEntry/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "RedisCluster", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -672,7 +730,7 @@ func (client RedisClusterClient) listWorkRequests(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/ListWorkRequests" err = common.PostProcessServiceError(err, "RedisCluster", "ListWorkRequests", apiReferenceLink) return response, err } @@ -681,7 +739,7 @@ func (client RedisClusterClient) listWorkRequests(ctx context.Context, request c return response, err } -// UpdateRedisCluster Updates the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// UpdateRedisCluster Updates the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // // # See also // @@ -730,7 +788,7 @@ func (client RedisClusterClient) updateRedisCluster(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/UpdateRedisCluster" err = common.PostProcessServiceError(err, "RedisCluster", "UpdateRedisCluster", apiReferenceLink) return response, err } diff --git a/redis/sort_order.go b/redis/sort_order.go index 0285ac5581..fbfba64580 100644 --- a/redis/sort_order.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/update_redis_cluster_details.go b/redis/update_redis_cluster_details.go index 6dad16f138..e275e50099 100644 --- a/redis/update_redis_cluster_details.go +++ b/redis/update_redis_cluster_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis @@ -15,21 +15,24 @@ import ( "strings" ) -// UpdateRedisClusterDetails The configuration to update for an existing Redis cluster. +// UpdateRedisClusterDetails The configuration to update for an existing cluster. type UpdateRedisClusterDetails struct { + // The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + ShardCount *int `mandatory:"false" json:"shardCount"` + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` - // The number of nodes in the Redis cluster. + // The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. NodeCount *int `mandatory:"false" json:"nodeCount"` - // The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + // The amount of memory allocated to the cluster's nodes, in gigabytes. NodeMemoryInGBs *float32 `mandatory:"false" json:"nodeMemoryInGBs"` // A list of Network Security Group (NSG) OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) // associated with this cluster. For more information, - // see Using an NSG for Redis Clusters (https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup). + // see Using an NSG for Clusters (https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). NsgIds []string `mandatory:"false" json:"nsgIds"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/redis/update_redis_cluster_request_response.go b/redis/update_redis_cluster_request_response.go index 463bc8e53e..7a48760ec8 100644 --- a/redis/update_redis_cluster_request_response.go +++ b/redis/update_redis_cluster_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/redis/UpdateRedisCluster.go.html to see an example of how to use UpdateRedisClusterRequest. type UpdateRedisClusterRequest struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. RedisClusterId *string `mandatory:"true" contributesTo:"path" name:"redisClusterId"` // The information to be updated. diff --git a/redis/work_request.go b/redis/work_request.go index 837d1f0f25..a2a9155972 100644 --- a/redis/work_request.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/work_request_error.go b/redis/work_request_error.go index cf8e06e7a0..e57ea286ec 100644 --- a/redis/work_request_error.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/work_request_error_collection.go b/redis/work_request_error_collection.go index 3dab85983b..c4f3ebe215 100644 --- a/redis/work_request_error_collection.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/work_request_log_entry.go b/redis/work_request_log_entry.go index 4da415a571..7939332943 100644 --- a/redis/work_request_log_entry.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/work_request_log_entry_collection.go b/redis/work_request_log_entry_collection.go index 52bdb45117..acf1fad0ee 100644 --- a/redis/work_request_log_entry_collection.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/work_request_resource.go b/redis/work_request_resource.go index 89f0811a55..2a06a3b7d0 100644 --- a/redis/work_request_resource.go +++ b/redis/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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/work_request_summary.go b/redis/work_request_summary.go index ef0214bde5..41392935cf 100644 --- a/redis/work_request_summary.go +++ b/redis/work_request_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis diff --git a/redis/work_request_summary_collection.go b/redis/work_request_summary_collection.go index f6f26dcd68..24663f4e23 100644 --- a/redis/work_request_summary_collection.go +++ b/redis/work_request_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. -// Redis Service API +// OCI Cache API // -// Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see OCI Caching Service with Redis (https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). +// Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see OCI Cache (https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). // package redis