From d4f3b61b50e4973a603eb3bc4986e5aeaec8cbf0 Mon Sep 17 00:00:00 2001 From: oci-dex-release-bot Date: Mon, 6 Nov 2023 19:36:56 +0000 Subject: [PATCH] Releasing version 65 52 1 --- CHANGELOG.md | 11 + Makefile | 2 +- common/version.go | 2 +- database/autonomous_container_database.go | 82 +- .../autonomous_container_database_summary.go | 82 +- database/configure_saas_admin_user_details.go | 106 ++ ...figure_saas_admin_user_request_response.go | 104 ++ ..._database_dataguard_association_details.go | 108 ++ ..._dataguard_association_request_response.go | 107 ++ database/database_client.go | 182 ++ .../database_connection_string_profile.go | 3 + ...rate_autonomous_database_wallet_details.go | 3 + database/saas_admin_user_configuration.go | 106 ++ database/saas_admin_user_status.go | 94 + ...saas_admin_user_status_request_response.go | 93 + jms/agent.go | 57 + jms/agent_type.go | 56 + jms/announcement_summary.go | 2 +- jms/create_drs_file_details.go | 45 + jms/create_drs_file_request_response.go | 108 ++ jms/delete_drs_file_request_response.go | 101 ++ jms/disable_drs_details.go | 38 + jms/disable_drs_request_response.go | 108 ++ jms/drs_file.go | 100 ++ jms/drs_file_collection.go | 39 + jms/drs_file_sort_by.go | 72 + jms/drs_file_status.go | 64 + jms/drs_file_summary.go | 100 ++ jms/drs_target.go | 39 + jms/enable_drs_details.go | 38 + jms/enable_drs_request_response.go | 108 ++ jms/export_duration.go | 60 + jms/export_frequency.go | 60 + jms/export_resources.go | 60 + jms/export_run_status.go | 72 + jms/export_setting.go | 81 + jms/export_status.go | 51 + jms/fleet.go | 3 + jms/fleet_agent_configuration.go | 2 + jms/fleet_summary.go | 3 + jms/get_drs_file_request_response.go | 99 ++ jms/get_export_setting_request_response.go | 93 + jms/get_export_status_request_response.go | 93 + jms/java_artifact.go | 28 + jms/java_family.go | 11 + jms/java_family_summary.go | 7 + jms/java_migration_analysis_result.go | 3 + jms/java_migration_analysis_result_summary.go | 3 + jms/java_release.go | 7 + jms/java_release_summary.go | 7 + jms/jms_javamanagementservice_client.go | 600 +++++++ jms/lcm_work_item_details.go | 63 + jms/list_blocklists_request_response.go | 28 + jms/list_drs_files_request_response.go | 215 +++ jms/list_java_families_request_response.go | 3 + jms/list_work_requests_request_response.go | 3 + jms/manage_drs_details.go | 40 + jms/managed_instance_usage.go | 8 + jms/operation_type.go | 28 + jms/patch_detail.go | 42 + jms/performance_tuning_analysis.go | 2 +- jms/plugin.go | 42 + jms/request_crypto_analyses_details.go | 4 +- jms/update_drs_file_details.go | 45 + jms/update_drs_file_request_response.go | 111 ++ jms/update_export_setting_details.go | 69 + jms/update_export_setting_request_response.go | 103 ++ ...pdate_fleet_agent_configuration_details.go | 2 + jms/work_item_details.go | 8 + jms/work_item_type.go | 68 +- jmsjavadownloads/action_type.go | 72 + jmsjavadownloads/aggregation_sort_by.go | 56 + .../cancel_work_request_request_response.go | 94 + jmsjavadownloads/checksum_type.go | 52 + .../create_java_download_report_details.go | 64 + ...e_java_download_report_request_response.go | 97 + .../create_java_download_token_details.go | 65 + ...te_java_download_token_request_response.go | 103 ++ ..._java_license_acceptance_record_details.go | 51 + ...ense_acceptance_record_request_response.go | 100 ++ ...e_java_download_report_request_response.go | 97 + ...te_java_download_token_request_response.go | 97 + ...ense_acceptance_record_request_response.go | 94 + jmsjavadownloads/download_url.go | 45 + jmsjavadownloads/download_url_type.go | 56 + .../generate_artifact_download_url_details.go | 39 + ..._artifact_download_url_request_response.go | 90 + ...ownload_report_content_request_response.go | 94 + ...t_java_download_report_request_response.go | 93 + ...et_java_download_token_request_response.go | 93 + ...ense_acceptance_record_request_response.go | 93 + .../get_java_license_request_response.go | 139 ++ .../get_work_request_request_response.go | 96 + .../java_download_count_aggregation.go | 60 + ...a_download_count_aggregation_collection.go | 45 + .../java_download_count_aggregation_type.go | 60 + jmsjavadownloads/java_download_record.go | 66 + .../java_download_record_collection.go | 39 + .../java_download_record_sort_by.go | 60 + .../java_download_record_summary.go | 66 + jmsjavadownloads/java_download_report.go | 89 + .../java_download_report_collection.go | 39 + .../java_download_report_format.go | 52 + .../java_download_report_sort_by.go | 56 + .../java_download_report_summary.go | 88 + jmsjavadownloads/java_download_token.go | 102 ++ .../java_download_token_collection.go | 39 + .../java_download_token_summary.go | 102 ++ jmsjavadownloads/java_license.go | 48 + .../java_license_acceptance_record.go | 84 + ...va_license_acceptance_record_collection.go | 39 + .../java_license_acceptance_record_summary.go | 84 + jmsjavadownloads/java_license_collection.go | 39 + jmsjavadownloads/java_license_summary.go | 48 + .../jmsjavadownloads_javadownload_client.go | 1563 +++++++++++++++++ .../license_acceptance_sort_by.go | 60 + jmsjavadownloads/license_acceptance_status.go | 56 + jmsjavadownloads/license_sort_by.go | 56 + jmsjavadownloads/license_type.go | 60 + jmsjavadownloads/lifecycle_state.go | 76 + ..._java_download_records_request_response.go | 222 +++ ..._java_download_reports_request_response.go | 271 +++ ...t_java_download_tokens_request_response.go | 294 ++++ ...nse_acceptance_records_request_response.go | 309 ++++ .../list_java_licenses_request_response.go | 249 +++ ...st_work_request_errors_request_response.go | 193 ++ ...list_work_request_logs_request_response.go | 193 ++ .../list_work_requests_request_response.go | 271 +++ jmsjavadownloads/operation_status.go | 80 + jmsjavadownloads/operation_type.go | 68 + jmsjavadownloads/principal.go | 45 + ...summarized_java_download_counts_details.go | 75 + ...d_java_download_counts_request_response.go | 95 + jmsjavadownloads/sort_order.go | 56 + jmsjavadownloads/token_lifecycle_details.go | 60 + jmsjavadownloads/token_sort_by.go | 68 + .../update_java_download_token_details.go | 59 + ...te_java_download_token_request_response.go | 100 ++ ..._java_license_acceptance_record_details.go | 42 + ...ense_acceptance_record_request_response.go | 103 ++ jmsjavadownloads/work_request.go | 71 + jmsjavadownloads/work_request_error.go | 46 + .../work_request_error_collection.go | 39 + jmsjavadownloads/work_request_log_entry.go | 42 + .../work_request_log_entry_collection.go | 39 + jmsjavadownloads/work_request_resource.go | 54 + jmsjavadownloads/work_request_summary.go | 71 + .../work_request_summary_collection.go | 39 + 148 files changed, 12589 insertions(+), 108 deletions(-) create mode 100644 database/configure_saas_admin_user_details.go create mode 100644 database/configure_saas_admin_user_request_response.go create mode 100644 database/create_autonomous_container_database_dataguard_association_details.go create mode 100644 database/create_autonomous_container_database_dataguard_association_request_response.go create mode 100644 database/saas_admin_user_configuration.go create mode 100644 database/saas_admin_user_status.go create mode 100644 database/saas_admin_user_status_request_response.go create mode 100644 jms/agent.go create mode 100644 jms/agent_type.go create mode 100644 jms/create_drs_file_details.go create mode 100644 jms/create_drs_file_request_response.go create mode 100644 jms/delete_drs_file_request_response.go create mode 100644 jms/disable_drs_details.go create mode 100644 jms/disable_drs_request_response.go create mode 100644 jms/drs_file.go create mode 100644 jms/drs_file_collection.go create mode 100644 jms/drs_file_sort_by.go create mode 100644 jms/drs_file_status.go create mode 100644 jms/drs_file_summary.go create mode 100644 jms/drs_target.go create mode 100644 jms/enable_drs_details.go create mode 100644 jms/enable_drs_request_response.go create mode 100644 jms/export_duration.go create mode 100644 jms/export_frequency.go create mode 100644 jms/export_resources.go create mode 100644 jms/export_run_status.go create mode 100644 jms/export_setting.go create mode 100644 jms/export_status.go create mode 100644 jms/get_drs_file_request_response.go create mode 100644 jms/get_export_setting_request_response.go create mode 100644 jms/get_export_status_request_response.go create mode 100644 jms/lcm_work_item_details.go create mode 100644 jms/list_drs_files_request_response.go create mode 100644 jms/manage_drs_details.go create mode 100644 jms/patch_detail.go create mode 100644 jms/plugin.go create mode 100644 jms/update_drs_file_details.go create mode 100644 jms/update_drs_file_request_response.go create mode 100644 jms/update_export_setting_details.go create mode 100644 jms/update_export_setting_request_response.go create mode 100644 jmsjavadownloads/action_type.go create mode 100644 jmsjavadownloads/aggregation_sort_by.go create mode 100644 jmsjavadownloads/cancel_work_request_request_response.go create mode 100644 jmsjavadownloads/checksum_type.go create mode 100644 jmsjavadownloads/create_java_download_report_details.go create mode 100644 jmsjavadownloads/create_java_download_report_request_response.go create mode 100644 jmsjavadownloads/create_java_download_token_details.go create mode 100644 jmsjavadownloads/create_java_download_token_request_response.go create mode 100644 jmsjavadownloads/create_java_license_acceptance_record_details.go create mode 100644 jmsjavadownloads/create_java_license_acceptance_record_request_response.go create mode 100644 jmsjavadownloads/delete_java_download_report_request_response.go create mode 100644 jmsjavadownloads/delete_java_download_token_request_response.go create mode 100644 jmsjavadownloads/delete_java_license_acceptance_record_request_response.go create mode 100644 jmsjavadownloads/download_url.go create mode 100644 jmsjavadownloads/download_url_type.go create mode 100644 jmsjavadownloads/generate_artifact_download_url_details.go create mode 100644 jmsjavadownloads/generate_artifact_download_url_request_response.go create mode 100644 jmsjavadownloads/get_java_download_report_content_request_response.go create mode 100644 jmsjavadownloads/get_java_download_report_request_response.go create mode 100644 jmsjavadownloads/get_java_download_token_request_response.go create mode 100644 jmsjavadownloads/get_java_license_acceptance_record_request_response.go create mode 100644 jmsjavadownloads/get_java_license_request_response.go create mode 100644 jmsjavadownloads/get_work_request_request_response.go create mode 100644 jmsjavadownloads/java_download_count_aggregation.go create mode 100644 jmsjavadownloads/java_download_count_aggregation_collection.go create mode 100644 jmsjavadownloads/java_download_count_aggregation_type.go create mode 100644 jmsjavadownloads/java_download_record.go create mode 100644 jmsjavadownloads/java_download_record_collection.go create mode 100644 jmsjavadownloads/java_download_record_sort_by.go create mode 100644 jmsjavadownloads/java_download_record_summary.go create mode 100644 jmsjavadownloads/java_download_report.go create mode 100644 jmsjavadownloads/java_download_report_collection.go create mode 100644 jmsjavadownloads/java_download_report_format.go create mode 100644 jmsjavadownloads/java_download_report_sort_by.go create mode 100644 jmsjavadownloads/java_download_report_summary.go create mode 100644 jmsjavadownloads/java_download_token.go create mode 100644 jmsjavadownloads/java_download_token_collection.go create mode 100644 jmsjavadownloads/java_download_token_summary.go create mode 100644 jmsjavadownloads/java_license.go create mode 100644 jmsjavadownloads/java_license_acceptance_record.go create mode 100644 jmsjavadownloads/java_license_acceptance_record_collection.go create mode 100644 jmsjavadownloads/java_license_acceptance_record_summary.go create mode 100644 jmsjavadownloads/java_license_collection.go create mode 100644 jmsjavadownloads/java_license_summary.go create mode 100644 jmsjavadownloads/jmsjavadownloads_javadownload_client.go create mode 100644 jmsjavadownloads/license_acceptance_sort_by.go create mode 100644 jmsjavadownloads/license_acceptance_status.go create mode 100644 jmsjavadownloads/license_sort_by.go create mode 100644 jmsjavadownloads/license_type.go create mode 100644 jmsjavadownloads/lifecycle_state.go create mode 100644 jmsjavadownloads/list_java_download_records_request_response.go create mode 100644 jmsjavadownloads/list_java_download_reports_request_response.go create mode 100644 jmsjavadownloads/list_java_download_tokens_request_response.go create mode 100644 jmsjavadownloads/list_java_license_acceptance_records_request_response.go create mode 100644 jmsjavadownloads/list_java_licenses_request_response.go create mode 100644 jmsjavadownloads/list_work_request_errors_request_response.go create mode 100644 jmsjavadownloads/list_work_request_logs_request_response.go create mode 100644 jmsjavadownloads/list_work_requests_request_response.go create mode 100644 jmsjavadownloads/operation_status.go create mode 100644 jmsjavadownloads/operation_type.go create mode 100644 jmsjavadownloads/principal.go create mode 100644 jmsjavadownloads/request_summarized_java_download_counts_details.go create mode 100644 jmsjavadownloads/request_summarized_java_download_counts_request_response.go create mode 100644 jmsjavadownloads/sort_order.go create mode 100644 jmsjavadownloads/token_lifecycle_details.go create mode 100644 jmsjavadownloads/token_sort_by.go create mode 100644 jmsjavadownloads/update_java_download_token_details.go create mode 100644 jmsjavadownloads/update_java_download_token_request_response.go create mode 100644 jmsjavadownloads/update_java_license_acceptance_record_details.go create mode 100644 jmsjavadownloads/update_java_license_acceptance_record_request_response.go create mode 100644 jmsjavadownloads/work_request.go create mode 100644 jmsjavadownloads/work_request_error.go create mode 100644 jmsjavadownloads/work_request_error_collection.go create mode 100644 jmsjavadownloads/work_request_log_entry.go create mode 100644 jmsjavadownloads/work_request_log_entry_collection.go create mode 100644 jmsjavadownloads/work_request_resource.go create mode 100644 jmsjavadownloads/work_request_summary.go create mode 100644 jmsjavadownloads/work_request_summary_collection.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 875af6c290..1402554701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.52.1 - 2023-11-07 +### Added +- Support for Java Management Service Downloads +- Support for creating autonomous dataguard associations in the Database service +- Support for SaaS administrative user configurations for autonomous database in the Database service +- Support for macOS in the the Java Management service +- Support for distribution and management of deployment rule sets in the Java Management service +- Support for new download location of Oracle Java runtime binaries in the Java Management service +- Support for exporting data across regions in the Java Management service + + ## 65.52.0 - 2023-10-31 ### Added - Support for calling Oracle Cloud Infrastructure services in the us-saltlake-2 region diff --git a/Makefile b/Makefile index c5d930ddb4..15addb5141 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 applicationmigration 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 ##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 applicationmigration 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 ##SPECNAME## NON_GEN_TARGETS = common common/auth objectstorage/transfer example TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS) diff --git a/common/version.go b/common/version.go index a30ea89c11..74c9113e39 100644 --- a/common/version.go +++ b/common/version.go @@ -13,7 +13,7 @@ import ( const ( major = "65" minor = "52" - patch = "0" + patch = "1" tag = "" ) diff --git a/database/autonomous_container_database.go b/database/autonomous_container_database.go index d309119c57..dadc1eda80 100644 --- a/database/autonomous_container_database.go +++ b/database/autonomous_container_database.go @@ -288,51 +288,54 @@ type AutonomousContainerDatabaseLifecycleStateEnum string // Set of constants representing the allowable values for AutonomousContainerDatabaseLifecycleStateEnum const ( - AutonomousContainerDatabaseLifecycleStateProvisioning AutonomousContainerDatabaseLifecycleStateEnum = "PROVISIONING" - AutonomousContainerDatabaseLifecycleStateAvailable AutonomousContainerDatabaseLifecycleStateEnum = "AVAILABLE" - AutonomousContainerDatabaseLifecycleStateUpdating AutonomousContainerDatabaseLifecycleStateEnum = "UPDATING" - AutonomousContainerDatabaseLifecycleStateTerminating AutonomousContainerDatabaseLifecycleStateEnum = "TERMINATING" - AutonomousContainerDatabaseLifecycleStateTerminated AutonomousContainerDatabaseLifecycleStateEnum = "TERMINATED" - AutonomousContainerDatabaseLifecycleStateFailed AutonomousContainerDatabaseLifecycleStateEnum = "FAILED" - AutonomousContainerDatabaseLifecycleStateBackupInProgress AutonomousContainerDatabaseLifecycleStateEnum = "BACKUP_IN_PROGRESS" - AutonomousContainerDatabaseLifecycleStateRestoring AutonomousContainerDatabaseLifecycleStateEnum = "RESTORING" - AutonomousContainerDatabaseLifecycleStateRestoreFailed AutonomousContainerDatabaseLifecycleStateEnum = "RESTORE_FAILED" - AutonomousContainerDatabaseLifecycleStateRestarting AutonomousContainerDatabaseLifecycleStateEnum = "RESTARTING" - AutonomousContainerDatabaseLifecycleStateMaintenanceInProgress AutonomousContainerDatabaseLifecycleStateEnum = "MAINTENANCE_IN_PROGRESS" - AutonomousContainerDatabaseLifecycleStateRoleChangeInProgress AutonomousContainerDatabaseLifecycleStateEnum = "ROLE_CHANGE_IN_PROGRESS" - AutonomousContainerDatabaseLifecycleStateUnavailable AutonomousContainerDatabaseLifecycleStateEnum = "UNAVAILABLE" + AutonomousContainerDatabaseLifecycleStateProvisioning AutonomousContainerDatabaseLifecycleStateEnum = "PROVISIONING" + AutonomousContainerDatabaseLifecycleStateAvailable AutonomousContainerDatabaseLifecycleStateEnum = "AVAILABLE" + AutonomousContainerDatabaseLifecycleStateUpdating AutonomousContainerDatabaseLifecycleStateEnum = "UPDATING" + AutonomousContainerDatabaseLifecycleStateTerminating AutonomousContainerDatabaseLifecycleStateEnum = "TERMINATING" + AutonomousContainerDatabaseLifecycleStateTerminated AutonomousContainerDatabaseLifecycleStateEnum = "TERMINATED" + AutonomousContainerDatabaseLifecycleStateFailed AutonomousContainerDatabaseLifecycleStateEnum = "FAILED" + AutonomousContainerDatabaseLifecycleStateBackupInProgress AutonomousContainerDatabaseLifecycleStateEnum = "BACKUP_IN_PROGRESS" + AutonomousContainerDatabaseLifecycleStateRestoring AutonomousContainerDatabaseLifecycleStateEnum = "RESTORING" + AutonomousContainerDatabaseLifecycleStateRestoreFailed AutonomousContainerDatabaseLifecycleStateEnum = "RESTORE_FAILED" + AutonomousContainerDatabaseLifecycleStateRestarting AutonomousContainerDatabaseLifecycleStateEnum = "RESTARTING" + AutonomousContainerDatabaseLifecycleStateMaintenanceInProgress AutonomousContainerDatabaseLifecycleStateEnum = "MAINTENANCE_IN_PROGRESS" + AutonomousContainerDatabaseLifecycleStateRoleChangeInProgress AutonomousContainerDatabaseLifecycleStateEnum = "ROLE_CHANGE_IN_PROGRESS" + AutonomousContainerDatabaseLifecycleStateEnablingAutonomousDataGuard AutonomousContainerDatabaseLifecycleStateEnum = "ENABLING_AUTONOMOUS_DATA_GUARD" + AutonomousContainerDatabaseLifecycleStateUnavailable AutonomousContainerDatabaseLifecycleStateEnum = "UNAVAILABLE" ) var mappingAutonomousContainerDatabaseLifecycleStateEnum = map[string]AutonomousContainerDatabaseLifecycleStateEnum{ - "PROVISIONING": AutonomousContainerDatabaseLifecycleStateProvisioning, - "AVAILABLE": AutonomousContainerDatabaseLifecycleStateAvailable, - "UPDATING": AutonomousContainerDatabaseLifecycleStateUpdating, - "TERMINATING": AutonomousContainerDatabaseLifecycleStateTerminating, - "TERMINATED": AutonomousContainerDatabaseLifecycleStateTerminated, - "FAILED": AutonomousContainerDatabaseLifecycleStateFailed, - "BACKUP_IN_PROGRESS": AutonomousContainerDatabaseLifecycleStateBackupInProgress, - "RESTORING": AutonomousContainerDatabaseLifecycleStateRestoring, - "RESTORE_FAILED": AutonomousContainerDatabaseLifecycleStateRestoreFailed, - "RESTARTING": AutonomousContainerDatabaseLifecycleStateRestarting, - "MAINTENANCE_IN_PROGRESS": AutonomousContainerDatabaseLifecycleStateMaintenanceInProgress, - "ROLE_CHANGE_IN_PROGRESS": AutonomousContainerDatabaseLifecycleStateRoleChangeInProgress, - "UNAVAILABLE": AutonomousContainerDatabaseLifecycleStateUnavailable, + "PROVISIONING": AutonomousContainerDatabaseLifecycleStateProvisioning, + "AVAILABLE": AutonomousContainerDatabaseLifecycleStateAvailable, + "UPDATING": AutonomousContainerDatabaseLifecycleStateUpdating, + "TERMINATING": AutonomousContainerDatabaseLifecycleStateTerminating, + "TERMINATED": AutonomousContainerDatabaseLifecycleStateTerminated, + "FAILED": AutonomousContainerDatabaseLifecycleStateFailed, + "BACKUP_IN_PROGRESS": AutonomousContainerDatabaseLifecycleStateBackupInProgress, + "RESTORING": AutonomousContainerDatabaseLifecycleStateRestoring, + "RESTORE_FAILED": AutonomousContainerDatabaseLifecycleStateRestoreFailed, + "RESTARTING": AutonomousContainerDatabaseLifecycleStateRestarting, + "MAINTENANCE_IN_PROGRESS": AutonomousContainerDatabaseLifecycleStateMaintenanceInProgress, + "ROLE_CHANGE_IN_PROGRESS": AutonomousContainerDatabaseLifecycleStateRoleChangeInProgress, + "ENABLING_AUTONOMOUS_DATA_GUARD": AutonomousContainerDatabaseLifecycleStateEnablingAutonomousDataGuard, + "UNAVAILABLE": AutonomousContainerDatabaseLifecycleStateUnavailable, } var mappingAutonomousContainerDatabaseLifecycleStateEnumLowerCase = map[string]AutonomousContainerDatabaseLifecycleStateEnum{ - "provisioning": AutonomousContainerDatabaseLifecycleStateProvisioning, - "available": AutonomousContainerDatabaseLifecycleStateAvailable, - "updating": AutonomousContainerDatabaseLifecycleStateUpdating, - "terminating": AutonomousContainerDatabaseLifecycleStateTerminating, - "terminated": AutonomousContainerDatabaseLifecycleStateTerminated, - "failed": AutonomousContainerDatabaseLifecycleStateFailed, - "backup_in_progress": AutonomousContainerDatabaseLifecycleStateBackupInProgress, - "restoring": AutonomousContainerDatabaseLifecycleStateRestoring, - "restore_failed": AutonomousContainerDatabaseLifecycleStateRestoreFailed, - "restarting": AutonomousContainerDatabaseLifecycleStateRestarting, - "maintenance_in_progress": AutonomousContainerDatabaseLifecycleStateMaintenanceInProgress, - "role_change_in_progress": AutonomousContainerDatabaseLifecycleStateRoleChangeInProgress, - "unavailable": AutonomousContainerDatabaseLifecycleStateUnavailable, + "provisioning": AutonomousContainerDatabaseLifecycleStateProvisioning, + "available": AutonomousContainerDatabaseLifecycleStateAvailable, + "updating": AutonomousContainerDatabaseLifecycleStateUpdating, + "terminating": AutonomousContainerDatabaseLifecycleStateTerminating, + "terminated": AutonomousContainerDatabaseLifecycleStateTerminated, + "failed": AutonomousContainerDatabaseLifecycleStateFailed, + "backup_in_progress": AutonomousContainerDatabaseLifecycleStateBackupInProgress, + "restoring": AutonomousContainerDatabaseLifecycleStateRestoring, + "restore_failed": AutonomousContainerDatabaseLifecycleStateRestoreFailed, + "restarting": AutonomousContainerDatabaseLifecycleStateRestarting, + "maintenance_in_progress": AutonomousContainerDatabaseLifecycleStateMaintenanceInProgress, + "role_change_in_progress": AutonomousContainerDatabaseLifecycleStateRoleChangeInProgress, + "enabling_autonomous_data_guard": AutonomousContainerDatabaseLifecycleStateEnablingAutonomousDataGuard, + "unavailable": AutonomousContainerDatabaseLifecycleStateUnavailable, } // GetAutonomousContainerDatabaseLifecycleStateEnumValues Enumerates the set of values for AutonomousContainerDatabaseLifecycleStateEnum @@ -359,6 +362,7 @@ func GetAutonomousContainerDatabaseLifecycleStateEnumStringValues() []string { "RESTARTING", "MAINTENANCE_IN_PROGRESS", "ROLE_CHANGE_IN_PROGRESS", + "ENABLING_AUTONOMOUS_DATA_GUARD", "UNAVAILABLE", } } diff --git a/database/autonomous_container_database_summary.go b/database/autonomous_container_database_summary.go index 9b1f91fa06..e23b449229 100644 --- a/database/autonomous_container_database_summary.go +++ b/database/autonomous_container_database_summary.go @@ -288,51 +288,54 @@ type AutonomousContainerDatabaseSummaryLifecycleStateEnum string // Set of constants representing the allowable values for AutonomousContainerDatabaseSummaryLifecycleStateEnum const ( - AutonomousContainerDatabaseSummaryLifecycleStateProvisioning AutonomousContainerDatabaseSummaryLifecycleStateEnum = "PROVISIONING" - AutonomousContainerDatabaseSummaryLifecycleStateAvailable AutonomousContainerDatabaseSummaryLifecycleStateEnum = "AVAILABLE" - AutonomousContainerDatabaseSummaryLifecycleStateUpdating AutonomousContainerDatabaseSummaryLifecycleStateEnum = "UPDATING" - AutonomousContainerDatabaseSummaryLifecycleStateTerminating AutonomousContainerDatabaseSummaryLifecycleStateEnum = "TERMINATING" - AutonomousContainerDatabaseSummaryLifecycleStateTerminated AutonomousContainerDatabaseSummaryLifecycleStateEnum = "TERMINATED" - AutonomousContainerDatabaseSummaryLifecycleStateFailed AutonomousContainerDatabaseSummaryLifecycleStateEnum = "FAILED" - AutonomousContainerDatabaseSummaryLifecycleStateBackupInProgress AutonomousContainerDatabaseSummaryLifecycleStateEnum = "BACKUP_IN_PROGRESS" - AutonomousContainerDatabaseSummaryLifecycleStateRestoring AutonomousContainerDatabaseSummaryLifecycleStateEnum = "RESTORING" - AutonomousContainerDatabaseSummaryLifecycleStateRestoreFailed AutonomousContainerDatabaseSummaryLifecycleStateEnum = "RESTORE_FAILED" - AutonomousContainerDatabaseSummaryLifecycleStateRestarting AutonomousContainerDatabaseSummaryLifecycleStateEnum = "RESTARTING" - AutonomousContainerDatabaseSummaryLifecycleStateMaintenanceInProgress AutonomousContainerDatabaseSummaryLifecycleStateEnum = "MAINTENANCE_IN_PROGRESS" - AutonomousContainerDatabaseSummaryLifecycleStateRoleChangeInProgress AutonomousContainerDatabaseSummaryLifecycleStateEnum = "ROLE_CHANGE_IN_PROGRESS" - AutonomousContainerDatabaseSummaryLifecycleStateUnavailable AutonomousContainerDatabaseSummaryLifecycleStateEnum = "UNAVAILABLE" + AutonomousContainerDatabaseSummaryLifecycleStateProvisioning AutonomousContainerDatabaseSummaryLifecycleStateEnum = "PROVISIONING" + AutonomousContainerDatabaseSummaryLifecycleStateAvailable AutonomousContainerDatabaseSummaryLifecycleStateEnum = "AVAILABLE" + AutonomousContainerDatabaseSummaryLifecycleStateUpdating AutonomousContainerDatabaseSummaryLifecycleStateEnum = "UPDATING" + AutonomousContainerDatabaseSummaryLifecycleStateTerminating AutonomousContainerDatabaseSummaryLifecycleStateEnum = "TERMINATING" + AutonomousContainerDatabaseSummaryLifecycleStateTerminated AutonomousContainerDatabaseSummaryLifecycleStateEnum = "TERMINATED" + AutonomousContainerDatabaseSummaryLifecycleStateFailed AutonomousContainerDatabaseSummaryLifecycleStateEnum = "FAILED" + AutonomousContainerDatabaseSummaryLifecycleStateBackupInProgress AutonomousContainerDatabaseSummaryLifecycleStateEnum = "BACKUP_IN_PROGRESS" + AutonomousContainerDatabaseSummaryLifecycleStateRestoring AutonomousContainerDatabaseSummaryLifecycleStateEnum = "RESTORING" + AutonomousContainerDatabaseSummaryLifecycleStateRestoreFailed AutonomousContainerDatabaseSummaryLifecycleStateEnum = "RESTORE_FAILED" + AutonomousContainerDatabaseSummaryLifecycleStateRestarting AutonomousContainerDatabaseSummaryLifecycleStateEnum = "RESTARTING" + AutonomousContainerDatabaseSummaryLifecycleStateMaintenanceInProgress AutonomousContainerDatabaseSummaryLifecycleStateEnum = "MAINTENANCE_IN_PROGRESS" + AutonomousContainerDatabaseSummaryLifecycleStateRoleChangeInProgress AutonomousContainerDatabaseSummaryLifecycleStateEnum = "ROLE_CHANGE_IN_PROGRESS" + AutonomousContainerDatabaseSummaryLifecycleStateEnablingAutonomousDataGuard AutonomousContainerDatabaseSummaryLifecycleStateEnum = "ENABLING_AUTONOMOUS_DATA_GUARD" + AutonomousContainerDatabaseSummaryLifecycleStateUnavailable AutonomousContainerDatabaseSummaryLifecycleStateEnum = "UNAVAILABLE" ) var mappingAutonomousContainerDatabaseSummaryLifecycleStateEnum = map[string]AutonomousContainerDatabaseSummaryLifecycleStateEnum{ - "PROVISIONING": AutonomousContainerDatabaseSummaryLifecycleStateProvisioning, - "AVAILABLE": AutonomousContainerDatabaseSummaryLifecycleStateAvailable, - "UPDATING": AutonomousContainerDatabaseSummaryLifecycleStateUpdating, - "TERMINATING": AutonomousContainerDatabaseSummaryLifecycleStateTerminating, - "TERMINATED": AutonomousContainerDatabaseSummaryLifecycleStateTerminated, - "FAILED": AutonomousContainerDatabaseSummaryLifecycleStateFailed, - "BACKUP_IN_PROGRESS": AutonomousContainerDatabaseSummaryLifecycleStateBackupInProgress, - "RESTORING": AutonomousContainerDatabaseSummaryLifecycleStateRestoring, - "RESTORE_FAILED": AutonomousContainerDatabaseSummaryLifecycleStateRestoreFailed, - "RESTARTING": AutonomousContainerDatabaseSummaryLifecycleStateRestarting, - "MAINTENANCE_IN_PROGRESS": AutonomousContainerDatabaseSummaryLifecycleStateMaintenanceInProgress, - "ROLE_CHANGE_IN_PROGRESS": AutonomousContainerDatabaseSummaryLifecycleStateRoleChangeInProgress, - "UNAVAILABLE": AutonomousContainerDatabaseSummaryLifecycleStateUnavailable, + "PROVISIONING": AutonomousContainerDatabaseSummaryLifecycleStateProvisioning, + "AVAILABLE": AutonomousContainerDatabaseSummaryLifecycleStateAvailable, + "UPDATING": AutonomousContainerDatabaseSummaryLifecycleStateUpdating, + "TERMINATING": AutonomousContainerDatabaseSummaryLifecycleStateTerminating, + "TERMINATED": AutonomousContainerDatabaseSummaryLifecycleStateTerminated, + "FAILED": AutonomousContainerDatabaseSummaryLifecycleStateFailed, + "BACKUP_IN_PROGRESS": AutonomousContainerDatabaseSummaryLifecycleStateBackupInProgress, + "RESTORING": AutonomousContainerDatabaseSummaryLifecycleStateRestoring, + "RESTORE_FAILED": AutonomousContainerDatabaseSummaryLifecycleStateRestoreFailed, + "RESTARTING": AutonomousContainerDatabaseSummaryLifecycleStateRestarting, + "MAINTENANCE_IN_PROGRESS": AutonomousContainerDatabaseSummaryLifecycleStateMaintenanceInProgress, + "ROLE_CHANGE_IN_PROGRESS": AutonomousContainerDatabaseSummaryLifecycleStateRoleChangeInProgress, + "ENABLING_AUTONOMOUS_DATA_GUARD": AutonomousContainerDatabaseSummaryLifecycleStateEnablingAutonomousDataGuard, + "UNAVAILABLE": AutonomousContainerDatabaseSummaryLifecycleStateUnavailable, } var mappingAutonomousContainerDatabaseSummaryLifecycleStateEnumLowerCase = map[string]AutonomousContainerDatabaseSummaryLifecycleStateEnum{ - "provisioning": AutonomousContainerDatabaseSummaryLifecycleStateProvisioning, - "available": AutonomousContainerDatabaseSummaryLifecycleStateAvailable, - "updating": AutonomousContainerDatabaseSummaryLifecycleStateUpdating, - "terminating": AutonomousContainerDatabaseSummaryLifecycleStateTerminating, - "terminated": AutonomousContainerDatabaseSummaryLifecycleStateTerminated, - "failed": AutonomousContainerDatabaseSummaryLifecycleStateFailed, - "backup_in_progress": AutonomousContainerDatabaseSummaryLifecycleStateBackupInProgress, - "restoring": AutonomousContainerDatabaseSummaryLifecycleStateRestoring, - "restore_failed": AutonomousContainerDatabaseSummaryLifecycleStateRestoreFailed, - "restarting": AutonomousContainerDatabaseSummaryLifecycleStateRestarting, - "maintenance_in_progress": AutonomousContainerDatabaseSummaryLifecycleStateMaintenanceInProgress, - "role_change_in_progress": AutonomousContainerDatabaseSummaryLifecycleStateRoleChangeInProgress, - "unavailable": AutonomousContainerDatabaseSummaryLifecycleStateUnavailable, + "provisioning": AutonomousContainerDatabaseSummaryLifecycleStateProvisioning, + "available": AutonomousContainerDatabaseSummaryLifecycleStateAvailable, + "updating": AutonomousContainerDatabaseSummaryLifecycleStateUpdating, + "terminating": AutonomousContainerDatabaseSummaryLifecycleStateTerminating, + "terminated": AutonomousContainerDatabaseSummaryLifecycleStateTerminated, + "failed": AutonomousContainerDatabaseSummaryLifecycleStateFailed, + "backup_in_progress": AutonomousContainerDatabaseSummaryLifecycleStateBackupInProgress, + "restoring": AutonomousContainerDatabaseSummaryLifecycleStateRestoring, + "restore_failed": AutonomousContainerDatabaseSummaryLifecycleStateRestoreFailed, + "restarting": AutonomousContainerDatabaseSummaryLifecycleStateRestarting, + "maintenance_in_progress": AutonomousContainerDatabaseSummaryLifecycleStateMaintenanceInProgress, + "role_change_in_progress": AutonomousContainerDatabaseSummaryLifecycleStateRoleChangeInProgress, + "enabling_autonomous_data_guard": AutonomousContainerDatabaseSummaryLifecycleStateEnablingAutonomousDataGuard, + "unavailable": AutonomousContainerDatabaseSummaryLifecycleStateUnavailable, } // GetAutonomousContainerDatabaseSummaryLifecycleStateEnumValues Enumerates the set of values for AutonomousContainerDatabaseSummaryLifecycleStateEnum @@ -359,6 +362,7 @@ func GetAutonomousContainerDatabaseSummaryLifecycleStateEnumStringValues() []str "RESTARTING", "MAINTENANCE_IN_PROGRESS", "ROLE_CHANGE_IN_PROGRESS", + "ENABLING_AUTONOMOUS_DATA_GUARD", "UNAVAILABLE", } } diff --git a/database/configure_saas_admin_user_details.go b/database/configure_saas_admin_user_details.go new file mode 100644 index 0000000000..193c3714b4 --- /dev/null +++ b/database/configure_saas_admin_user_details.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigureSaasAdminUserDetails Details to update SaaS administrative user configuration. +type ConfigureSaasAdminUserDetails struct { + + // Indicates if the SaaS administrative user is enabled for the Autonomous Database. + IsEnabled *bool `mandatory:"false" json:"isEnabled"` + + // The access type for the SaaS administrative user. If no access type is specified, the READ_ONLY access type is used. + AccessType ConfigureSaasAdminUserDetailsAccessTypeEnum `mandatory:"false" json:"accessType,omitempty"` + + // The date and time the SaaS administrative user was enabled at, for the Autonomous Database. + TimeSaasAdminUserEnabled *common.SDKTime `mandatory:"false" json:"timeSaasAdminUserEnabled"` + + // A strong password for SaaS administrative user. The password must be a minimum of nine (9) characters and contain a minimum of two (2) uppercase, two (2) lowercase, two (2) numbers, and two (2) special characters from _ (underscore), \# (hashtag), or - (dash). + Password *string `mandatory:"false" json:"password"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure secret (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + SecretId *string `mandatory:"false" json:"secretId"` + + // The version of the vault secret. If no version is specified, the latest version will be used. + SecretVersionNumber *int `mandatory:"false" json:"secretVersionNumber"` + + // How long, in hours, the SaaS administrative user will stay enabled. If no duration is specified, the default value 1 will be used. + Duration *int `mandatory:"false" json:"duration"` +} + +func (m ConfigureSaasAdminUserDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigureSaasAdminUserDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingConfigureSaasAdminUserDetailsAccessTypeEnum(string(m.AccessType)); !ok && m.AccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessType: %s. Supported values are: %s.", m.AccessType, strings.Join(GetConfigureSaasAdminUserDetailsAccessTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfigureSaasAdminUserDetailsAccessTypeEnum Enum with underlying type: string +type ConfigureSaasAdminUserDetailsAccessTypeEnum string + +// Set of constants representing the allowable values for ConfigureSaasAdminUserDetailsAccessTypeEnum +const ( + ConfigureSaasAdminUserDetailsAccessTypeReadOnly ConfigureSaasAdminUserDetailsAccessTypeEnum = "READ_ONLY" + ConfigureSaasAdminUserDetailsAccessTypeReadWrite ConfigureSaasAdminUserDetailsAccessTypeEnum = "READ_WRITE" + ConfigureSaasAdminUserDetailsAccessTypeAdmin ConfigureSaasAdminUserDetailsAccessTypeEnum = "ADMIN" +) + +var mappingConfigureSaasAdminUserDetailsAccessTypeEnum = map[string]ConfigureSaasAdminUserDetailsAccessTypeEnum{ + "READ_ONLY": ConfigureSaasAdminUserDetailsAccessTypeReadOnly, + "READ_WRITE": ConfigureSaasAdminUserDetailsAccessTypeReadWrite, + "ADMIN": ConfigureSaasAdminUserDetailsAccessTypeAdmin, +} + +var mappingConfigureSaasAdminUserDetailsAccessTypeEnumLowerCase = map[string]ConfigureSaasAdminUserDetailsAccessTypeEnum{ + "read_only": ConfigureSaasAdminUserDetailsAccessTypeReadOnly, + "read_write": ConfigureSaasAdminUserDetailsAccessTypeReadWrite, + "admin": ConfigureSaasAdminUserDetailsAccessTypeAdmin, +} + +// GetConfigureSaasAdminUserDetailsAccessTypeEnumValues Enumerates the set of values for ConfigureSaasAdminUserDetailsAccessTypeEnum +func GetConfigureSaasAdminUserDetailsAccessTypeEnumValues() []ConfigureSaasAdminUserDetailsAccessTypeEnum { + values := make([]ConfigureSaasAdminUserDetailsAccessTypeEnum, 0) + for _, v := range mappingConfigureSaasAdminUserDetailsAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetConfigureSaasAdminUserDetailsAccessTypeEnumStringValues Enumerates the set of values in String for ConfigureSaasAdminUserDetailsAccessTypeEnum +func GetConfigureSaasAdminUserDetailsAccessTypeEnumStringValues() []string { + return []string{ + "READ_ONLY", + "READ_WRITE", + "ADMIN", + } +} + +// GetMappingConfigureSaasAdminUserDetailsAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConfigureSaasAdminUserDetailsAccessTypeEnum(val string) (ConfigureSaasAdminUserDetailsAccessTypeEnum, bool) { + enum, ok := mappingConfigureSaasAdminUserDetailsAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/configure_saas_admin_user_request_response.go b/database/configure_saas_admin_user_request_response.go new file mode 100644 index 0000000000..94f669a79c --- /dev/null +++ b/database/configure_saas_admin_user_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ConfigureSaasAdminUserRequest wrapper for the ConfigureSaasAdminUser operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ConfigureSaasAdminUser.go.html to see an example of how to use ConfigureSaasAdminUserRequest. +type ConfigureSaasAdminUserRequest struct { + + // The database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + AutonomousDatabaseId *string `mandatory:"true" contributesTo:"path" name:"autonomousDatabaseId"` + + // Request to update SaaS administrative user configuration of the Autonomous Database. + ConfigureSaasAdminUserDetails `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. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ConfigureSaasAdminUserRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConfigureSaasAdminUserRequest) 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 ConfigureSaasAdminUserRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConfigureSaasAdminUserRequest) 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 ConfigureSaasAdminUserRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfigureSaasAdminUserResponse wrapper for the ConfigureSaasAdminUser operation +type ConfigureSaasAdminUserResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AutonomousDatabase instance + AutonomousDatabase `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ConfigureSaasAdminUserResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConfigureSaasAdminUserResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/create_autonomous_container_database_dataguard_association_details.go b/database/create_autonomous_container_database_dataguard_association_details.go new file mode 100644 index 0000000000..04c68f3b7e --- /dev/null +++ b/database/create_autonomous_container_database_dataguard_association_details.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAutonomousContainerDatabaseDataguardAssociationDetails Create Autonomous Dataguard Association to an existing Autonomous Container Database +type CreateAutonomousContainerDatabaseDataguardAssociationDetails struct { + + // The display name for the peer Autonomous Container Database. + PeerAutonomousContainerDatabaseDisplayName *string `mandatory:"true" json:"peerAutonomousContainerDatabaseDisplayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + PeerCloudAutonomousVmClusterId *string `mandatory:"true" json:"peerCloudAutonomousVmClusterId"` + + // The protection mode of this Autonomous Data Guard association. For more information, see + // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + // in the Oracle Data Guard documentation. + ProtectionMode CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum `mandatory:"true" json:"protectionMode"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the standby Autonomous Container Database + // will be created. + PeerAutonomousContainerDatabaseCompartmentId *string `mandatory:"false" json:"peerAutonomousContainerDatabaseCompartmentId"` + + PeerAutonomousContainerDatabaseBackupConfig *PeerAutonomousContainerDatabaseBackupConfig `mandatory:"false" json:"peerAutonomousContainerDatabaseBackupConfig"` + + // Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association + IsAutomaticFailoverEnabled *bool `mandatory:"false" json:"isAutomaticFailoverEnabled"` + + // The lag time for my preference based on data loss tolerance in seconds. + FastStartFailOverLagLimitInSeconds *int `mandatory:"false" json:"fastStartFailOverLagLimitInSeconds"` + + // The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. + // This value represents the number of days before scheduled maintenance of the primary database. + StandbyMaintenanceBufferInDays *int `mandatory:"false" json:"standbyMaintenanceBufferInDays"` +} + +func (m CreateAutonomousContainerDatabaseDataguardAssociationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAutonomousContainerDatabaseDataguardAssociationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum(string(m.ProtectionMode)); !ok && m.ProtectionMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtectionMode: %s. Supported values are: %s.", m.ProtectionMode, strings.Join(GetCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum Enum with underlying type: string +type CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum string + +// Set of constants representing the allowable values for CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum +const ( + CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeAvailability CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum = "MAXIMUM_AVAILABILITY" + CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModePerformance CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum = "MAXIMUM_PERFORMANCE" +) + +var mappingCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum = map[string]CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum{ + "MAXIMUM_AVAILABILITY": CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeAvailability, + "MAXIMUM_PERFORMANCE": CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModePerformance, +} + +var mappingCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnumLowerCase = map[string]CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum{ + "maximum_availability": CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeAvailability, + "maximum_performance": CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModePerformance, +} + +// GetCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnumValues Enumerates the set of values for CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum +func GetCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnumValues() []CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum { + values := make([]CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum, 0) + for _, v := range mappingCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum { + values = append(values, v) + } + return values +} + +// GetCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnumStringValues Enumerates the set of values in String for CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum +func GetCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnumStringValues() []string { + return []string{ + "MAXIMUM_AVAILABILITY", + "MAXIMUM_PERFORMANCE", + } +} + +// GetMappingCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum(val string) (CreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnum, bool) { + enum, ok := mappingCreateAutonomousContainerDatabaseDataguardAssociationDetailsProtectionModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/create_autonomous_container_database_dataguard_association_request_response.go b/database/create_autonomous_container_database_dataguard_association_request_response.go new file mode 100644 index 0000000000..3a084b6dbc --- /dev/null +++ b/database/create_autonomous_container_database_dataguard_association_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateAutonomousContainerDatabaseDataguardAssociationRequest wrapper for the CreateAutonomousContainerDatabaseDataguardAssociation operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/CreateAutonomousContainerDatabaseDataguardAssociation.go.html to see an example of how to use CreateAutonomousContainerDatabaseDataguardAssociationRequest. +type CreateAutonomousContainerDatabaseDataguardAssociationRequest struct { + + // The Autonomous Container Database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + AutonomousContainerDatabaseId *string `mandatory:"true" contributesTo:"path" name:"autonomousContainerDatabaseId"` + + // A request to create an Autonomous Data Guard association. + CreateAutonomousContainerDatabaseDataguardAssociationDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateAutonomousContainerDatabaseDataguardAssociationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateAutonomousContainerDatabaseDataguardAssociationRequest) 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 CreateAutonomousContainerDatabaseDataguardAssociationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateAutonomousContainerDatabaseDataguardAssociationRequest) 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 CreateAutonomousContainerDatabaseDataguardAssociationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateAutonomousContainerDatabaseDataguardAssociationResponse wrapper for the CreateAutonomousContainerDatabaseDataguardAssociation operation +type CreateAutonomousContainerDatabaseDataguardAssociationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AutonomousContainerDatabaseDataguardAssociation instance + AutonomousContainerDatabaseDataguardAssociation `presentIn:"body"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // 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 CreateAutonomousContainerDatabaseDataguardAssociationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateAutonomousContainerDatabaseDataguardAssociationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/database_client.go b/database/database_client.go index d48367fd3c..9e7ba7a941 100644 --- a/database/database_client.go +++ b/database/database_client.go @@ -1974,6 +1974,63 @@ func (client DatabaseClient) configureAutonomousDatabaseVaultKey(ctx context.Con return response, err } +// ConfigureSaasAdminUser This operation updates SaaS administrative user configuration of the Autonomous Database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ConfigureSaasAdminUser.go.html to see an example of how to use ConfigureSaasAdminUser API. +func (client DatabaseClient) ConfigureSaasAdminUser(ctx context.Context, request ConfigureSaasAdminUserRequest) (response ConfigureSaasAdminUserResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.configureSaasAdminUser, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ConfigureSaasAdminUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ConfigureSaasAdminUserResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ConfigureSaasAdminUserResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConfigureSaasAdminUserResponse") + } + return +} + +// configureSaasAdminUser implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) configureSaasAdminUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/autonomousDatabases/{autonomousDatabaseId}/actions/configureSaasAdminUser", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ConfigureSaasAdminUserResponse + 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/database/20160918/AutonomousDatabase/ConfigureSaasAdminUser" + err = common.PostProcessServiceError(err, "Database", "ConfigureSaasAdminUser", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ConvertToPdb Converts a non-container database to a pluggable database. // // # See also @@ -2218,6 +2275,74 @@ func (client DatabaseClient) createAutonomousContainerDatabase(ctx context.Conte return response, err } +// CreateAutonomousContainerDatabaseDataguardAssociation Create a new Autonomous Data Guard association. An Autonomous Data Guard association represents the replication relationship between the +// specified Autonomous Container database and a peer Autonomous Container database. For more information, see Using Oracle Data Guard (https://docs.cloud.oracle.com/Content/Database/Tasks/usingdataguard.htm). +// All Oracle Cloud Infrastructure resources, including Data Guard associations, get an Oracle-assigned, unique ID +// called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. +// You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the +// resource in the Console. For more information, see +// Resource Identifiers (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/CreateAutonomousContainerDatabaseDataguardAssociation.go.html to see an example of how to use CreateAutonomousContainerDatabaseDataguardAssociation API. +func (client DatabaseClient) CreateAutonomousContainerDatabaseDataguardAssociation(ctx context.Context, request CreateAutonomousContainerDatabaseDataguardAssociationRequest) (response CreateAutonomousContainerDatabaseDataguardAssociationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createAutonomousContainerDatabaseDataguardAssociation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateAutonomousContainerDatabaseDataguardAssociationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateAutonomousContainerDatabaseDataguardAssociationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateAutonomousContainerDatabaseDataguardAssociationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateAutonomousContainerDatabaseDataguardAssociationResponse") + } + return +} + +// createAutonomousContainerDatabaseDataguardAssociation implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) createAutonomousContainerDatabaseDataguardAssociation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/autonomousContainerDatabases/{autonomousContainerDatabaseId}/autonomousContainerDatabaseDataguardAssociations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateAutonomousContainerDatabaseDataguardAssociationResponse + 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/database/20160918/AutonomousContainerDatabaseDataguardAssociation/CreateAutonomousContainerDatabaseDataguardAssociation" + err = common.PostProcessServiceError(err, "Database", "CreateAutonomousContainerDatabaseDataguardAssociation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateAutonomousDatabase Creates a new Autonomous Database. // // # See also @@ -16143,6 +16268,63 @@ func (client DatabaseClient) rotateVaultKey(ctx context.Context, request common. return response, err } +// SaasAdminUserStatus This operation gets SaaS administrative user status of the Autonomous Database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/SaasAdminUserStatus.go.html to see an example of how to use SaasAdminUserStatus API. +func (client DatabaseClient) SaasAdminUserStatus(ctx context.Context, request SaasAdminUserStatusRequest) (response SaasAdminUserStatusResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.saasAdminUserStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SaasAdminUserStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SaasAdminUserStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SaasAdminUserStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SaasAdminUserStatusResponse") + } + return +} + +// saasAdminUserStatus implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) saasAdminUserStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/autonomousDatabases/{autonomousDatabaseId}/actions/getSaasAdminUserStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response SaasAdminUserStatusResponse + 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/database/20160918/AutonomousDatabase/SaasAdminUserStatus" + err = common.PostProcessServiceError(err, "Database", "SaasAdminUserStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ScanExternalContainerDatabasePluggableDatabases Scans for pluggable databases in the specified external container database. // This operation will return un-registered pluggable databases in the GetWorkRequest operation. // diff --git a/database/database_connection_string_profile.go b/database/database_connection_string_profile.go index 101ed32e03..df55ee27ea 100644 --- a/database/database_connection_string_profile.go +++ b/database/database_connection_string_profile.go @@ -42,6 +42,9 @@ type DatabaseConnectionStringProfile struct { // Specifies whether the TLS handshake is using one-way (`SERVER`) or mutual (`MUTUAL`) authentication. TlsAuthentication DatabaseConnectionStringProfileTlsAuthenticationEnum `mandatory:"false" json:"tlsAuthentication,omitempty"` + + // True for a regional connection string, applicable to cross-region DG only. + IsRegional *bool `mandatory:"false" json:"isRegional"` } func (m DatabaseConnectionStringProfile) String() string { diff --git a/database/generate_autonomous_database_wallet_details.go b/database/generate_autonomous_database_wallet_details.go index 7612381494..3b56de2764 100644 --- a/database/generate_autonomous_database_wallet_details.go +++ b/database/generate_autonomous_database_wallet_details.go @@ -27,6 +27,9 @@ type GenerateAutonomousDatabaseWalletDetails struct { // * `ALL` - used to generate wallet for all databases in the region // **Dedicated Exadata infrastructure usage:** Value must be `NULL` if attribute is used. GenerateType GenerateAutonomousDatabaseWalletDetailsGenerateTypeEnum `mandatory:"false" json:"generateType,omitempty"` + + // True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + IsRegional *bool `mandatory:"false" json:"isRegional"` } func (m GenerateAutonomousDatabaseWalletDetails) String() string { diff --git a/database/saas_admin_user_configuration.go b/database/saas_admin_user_configuration.go new file mode 100644 index 0000000000..21ecc5810f --- /dev/null +++ b/database/saas_admin_user_configuration.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SaasAdminUserConfiguration SaaS administrative user configuration. +type SaasAdminUserConfiguration struct { + + // Indicates if the SaaS administrative user is enabled for the Autonomous Database. + IsEnabled *bool `mandatory:"false" json:"isEnabled"` + + // The access type for the SaaS administrative user. If no access type is specified, the READ_ONLY access type is used. + AccessType SaasAdminUserConfigurationAccessTypeEnum `mandatory:"false" json:"accessType,omitempty"` + + // The date and time the SaaS administrative user was enabled at, for the Autonomous Database. + TimeSaasAdminUserEnabled *common.SDKTime `mandatory:"false" json:"timeSaasAdminUserEnabled"` + + // A strong password for SaaS administrative user. The password must be a minimum of nine (9) characters and contain a minimum of two (2) uppercase, two (2) lowercase, two (2) numbers, and two (2) special characters from _ (underscore), \# (hashtag), or - (dash). + Password *string `mandatory:"false" json:"password"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure secret (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + SecretId *string `mandatory:"false" json:"secretId"` + + // The version of the vault secret. If no version is specified, the latest version will be used. + SecretVersionNumber *int `mandatory:"false" json:"secretVersionNumber"` + + // How long, in hours, the SaaS administrative user will stay enabled. If no duration is specified, the default value 1 will be used. + Duration *int `mandatory:"false" json:"duration"` +} + +func (m SaasAdminUserConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SaasAdminUserConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingSaasAdminUserConfigurationAccessTypeEnum(string(m.AccessType)); !ok && m.AccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessType: %s. Supported values are: %s.", m.AccessType, strings.Join(GetSaasAdminUserConfigurationAccessTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SaasAdminUserConfigurationAccessTypeEnum Enum with underlying type: string +type SaasAdminUserConfigurationAccessTypeEnum string + +// Set of constants representing the allowable values for SaasAdminUserConfigurationAccessTypeEnum +const ( + SaasAdminUserConfigurationAccessTypeReadOnly SaasAdminUserConfigurationAccessTypeEnum = "READ_ONLY" + SaasAdminUserConfigurationAccessTypeReadWrite SaasAdminUserConfigurationAccessTypeEnum = "READ_WRITE" + SaasAdminUserConfigurationAccessTypeAdmin SaasAdminUserConfigurationAccessTypeEnum = "ADMIN" +) + +var mappingSaasAdminUserConfigurationAccessTypeEnum = map[string]SaasAdminUserConfigurationAccessTypeEnum{ + "READ_ONLY": SaasAdminUserConfigurationAccessTypeReadOnly, + "READ_WRITE": SaasAdminUserConfigurationAccessTypeReadWrite, + "ADMIN": SaasAdminUserConfigurationAccessTypeAdmin, +} + +var mappingSaasAdminUserConfigurationAccessTypeEnumLowerCase = map[string]SaasAdminUserConfigurationAccessTypeEnum{ + "read_only": SaasAdminUserConfigurationAccessTypeReadOnly, + "read_write": SaasAdminUserConfigurationAccessTypeReadWrite, + "admin": SaasAdminUserConfigurationAccessTypeAdmin, +} + +// GetSaasAdminUserConfigurationAccessTypeEnumValues Enumerates the set of values for SaasAdminUserConfigurationAccessTypeEnum +func GetSaasAdminUserConfigurationAccessTypeEnumValues() []SaasAdminUserConfigurationAccessTypeEnum { + values := make([]SaasAdminUserConfigurationAccessTypeEnum, 0) + for _, v := range mappingSaasAdminUserConfigurationAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetSaasAdminUserConfigurationAccessTypeEnumStringValues Enumerates the set of values in String for SaasAdminUserConfigurationAccessTypeEnum +func GetSaasAdminUserConfigurationAccessTypeEnumStringValues() []string { + return []string{ + "READ_ONLY", + "READ_WRITE", + "ADMIN", + } +} + +// GetMappingSaasAdminUserConfigurationAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSaasAdminUserConfigurationAccessTypeEnum(val string) (SaasAdminUserConfigurationAccessTypeEnum, bool) { + enum, ok := mappingSaasAdminUserConfigurationAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/saas_admin_user_status.go b/database/saas_admin_user_status.go new file mode 100644 index 0000000000..36ae394001 --- /dev/null +++ b/database/saas_admin_user_status.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SaasAdminUserStatus SaaS administrative user status. +type SaasAdminUserStatus struct { + + // Indicates if the SaaS administrative user is enabled for the Autonomous Database. + IsEnabled *bool `mandatory:"false" json:"isEnabled"` + + // The access type for the SaaS administrative user. If no access type is specified, the READ_ONLY access type is used. + AccessType SaasAdminUserStatusAccessTypeEnum `mandatory:"false" json:"accessType,omitempty"` + + // The date and time the SaaS administrative user was enabled at, for the Autonomous Database. + TimeSaasAdminUserEnabled *common.SDKTime `mandatory:"false" json:"timeSaasAdminUserEnabled"` +} + +func (m SaasAdminUserStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SaasAdminUserStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingSaasAdminUserStatusAccessTypeEnum(string(m.AccessType)); !ok && m.AccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessType: %s. Supported values are: %s.", m.AccessType, strings.Join(GetSaasAdminUserStatusAccessTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SaasAdminUserStatusAccessTypeEnum Enum with underlying type: string +type SaasAdminUserStatusAccessTypeEnum string + +// Set of constants representing the allowable values for SaasAdminUserStatusAccessTypeEnum +const ( + SaasAdminUserStatusAccessTypeReadOnly SaasAdminUserStatusAccessTypeEnum = "READ_ONLY" + SaasAdminUserStatusAccessTypeReadWrite SaasAdminUserStatusAccessTypeEnum = "READ_WRITE" + SaasAdminUserStatusAccessTypeAdmin SaasAdminUserStatusAccessTypeEnum = "ADMIN" +) + +var mappingSaasAdminUserStatusAccessTypeEnum = map[string]SaasAdminUserStatusAccessTypeEnum{ + "READ_ONLY": SaasAdminUserStatusAccessTypeReadOnly, + "READ_WRITE": SaasAdminUserStatusAccessTypeReadWrite, + "ADMIN": SaasAdminUserStatusAccessTypeAdmin, +} + +var mappingSaasAdminUserStatusAccessTypeEnumLowerCase = map[string]SaasAdminUserStatusAccessTypeEnum{ + "read_only": SaasAdminUserStatusAccessTypeReadOnly, + "read_write": SaasAdminUserStatusAccessTypeReadWrite, + "admin": SaasAdminUserStatusAccessTypeAdmin, +} + +// GetSaasAdminUserStatusAccessTypeEnumValues Enumerates the set of values for SaasAdminUserStatusAccessTypeEnum +func GetSaasAdminUserStatusAccessTypeEnumValues() []SaasAdminUserStatusAccessTypeEnum { + values := make([]SaasAdminUserStatusAccessTypeEnum, 0) + for _, v := range mappingSaasAdminUserStatusAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetSaasAdminUserStatusAccessTypeEnumStringValues Enumerates the set of values in String for SaasAdminUserStatusAccessTypeEnum +func GetSaasAdminUserStatusAccessTypeEnumStringValues() []string { + return []string{ + "READ_ONLY", + "READ_WRITE", + "ADMIN", + } +} + +// GetMappingSaasAdminUserStatusAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSaasAdminUserStatusAccessTypeEnum(val string) (SaasAdminUserStatusAccessTypeEnum, bool) { + enum, ok := mappingSaasAdminUserStatusAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/saas_admin_user_status_request_response.go b/database/saas_admin_user_status_request_response.go new file mode 100644 index 0000000000..768707f55a --- /dev/null +++ b/database/saas_admin_user_status_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SaasAdminUserStatusRequest wrapper for the SaasAdminUserStatus operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/SaasAdminUserStatus.go.html to see an example of how to use SaasAdminUserStatusRequest. +type SaasAdminUserStatusRequest struct { + + // The database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + AutonomousDatabaseId *string `mandatory:"true" contributesTo:"path" name:"autonomousDatabaseId"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SaasAdminUserStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SaasAdminUserStatusRequest) 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 SaasAdminUserStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SaasAdminUserStatusRequest) 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 SaasAdminUserStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SaasAdminUserStatusResponse wrapper for the SaasAdminUserStatus operation +type SaasAdminUserStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SaasAdminUserStatus instance + SaasAdminUserStatus `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 SaasAdminUserStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SaasAdminUserStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/agent.go b/jms/agent.go new file mode 100644 index 0000000000..458e074426 --- /dev/null +++ b/jms/agent.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Agent Information about the agent. +type Agent struct { + + // The name of the agent. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The agent type. + Type AgentTypeEnum `mandatory:"true" json:"type"` + + // The java version. + JavaVersion *string `mandatory:"true" json:"javaVersion"` + + // The security status of the Java Runtime. + JavaSecurityStatus JreSecurityStatusEnum `mandatory:"true" json:"javaSecurityStatus"` + + // A list of plugins installed on this agent. + Plugins []Plugin `mandatory:"true" json:"plugins"` +} + +func (m Agent) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Agent) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAgentTypeEnum(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(GetAgentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingJreSecurityStatusEnum(string(m.JavaSecurityStatus)); !ok && m.JavaSecurityStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for JavaSecurityStatus: %s. Supported values are: %s.", m.JavaSecurityStatus, strings.Join(GetJreSecurityStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/agent_type.go b/jms/agent_type.go new file mode 100644 index 0000000000..67b2da82fa --- /dev/null +++ b/jms/agent_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "strings" +) + +// AgentTypeEnum Enum with underlying type: string +type AgentTypeEnum string + +// Set of constants representing the allowable values for AgentTypeEnum +const ( + AgentTypeOma AgentTypeEnum = "OMA" + AgentTypeOca AgentTypeEnum = "OCA" +) + +var mappingAgentTypeEnum = map[string]AgentTypeEnum{ + "OMA": AgentTypeOma, + "OCA": AgentTypeOca, +} + +var mappingAgentTypeEnumLowerCase = map[string]AgentTypeEnum{ + "oma": AgentTypeOma, + "oca": AgentTypeOca, +} + +// GetAgentTypeEnumValues Enumerates the set of values for AgentTypeEnum +func GetAgentTypeEnumValues() []AgentTypeEnum { + values := make([]AgentTypeEnum, 0) + for _, v := range mappingAgentTypeEnum { + values = append(values, v) + } + return values +} + +// GetAgentTypeEnumStringValues Enumerates the set of values in String for AgentTypeEnum +func GetAgentTypeEnumStringValues() []string { + return []string{ + "OMA", + "OCA", + } +} + +// GetMappingAgentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAgentTypeEnum(val string) (AgentTypeEnum, bool) { + enum, ok := mappingAgentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/announcement_summary.go b/jms/announcement_summary.go index 91d2570946..6daeb0d06b 100644 --- a/jms/announcement_summary.go +++ b/jms/announcement_summary.go @@ -15,7 +15,7 @@ import ( "strings" ) -// AnnouncementSummary A summary of a announcement on Console Overview page +// AnnouncementSummary An summary of a announcement on Console Overview page type AnnouncementSummary struct { // Unique id of the announcement diff --git a/jms/create_drs_file_details.go b/jms/create_drs_file_details.go new file mode 100644 index 0000000000..f16a0eaeed --- /dev/null +++ b/jms/create_drs_file_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrsFileDetails Details of the request to create DRS file in a Fleet. +type CreateDrsFileDetails struct { + + // The Object Storage bucket name where the DRS file is located. + BucketName *string `mandatory:"true" json:"bucketName"` + + // The namespace for Object Storage. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the DRS file in Object Store. + DrsFileName *string `mandatory:"true" json:"drsFileName"` +} + +func (m CreateDrsFileDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDrsFileDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/create_drs_file_request_response.go b/jms/create_drs_file_request_response.go new file mode 100644 index 0000000000..cee0b789e6 --- /dev/null +++ b/jms/create_drs_file_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDrsFileRequest wrapper for the CreateDrsFile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/CreateDrsFile.go.html to see an example of how to use CreateDrsFileRequest. +type CreateDrsFileRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // Detail information to create DRS + CreateDrsFileDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // ETag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the ETag you + // provide matches the resource's current ETag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDrsFileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDrsFileRequest) 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 CreateDrsFileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDrsFileRequest) 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 CreateDrsFileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDrsFileResponse wrapper for the CreateDrsFile operation +type CreateDrsFileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. + // You can use this to query the status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateDrsFileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDrsFileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/delete_drs_file_request_response.go b/jms/delete_drs_file_request_response.go new file mode 100644 index 0000000000..3801c0763f --- /dev/null +++ b/jms/delete_drs_file_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDrsFileRequest wrapper for the DeleteDrsFile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/DeleteDrsFile.go.html to see an example of how to use DeleteDrsFileRequest. +type DeleteDrsFileRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The unique identifier of the DRS File in Object Storage. + DrsFileKey *string `mandatory:"true" contributesTo:"path" name:"drsFileKey"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // ETag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the ETag you + // provide matches the resource's current ETag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDrsFileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDrsFileRequest) 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 DeleteDrsFileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDrsFileRequest) 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 DeleteDrsFileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDrsFileResponse wrapper for the DeleteDrsFile operation +type DeleteDrsFileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. + // You can use this to query the status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDrsFileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDrsFileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/disable_drs_details.go b/jms/disable_drs_details.go new file mode 100644 index 0000000000..9ca4fcbad5 --- /dev/null +++ b/jms/disable_drs_details.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DisableDrsDetails Details of the request to disable DRS file from active managed instance(s) in a Fleet. +// When the targets aren't specified, then all active managed instance(s) currently in the Fleet are selected. +type DisableDrsDetails struct { + ManageDrsDetails *ManageDrsDetails `mandatory:"false" json:"manageDrsDetails"` +} + +func (m DisableDrsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DisableDrsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/disable_drs_request_response.go b/jms/disable_drs_request_response.go new file mode 100644 index 0000000000..3766888ccf --- /dev/null +++ b/jms/disable_drs_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DisableDrsRequest wrapper for the DisableDrs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/DisableDrs.go.html to see an example of how to use DisableDrsRequest. +type DisableDrsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // Detail information to disable DRS + DisableDrsDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // ETag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the ETag you + // provide matches the resource's current ETag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DisableDrsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DisableDrsRequest) 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 DisableDrsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DisableDrsRequest) 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 DisableDrsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DisableDrsResponse wrapper for the DisableDrs operation +type DisableDrsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. + // You can use this to query the status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DisableDrsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DisableDrsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/drs_file.go b/jms/drs_file.go new file mode 100644 index 0000000000..ccd68b01c8 --- /dev/null +++ b/jms/drs_file.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrsFile A Deployment Rule Set(DRS) is a JAR (Java ARchive) file used in Java applications to enforce security and manage compatibility +// between different versions of Java applets and web start applications +// (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/deployment_rules.html). +type DrsFile struct { + + // The Object Storage bucket name where the DRS file is located. + BucketName *string `mandatory:"true" json:"bucketName"` + + // The namespace for Object Storage. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the DRS file in Object Store. + DrsFileName *string `mandatory:"true" json:"drsFileName"` + + // The unique identifier of the DRS file in Object Storage. + DrsFileKey *string `mandatory:"true" json:"drsFileKey"` + + // The checksum type for the DRS file in Object Storage. + ChecksumType DrsFileChecksumTypeEnum `mandatory:"true" json:"checksumType"` + + // The checksum value for the DRS file in Object Storage. + ChecksumValue *string `mandatory:"true" json:"checksumValue"` + + // To check if the DRS file is the detfault ones. + IsDefault *bool `mandatory:"true" json:"isDefault"` +} + +func (m DrsFile) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrsFile) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrsFileChecksumTypeEnum(string(m.ChecksumType)); !ok && m.ChecksumType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ChecksumType: %s. Supported values are: %s.", m.ChecksumType, strings.Join(GetDrsFileChecksumTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrsFileChecksumTypeEnum Enum with underlying type: string +type DrsFileChecksumTypeEnum string + +// Set of constants representing the allowable values for DrsFileChecksumTypeEnum +const ( + DrsFileChecksumTypeSha256 DrsFileChecksumTypeEnum = "SHA256" +) + +var mappingDrsFileChecksumTypeEnum = map[string]DrsFileChecksumTypeEnum{ + "SHA256": DrsFileChecksumTypeSha256, +} + +var mappingDrsFileChecksumTypeEnumLowerCase = map[string]DrsFileChecksumTypeEnum{ + "sha256": DrsFileChecksumTypeSha256, +} + +// GetDrsFileChecksumTypeEnumValues Enumerates the set of values for DrsFileChecksumTypeEnum +func GetDrsFileChecksumTypeEnumValues() []DrsFileChecksumTypeEnum { + values := make([]DrsFileChecksumTypeEnum, 0) + for _, v := range mappingDrsFileChecksumTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrsFileChecksumTypeEnumStringValues Enumerates the set of values in String for DrsFileChecksumTypeEnum +func GetDrsFileChecksumTypeEnumStringValues() []string { + return []string{ + "SHA256", + } +} + +// GetMappingDrsFileChecksumTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrsFileChecksumTypeEnum(val string) (DrsFileChecksumTypeEnum, bool) { + enum, ok := mappingDrsFileChecksumTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/drs_file_collection.go b/jms/drs_file_collection.go new file mode 100644 index 0000000000..aaca716619 --- /dev/null +++ b/jms/drs_file_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrsFileCollection List of DRS details. +type DrsFileCollection struct { + + // A list of DRS details. + Items []DrsFileSummary `mandatory:"true" json:"items"` +} + +func (m DrsFileCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrsFileCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/drs_file_sort_by.go b/jms/drs_file_sort_by.go new file mode 100644 index 0000000000..1656a39ba1 --- /dev/null +++ b/jms/drs_file_sort_by.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "strings" +) + +// DrsFileSortByEnum Enum with underlying type: string +type DrsFileSortByEnum string + +// Set of constants representing the allowable values for DrsFileSortByEnum +const ( + DrsFileSortByBucketName DrsFileSortByEnum = "bucketName" + DrsFileSortByNamespace DrsFileSortByEnum = "namespace" + DrsFileSortByDrsFileKey DrsFileSortByEnum = "drsFileKey" + DrsFileSortByDrsFileName DrsFileSortByEnum = "drsFileName" + DrsFileSortByChecksumType DrsFileSortByEnum = "checksumType" + DrsFileSortByIsDefault DrsFileSortByEnum = "isDefault" +) + +var mappingDrsFileSortByEnum = map[string]DrsFileSortByEnum{ + "bucketName": DrsFileSortByBucketName, + "namespace": DrsFileSortByNamespace, + "drsFileKey": DrsFileSortByDrsFileKey, + "drsFileName": DrsFileSortByDrsFileName, + "checksumType": DrsFileSortByChecksumType, + "isDefault": DrsFileSortByIsDefault, +} + +var mappingDrsFileSortByEnumLowerCase = map[string]DrsFileSortByEnum{ + "bucketname": DrsFileSortByBucketName, + "namespace": DrsFileSortByNamespace, + "drsfilekey": DrsFileSortByDrsFileKey, + "drsfilename": DrsFileSortByDrsFileName, + "checksumtype": DrsFileSortByChecksumType, + "isdefault": DrsFileSortByIsDefault, +} + +// GetDrsFileSortByEnumValues Enumerates the set of values for DrsFileSortByEnum +func GetDrsFileSortByEnumValues() []DrsFileSortByEnum { + values := make([]DrsFileSortByEnum, 0) + for _, v := range mappingDrsFileSortByEnum { + values = append(values, v) + } + return values +} + +// GetDrsFileSortByEnumStringValues Enumerates the set of values in String for DrsFileSortByEnum +func GetDrsFileSortByEnumStringValues() []string { + return []string{ + "bucketName", + "namespace", + "drsFileKey", + "drsFileName", + "checksumType", + "isDefault", + } +} + +// GetMappingDrsFileSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrsFileSortByEnum(val string) (DrsFileSortByEnum, bool) { + enum, ok := mappingDrsFileSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/drs_file_status.go b/jms/drs_file_status.go new file mode 100644 index 0000000000..2f85ec5938 --- /dev/null +++ b/jms/drs_file_status.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "strings" +) + +// DrsFileStatusEnum Enum with underlying type: string +type DrsFileStatusEnum string + +// Set of constants representing the allowable values for DrsFileStatusEnum +const ( + DrsFileStatusPresent DrsFileStatusEnum = "PRESENT" + DrsFileStatusAbsent DrsFileStatusEnum = "ABSENT" + DrsFileStatusMismatch DrsFileStatusEnum = "MISMATCH" + DrsFileStatusNotConfigured DrsFileStatusEnum = "NOT_CONFIGURED" +) + +var mappingDrsFileStatusEnum = map[string]DrsFileStatusEnum{ + "PRESENT": DrsFileStatusPresent, + "ABSENT": DrsFileStatusAbsent, + "MISMATCH": DrsFileStatusMismatch, + "NOT_CONFIGURED": DrsFileStatusNotConfigured, +} + +var mappingDrsFileStatusEnumLowerCase = map[string]DrsFileStatusEnum{ + "present": DrsFileStatusPresent, + "absent": DrsFileStatusAbsent, + "mismatch": DrsFileStatusMismatch, + "not_configured": DrsFileStatusNotConfigured, +} + +// GetDrsFileStatusEnumValues Enumerates the set of values for DrsFileStatusEnum +func GetDrsFileStatusEnumValues() []DrsFileStatusEnum { + values := make([]DrsFileStatusEnum, 0) + for _, v := range mappingDrsFileStatusEnum { + values = append(values, v) + } + return values +} + +// GetDrsFileStatusEnumStringValues Enumerates the set of values in String for DrsFileStatusEnum +func GetDrsFileStatusEnumStringValues() []string { + return []string{ + "PRESENT", + "ABSENT", + "MISMATCH", + "NOT_CONFIGURED", + } +} + +// GetMappingDrsFileStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrsFileStatusEnum(val string) (DrsFileStatusEnum, bool) { + enum, ok := mappingDrsFileStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/drs_file_summary.go b/jms/drs_file_summary.go new file mode 100644 index 0000000000..3d1f104fc6 --- /dev/null +++ b/jms/drs_file_summary.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrsFileSummary A Deployment Rule Set(DRS) is a JAR (Java ARchive) file used in Java applications to enforce security and manage compatibility +// between different versions of Java applets and web start applications +// (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/deployment_rules.html). +type DrsFileSummary struct { + + // The Object Storage bucket name where the DRS file is located. + BucketName *string `mandatory:"true" json:"bucketName"` + + // The namespace for Object Storage. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the DRS file in Object Store. + DrsFileName *string `mandatory:"true" json:"drsFileName"` + + // The unique identifier of the DRS file in Object Storage. + DrsFileKey *string `mandatory:"true" json:"drsFileKey"` + + // The checksum type for the DRS file in Object Storage. + ChecksumType DrsFileSummaryChecksumTypeEnum `mandatory:"true" json:"checksumType"` + + // The checksum value for the DRS file in Object Storage. + ChecksumValue *string `mandatory:"true" json:"checksumValue"` + + // To check if the DRS file is the detfault ones. + IsDefault *bool `mandatory:"true" json:"isDefault"` +} + +func (m DrsFileSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrsFileSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrsFileSummaryChecksumTypeEnum(string(m.ChecksumType)); !ok && m.ChecksumType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ChecksumType: %s. Supported values are: %s.", m.ChecksumType, strings.Join(GetDrsFileSummaryChecksumTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrsFileSummaryChecksumTypeEnum Enum with underlying type: string +type DrsFileSummaryChecksumTypeEnum string + +// Set of constants representing the allowable values for DrsFileSummaryChecksumTypeEnum +const ( + DrsFileSummaryChecksumTypeSha256 DrsFileSummaryChecksumTypeEnum = "SHA256" +) + +var mappingDrsFileSummaryChecksumTypeEnum = map[string]DrsFileSummaryChecksumTypeEnum{ + "SHA256": DrsFileSummaryChecksumTypeSha256, +} + +var mappingDrsFileSummaryChecksumTypeEnumLowerCase = map[string]DrsFileSummaryChecksumTypeEnum{ + "sha256": DrsFileSummaryChecksumTypeSha256, +} + +// GetDrsFileSummaryChecksumTypeEnumValues Enumerates the set of values for DrsFileSummaryChecksumTypeEnum +func GetDrsFileSummaryChecksumTypeEnumValues() []DrsFileSummaryChecksumTypeEnum { + values := make([]DrsFileSummaryChecksumTypeEnum, 0) + for _, v := range mappingDrsFileSummaryChecksumTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrsFileSummaryChecksumTypeEnumStringValues Enumerates the set of values in String for DrsFileSummaryChecksumTypeEnum +func GetDrsFileSummaryChecksumTypeEnumStringValues() []string { + return []string{ + "SHA256", + } +} + +// GetMappingDrsFileSummaryChecksumTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrsFileSummaryChecksumTypeEnum(val string) (DrsFileSummaryChecksumTypeEnum, bool) { + enum, ok := mappingDrsFileSummaryChecksumTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/drs_target.go b/jms/drs_target.go new file mode 100644 index 0000000000..a4f5348727 --- /dev/null +++ b/jms/drs_target.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrsTarget The target to manage DRS distribution. A target is a managed instance. +type DrsTarget struct { + + // OCID of the managed instance to manage DRS distribution. + ManagedInstanceId *string `mandatory:"true" json:"managedInstanceId"` +} + +func (m DrsTarget) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrsTarget) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/enable_drs_details.go b/jms/enable_drs_details.go new file mode 100644 index 0000000000..09f9d41fb5 --- /dev/null +++ b/jms/enable_drs_details.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnableDrsDetails Details of the request to enable DRS in active managed instance(s) in a Fleet. +// When the targets aren't specified, then all active managed instance(s) currently in the Fleet are selected. +type EnableDrsDetails struct { + ManageDrsDetails *ManageDrsDetails `mandatory:"false" json:"manageDrsDetails"` +} + +func (m EnableDrsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnableDrsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/enable_drs_request_response.go b/jms/enable_drs_request_response.go new file mode 100644 index 0000000000..24007d483b --- /dev/null +++ b/jms/enable_drs_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// EnableDrsRequest wrapper for the EnableDrs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/EnableDrs.go.html to see an example of how to use EnableDrsRequest. +type EnableDrsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // Detail information to enable DRS + EnableDrsDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // ETag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the ETag you + // provide matches the resource's current ETag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request EnableDrsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request EnableDrsRequest) 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 EnableDrsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request EnableDrsRequest) 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 EnableDrsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EnableDrsResponse wrapper for the EnableDrs operation +type EnableDrsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. + // You can use this to query the status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response EnableDrsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response EnableDrsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/export_duration.go b/jms/export_duration.go new file mode 100644 index 0000000000..534b279684 --- /dev/null +++ b/jms/export_duration.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "strings" +) + +// ExportDurationEnum Enum with underlying type: string +type ExportDurationEnum string + +// Set of constants representing the allowable values for ExportDurationEnum +const ( + ExportDurationLast30Days ExportDurationEnum = "LAST_30_DAYS" + ExportDurationLast60Days ExportDurationEnum = "LAST_60_DAYS" + ExportDurationLast90Days ExportDurationEnum = "LAST_90_DAYS" +) + +var mappingExportDurationEnum = map[string]ExportDurationEnum{ + "LAST_30_DAYS": ExportDurationLast30Days, + "LAST_60_DAYS": ExportDurationLast60Days, + "LAST_90_DAYS": ExportDurationLast90Days, +} + +var mappingExportDurationEnumLowerCase = map[string]ExportDurationEnum{ + "last_30_days": ExportDurationLast30Days, + "last_60_days": ExportDurationLast60Days, + "last_90_days": ExportDurationLast90Days, +} + +// GetExportDurationEnumValues Enumerates the set of values for ExportDurationEnum +func GetExportDurationEnumValues() []ExportDurationEnum { + values := make([]ExportDurationEnum, 0) + for _, v := range mappingExportDurationEnum { + values = append(values, v) + } + return values +} + +// GetExportDurationEnumStringValues Enumerates the set of values in String for ExportDurationEnum +func GetExportDurationEnumStringValues() []string { + return []string{ + "LAST_30_DAYS", + "LAST_60_DAYS", + "LAST_90_DAYS", + } +} + +// GetMappingExportDurationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExportDurationEnum(val string) (ExportDurationEnum, bool) { + enum, ok := mappingExportDurationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/export_frequency.go b/jms/export_frequency.go new file mode 100644 index 0000000000..09d9e9db52 --- /dev/null +++ b/jms/export_frequency.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "strings" +) + +// ExportFrequencyEnum Enum with underlying type: string +type ExportFrequencyEnum string + +// Set of constants representing the allowable values for ExportFrequencyEnum +const ( + ExportFrequencyDaily ExportFrequencyEnum = "DAILY" + ExportFrequencyWeekly ExportFrequencyEnum = "WEEKLY" + ExportFrequencyMonthly ExportFrequencyEnum = "MONTHLY" +) + +var mappingExportFrequencyEnum = map[string]ExportFrequencyEnum{ + "DAILY": ExportFrequencyDaily, + "WEEKLY": ExportFrequencyWeekly, + "MONTHLY": ExportFrequencyMonthly, +} + +var mappingExportFrequencyEnumLowerCase = map[string]ExportFrequencyEnum{ + "daily": ExportFrequencyDaily, + "weekly": ExportFrequencyWeekly, + "monthly": ExportFrequencyMonthly, +} + +// GetExportFrequencyEnumValues Enumerates the set of values for ExportFrequencyEnum +func GetExportFrequencyEnumValues() []ExportFrequencyEnum { + values := make([]ExportFrequencyEnum, 0) + for _, v := range mappingExportFrequencyEnum { + values = append(values, v) + } + return values +} + +// GetExportFrequencyEnumStringValues Enumerates the set of values in String for ExportFrequencyEnum +func GetExportFrequencyEnumStringValues() []string { + return []string{ + "DAILY", + "WEEKLY", + "MONTHLY", + } +} + +// GetMappingExportFrequencyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExportFrequencyEnum(val string) (ExportFrequencyEnum, bool) { + enum, ok := mappingExportFrequencyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/export_resources.go b/jms/export_resources.go new file mode 100644 index 0000000000..96bef67f6d --- /dev/null +++ b/jms/export_resources.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "strings" +) + +// ExportResourcesEnum Enum with underlying type: string +type ExportResourcesEnum string + +// Set of constants representing the allowable values for ExportResourcesEnum +const ( + ExportResourcesManagedInstance ExportResourcesEnum = "MANAGED_INSTANCE" + ExportResourcesManagedInstancePlusJavaRuntime ExportResourcesEnum = "MANAGED_INSTANCE_PLUS_JAVA_RUNTIME" + ExportResourcesManagedInstancePlusJavaRuntimePlusApplication ExportResourcesEnum = "MANAGED_INSTANCE_PLUS_JAVA_RUNTIME_PLUS_APPLICATION" +) + +var mappingExportResourcesEnum = map[string]ExportResourcesEnum{ + "MANAGED_INSTANCE": ExportResourcesManagedInstance, + "MANAGED_INSTANCE_PLUS_JAVA_RUNTIME": ExportResourcesManagedInstancePlusJavaRuntime, + "MANAGED_INSTANCE_PLUS_JAVA_RUNTIME_PLUS_APPLICATION": ExportResourcesManagedInstancePlusJavaRuntimePlusApplication, +} + +var mappingExportResourcesEnumLowerCase = map[string]ExportResourcesEnum{ + "managed_instance": ExportResourcesManagedInstance, + "managed_instance_plus_java_runtime": ExportResourcesManagedInstancePlusJavaRuntime, + "managed_instance_plus_java_runtime_plus_application": ExportResourcesManagedInstancePlusJavaRuntimePlusApplication, +} + +// GetExportResourcesEnumValues Enumerates the set of values for ExportResourcesEnum +func GetExportResourcesEnumValues() []ExportResourcesEnum { + values := make([]ExportResourcesEnum, 0) + for _, v := range mappingExportResourcesEnum { + values = append(values, v) + } + return values +} + +// GetExportResourcesEnumStringValues Enumerates the set of values in String for ExportResourcesEnum +func GetExportResourcesEnumStringValues() []string { + return []string{ + "MANAGED_INSTANCE", + "MANAGED_INSTANCE_PLUS_JAVA_RUNTIME", + "MANAGED_INSTANCE_PLUS_JAVA_RUNTIME_PLUS_APPLICATION", + } +} + +// GetMappingExportResourcesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExportResourcesEnum(val string) (ExportResourcesEnum, bool) { + enum, ok := mappingExportResourcesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/export_run_status.go b/jms/export_run_status.go new file mode 100644 index 0000000000..fbf25f7ba2 --- /dev/null +++ b/jms/export_run_status.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "strings" +) + +// ExportRunStatusEnum Enum with underlying type: string +type ExportRunStatusEnum string + +// Set of constants representing the allowable values for ExportRunStatusEnum +const ( + ExportRunStatusScheduled ExportRunStatusEnum = "SCHEDULED" + ExportRunStatusPending ExportRunStatusEnum = "PENDING" + ExportRunStatusInProgress ExportRunStatusEnum = "IN_PROGRESS" + ExportRunStatusFailed ExportRunStatusEnum = "FAILED" + ExportRunStatusRetrying ExportRunStatusEnum = "RETRYING" + ExportRunStatusSucceeded ExportRunStatusEnum = "SUCCEEDED" +) + +var mappingExportRunStatusEnum = map[string]ExportRunStatusEnum{ + "SCHEDULED": ExportRunStatusScheduled, + "PENDING": ExportRunStatusPending, + "IN_PROGRESS": ExportRunStatusInProgress, + "FAILED": ExportRunStatusFailed, + "RETRYING": ExportRunStatusRetrying, + "SUCCEEDED": ExportRunStatusSucceeded, +} + +var mappingExportRunStatusEnumLowerCase = map[string]ExportRunStatusEnum{ + "scheduled": ExportRunStatusScheduled, + "pending": ExportRunStatusPending, + "in_progress": ExportRunStatusInProgress, + "failed": ExportRunStatusFailed, + "retrying": ExportRunStatusRetrying, + "succeeded": ExportRunStatusSucceeded, +} + +// GetExportRunStatusEnumValues Enumerates the set of values for ExportRunStatusEnum +func GetExportRunStatusEnumValues() []ExportRunStatusEnum { + values := make([]ExportRunStatusEnum, 0) + for _, v := range mappingExportRunStatusEnum { + values = append(values, v) + } + return values +} + +// GetExportRunStatusEnumStringValues Enumerates the set of values in String for ExportRunStatusEnum +func GetExportRunStatusEnumStringValues() []string { + return []string{ + "SCHEDULED", + "PENDING", + "IN_PROGRESS", + "FAILED", + "RETRYING", + "SUCCEEDED", + } +} + +// GetMappingExportRunStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExportRunStatusEnum(val string) (ExportRunStatusEnum, bool) { + enum, ok := mappingExportRunStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/export_setting.go b/jms/export_setting.go new file mode 100644 index 0000000000..8425a307f5 --- /dev/null +++ b/jms/export_setting.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportSetting An export settings for JMS fleets. +type ExportSetting struct { + + // ExportSetting flag to store enabled or disabled status. + IsEnabled *bool `mandatory:"true" json:"isEnabled"` + + // The internal identifier of the export setting. + ExportSettingKey *string `mandatory:"false" json:"exportSettingKey"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + FleetId *string `mandatory:"false" json:"fleetId"` + + // The duration of data to be exported for fleets. + ExportDuration ExportDurationEnum `mandatory:"false" json:"exportDuration,omitempty"` + + // Resource to export data associated from the fleets. + ExportResources ExportResourcesEnum `mandatory:"false" json:"exportResources,omitempty"` + + // Acknowledgement for cross region target bucket configuration. + IsCrossRegionAcknowledged *bool `mandatory:"false" json:"isCrossRegionAcknowledged"` + + // The name of the bucket where data will be exported. + TargetBucketName *string `mandatory:"false" json:"targetBucketName"` + + // The namespace of the bucket where data will be exported. + TargetBucketNamespace *string `mandatory:"false" json:"targetBucketNamespace"` + + // The namespace of the bucket where data will be exported. + TargetBucketRegion *string `mandatory:"false" json:"targetBucketRegion"` + + // Schedule at which data will be exported. + ExportFrequency ExportFrequencyEnum `mandatory:"false" json:"exportFrequency,omitempty"` + + // The creation date and time of the export setting (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The update date and time of the export setting (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeLastModified *common.SDKTime `mandatory:"false" json:"timeLastModified"` +} + +func (m ExportSetting) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportSetting) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExportDurationEnum(string(m.ExportDuration)); !ok && m.ExportDuration != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportDuration: %s. Supported values are: %s.", m.ExportDuration, strings.Join(GetExportDurationEnumStringValues(), ","))) + } + if _, ok := GetMappingExportResourcesEnum(string(m.ExportResources)); !ok && m.ExportResources != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportResources: %s. Supported values are: %s.", m.ExportResources, strings.Join(GetExportResourcesEnumStringValues(), ","))) + } + if _, ok := GetMappingExportFrequencyEnum(string(m.ExportFrequency)); !ok && m.ExportFrequency != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportFrequency: %s. Supported values are: %s.", m.ExportFrequency, strings.Join(GetExportFrequencyEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/export_status.go b/jms/export_status.go new file mode 100644 index 0000000000..893bcabe6d --- /dev/null +++ b/jms/export_status.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportStatus Attributes of fleet's export status. +type ExportStatus struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + FleetId *string `mandatory:"true" json:"fleetId"` + + // The date and time of the last export run. + TimeLastRun *common.SDKTime `mandatory:"true" json:"timeLastRun"` + + // The date and time of the next export run. + TimeNextRun *common.SDKTime `mandatory:"true" json:"timeNextRun"` + + // The status of the latest export run. + LatestRunStatus ExportRunStatusEnum `mandatory:"true" json:"latestRunStatus"` +} + +func (m ExportStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingExportRunStatusEnum(string(m.LatestRunStatus)); !ok && m.LatestRunStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LatestRunStatus: %s. Supported values are: %s.", m.LatestRunStatus, strings.Join(GetExportRunStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/fleet.go b/jms/fleet.go index 8e20b5aabc..4c67bd343d 100644 --- a/jms/fleet.go +++ b/jms/fleet.go @@ -64,6 +64,9 @@ type Fleet struct { // Deprecated, use `/fleets/{fleetId}/advanceFeatureConfiguration` API instead. IsAdvancedFeaturesEnabled *bool `mandatory:"false" json:"isAdvancedFeaturesEnabled"` + // Whether or not export setting is enabled in this Fleet. + IsExportSettingEnabled *bool `mandatory:"false" json:"isExportSettingEnabled"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` diff --git a/jms/fleet_agent_configuration.go b/jms/fleet_agent_configuration.go index 6e80b22959..48c9b9c343 100644 --- a/jms/fleet_agent_configuration.go +++ b/jms/fleet_agent_configuration.go @@ -28,6 +28,8 @@ type FleetAgentConfiguration struct { WindowsConfiguration *FleetAgentOsConfiguration `mandatory:"true" json:"windowsConfiguration"` + MacOsConfiguration *FleetAgentOsConfiguration `mandatory:"true" json:"macOsConfiguration"` + // The date and time of the last modification to the Fleet Agent Configuration (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). TimeLastModified *common.SDKTime `mandatory:"true" json:"timeLastModified"` diff --git a/jms/fleet_summary.go b/jms/fleet_summary.go index d56171a053..c326f0ca38 100644 --- a/jms/fleet_summary.go +++ b/jms/fleet_summary.go @@ -65,6 +65,9 @@ type FleetSummary struct { // This flag is true if any one of the advanced features is turned on. IsAdvancedFeaturesEnabled *bool `mandatory:"false" json:"isAdvancedFeaturesEnabled"` + // Whether or not export setting is enabled in this Fleet. + IsExportSettingEnabled *bool `mandatory:"false" json:"isExportSettingEnabled"` + // Defined tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` diff --git a/jms/get_drs_file_request_response.go b/jms/get_drs_file_request_response.go new file mode 100644 index 0000000000..5536d027b7 --- /dev/null +++ b/jms/get_drs_file_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDrsFileRequest wrapper for the GetDrsFile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetDrsFile.go.html to see an example of how to use GetDrsFileRequest. +type GetDrsFileRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The unique identifier of the DRS File in Object Storage. + DrsFileKey *string `mandatory:"true" contributesTo:"path" name:"drsFileKey"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDrsFileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDrsFileRequest) 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 GetDrsFileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrsFileRequest) 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 GetDrsFileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDrsFileResponse wrapper for the GetDrsFile operation +type GetDrsFileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of DrsFile instances + DrsFile `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 GetDrsFileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDrsFileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/get_export_setting_request_response.go b/jms/get_export_setting_request_response.go new file mode 100644 index 0000000000..a518d31268 --- /dev/null +++ b/jms/get_export_setting_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetExportSettingRequest wrapper for the GetExportSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetExportSetting.go.html to see an example of how to use GetExportSettingRequest. +type GetExportSettingRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The 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 GetExportSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExportSettingRequest) 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 GetExportSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExportSettingRequest) 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 GetExportSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetExportSettingResponse wrapper for the GetExportSetting operation +type GetExportSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportSetting instance + ExportSetting `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 GetExportSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExportSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/get_export_status_request_response.go b/jms/get_export_status_request_response.go new file mode 100644 index 0000000000..0142ac7264 --- /dev/null +++ b/jms/get_export_status_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetExportStatusRequest wrapper for the GetExportStatus operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetExportStatus.go.html to see an example of how to use GetExportStatusRequest. +type GetExportStatusRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The 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 GetExportStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExportStatusRequest) 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 GetExportStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExportStatusRequest) 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 GetExportStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetExportStatusResponse wrapper for the GetExportStatus operation +type GetExportStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportStatus instance + ExportStatus `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 GetExportStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExportStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/java_artifact.go b/jms/java_artifact.go index 81e8c38b2f..5189056b6c 100644 --- a/jms/java_artifact.go +++ b/jms/java_artifact.go @@ -32,6 +32,34 @@ type JavaArtifact struct { // SHA256 checksum of the artifact. Sha256 *string `mandatory:"true" json:"sha256"` + + // The target Operating System family for the artifact. + OsFamily *string `mandatory:"true" json:"osFamily"` + + // The target Operating System architecture for the artifact. + Architecture *string `mandatory:"true" json:"architecture"` + + // The package type(typically the file extension) of the artifact. + PackageType *string `mandatory:"true" json:"packageType"` + + // The endpoint that returns a short-lived artifact download URL in the response payload. + // This download url can then be used for downloading the artifact. + // See this API (https://docs.oracle.com/en-us/iaas/api/#/en/jms/20230601/JavaArtifact/GenerateArtifactDownloadUrl) for more details. + DownloadUrl *string `mandatory:"true" json:"downloadUrl"` + + // The endpoint for downloading this artifact from command line, automatically in scripts and dockerfiles. + // Depending on the context, this can point to the archive or latest update release version artifact in the specified family. + ScriptDownloadUrl *string `mandatory:"true" json:"scriptDownloadUrl"` + + // The URL for retrieving the checksum for the artifact. + // Depending on the context, this can point to the checksum of the archive or latest update release version artifact. + ScriptChecksumUrl *string `mandatory:"true" json:"scriptChecksumUrl"` + + // The file name of the artifact. + ArtifactFileName *string `mandatory:"false" json:"artifactFileName"` + + // Additional information about the package type. + PackageTypeDetail *string `mandatory:"false" json:"packageTypeDetail"` } func (m JavaArtifact) String() string { diff --git a/jms/java_family.go b/jms/java_family.go index c42749e4dc..bdc8a9b683 100644 --- a/jms/java_family.go +++ b/jms/java_family.go @@ -33,6 +33,17 @@ type JavaFamily struct { // Link to access the documentation for the release. DocUrl *string `mandatory:"true" json:"docUrl"` + + // Latest Java release version in the family. + LatestReleaseVersion *string `mandatory:"true" json:"latestReleaseVersion"` + + // Whether or not this Java release family is under active support. + // Refer Java Support Roadmap (https://www.oracle.com/java/technologies/java-se-support-roadmap.html) for more details. + IsSupportedVersion *bool `mandatory:"true" json:"isSupportedVersion"` + + // List of artifacts for the latest Java release version in this family. + // The script URLs in the response can be used from a command line, or in scripts and dockerfiles to always get the artifacts corresponding to the latest update release version. + LatestReleaseArtifacts []JavaArtifact `mandatory:"false" json:"latestReleaseArtifacts"` } func (m JavaFamily) String() string { diff --git a/jms/java_family_summary.go b/jms/java_family_summary.go index dca87ed7c0..7a2b222ddf 100644 --- a/jms/java_family_summary.go +++ b/jms/java_family_summary.go @@ -33,6 +33,13 @@ type JavaFamilySummary struct { // Link to access the documentation for the release. DocUrl *string `mandatory:"true" json:"docUrl"` + + // Latest Java release version in the family. + LatestReleaseVersion *string `mandatory:"true" json:"latestReleaseVersion"` + + // Whether or not this Java release family is under active support. + // Refer Java Support Roadmap (https://www.oracle.com/java/technologies/java-se-support-roadmap.html) for more details. + IsSupportedVersion *bool `mandatory:"true" json:"isSupportedVersion"` } func (m JavaFamilySummary) String() string { diff --git a/jms/java_migration_analysis_result.go b/jms/java_migration_analysis_result.go index 5eb8645e8c..89faa0b4e5 100644 --- a/jms/java_migration_analysis_result.go +++ b/jms/java_migration_analysis_result.go @@ -57,6 +57,9 @@ type JavaMigrationAnalysisResult struct { // The OCID of the work request of this analysis. WorkRequestId *string `mandatory:"false" json:"workRequestId"` + // The unique key that identifies the application. + ApplicationKey *string `mandatory:"false" json:"applicationKey"` + // The managed instance OCID. ManagedInstanceId *string `mandatory:"false" json:"managedInstanceId"` diff --git a/jms/java_migration_analysis_result_summary.go b/jms/java_migration_analysis_result_summary.go index f4c379e193..94030cbc2d 100644 --- a/jms/java_migration_analysis_result_summary.go +++ b/jms/java_migration_analysis_result_summary.go @@ -57,6 +57,9 @@ type JavaMigrationAnalysisResultSummary struct { // The OCID of the work request of this analysis. WorkRequestId *string `mandatory:"false" json:"workRequestId"` + // The unique key that identifies the application. + ApplicationKey *string `mandatory:"false" json:"applicationKey"` + // The managed instance OCID. ManagedInstanceId *string `mandatory:"false" json:"managedInstanceId"` diff --git a/jms/java_release.go b/jms/java_release.go index e905f5f2f5..9cfe2820ea 100644 --- a/jms/java_release.go +++ b/jms/java_release.go @@ -49,6 +49,13 @@ type JavaRelease struct { LicenseDetails *JavaLicense `mandatory:"false" json:"licenseDetails"` + // List of My Oracle Support(MoS) patches available for this release. + // This information is only available for `BPR` release type. + MosPatches []PatchDetail `mandatory:"false" json:"mosPatches"` + + // The number of days since this release has been under the security baseline. + DaysUnderSecurityBaseline *int `mandatory:"false" json:"daysUnderSecurityBaseline"` + // List of Java artifacts. Artifacts []JavaArtifact `mandatory:"false" json:"artifacts"` } diff --git a/jms/java_release_summary.go b/jms/java_release_summary.go index 6f65ae7d18..f72dd87f33 100644 --- a/jms/java_release_summary.go +++ b/jms/java_release_summary.go @@ -48,6 +48,13 @@ type JavaReleaseSummary struct { FamilyDetails *JavaFamily `mandatory:"false" json:"familyDetails"` LicenseDetails *JavaLicense `mandatory:"false" json:"licenseDetails"` + + // List of My Oracle Support(MoS) patches available for this release. + // This information is only available for `BPR` release type. + MosPatches []PatchDetail `mandatory:"false" json:"mosPatches"` + + // The number of days since this release has been under the security baseline. + DaysUnderSecurityBaseline *int `mandatory:"false" json:"daysUnderSecurityBaseline"` } func (m JavaReleaseSummary) String() string { diff --git a/jms/jms_javamanagementservice_client.go b/jms/jms_javamanagementservice_client.go index 29f1a1eb3d..2f74e0aaad 100644 --- a/jms/jms_javamanagementservice_client.go +++ b/jms/jms_javamanagementservice_client.go @@ -338,6 +338,69 @@ func (client JavaManagementServiceClient) createBlocklist(ctx context.Context, r return response, err } +// CreateDrsFile Request to perform validaition of the DRS file and create the file to the Object Storage. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/CreateDrsFile.go.html to see an example of how to use CreateDrsFile API. +// A default retry strategy applies to this operation CreateDrsFile() +func (client JavaManagementServiceClient) CreateDrsFile(ctx context.Context, request CreateDrsFileRequest) (response CreateDrsFileResponse, 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.createDrsFile, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDrsFileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDrsFileResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDrsFileResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDrsFileResponse") + } + return +} + +// createDrsFile implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) createDrsFile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fleets/{fleetId}/drsFiles", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateDrsFileResponse + 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/jms/20210610/Fleet/CreateDrsFile" + err = common.PostProcessServiceError(err, "JavaManagementService", "CreateDrsFile", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateFleet Create a new Fleet using the information provided. // `inventoryLog` is now a required parameter for CreateFleet API. // Update existing applications using this API @@ -522,6 +585,64 @@ func (client JavaManagementServiceClient) deleteCryptoAnalysisResult(ctx context return response, err } +// DeleteDrsFile Request to delete the DRS file from the Object Storage. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/DeleteDrsFile.go.html to see an example of how to use DeleteDrsFile API. +// A default retry strategy applies to this operation DeleteDrsFile() +func (client JavaManagementServiceClient) DeleteDrsFile(ctx context.Context, request DeleteDrsFileRequest) (response DeleteDrsFileResponse, 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.deleteDrsFile, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDrsFileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDrsFileResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDrsFileResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDrsFileResponse") + } + return +} + +// deleteDrsFile implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) deleteDrsFile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fleets/{fleetId}/drsFiles/{drsFileKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteDrsFileResponse + 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/jms/20210610/DrsFile/DeleteDrsFile" + err = common.PostProcessServiceError(err, "JavaManagementService", "DeleteDrsFile", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteFleet Deletes the Fleet specified by an identifier. // // # See also @@ -696,6 +817,132 @@ func (client JavaManagementServiceClient) deletePerformanceTuningAnalysisResult( return response, err } +// DisableDrs Request to disable the DRS in the selected target in the Fleet. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/DisableDrs.go.html to see an example of how to use DisableDrs API. +// A default retry strategy applies to this operation DisableDrs() +func (client JavaManagementServiceClient) DisableDrs(ctx context.Context, request DisableDrsRequest) (response DisableDrsResponse, 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.disableDrs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DisableDrsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DisableDrsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DisableDrsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DisableDrsResponse") + } + return +} + +// disableDrs implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) disableDrs(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/disableDrs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DisableDrsResponse + 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/jms/20210610/Fleet/DisableDrs" + err = common.PostProcessServiceError(err, "JavaManagementService", "DisableDrs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// EnableDrs Request to enable the DRS in the selected target in the Fleet. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/EnableDrs.go.html to see an example of how to use EnableDrs API. +// A default retry strategy applies to this operation EnableDrs() +func (client JavaManagementServiceClient) EnableDrs(ctx context.Context, request EnableDrsRequest) (response EnableDrsResponse, 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.enableDrs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = EnableDrsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = EnableDrsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(EnableDrsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into EnableDrsResponse") + } + return +} + +// enableDrs implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) enableDrs(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/enableDrs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response EnableDrsResponse + 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/jms/20210610/Fleet/EnableDrs" + err = common.PostProcessServiceError(err, "JavaManagementService", "EnableDrs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GenerateAgentDeployScript Generates Agent Deploy Script for Fleet using the information provided. // // # See also @@ -811,6 +1058,180 @@ func (client JavaManagementServiceClient) getCryptoAnalysisResult(ctx context.Co return response, err } +// GetDrsFile Get the detail about the created DRS file in the Fleet. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetDrsFile.go.html to see an example of how to use GetDrsFile API. +// A default retry strategy applies to this operation GetDrsFile() +func (client JavaManagementServiceClient) GetDrsFile(ctx context.Context, request GetDrsFileRequest) (response GetDrsFileResponse, 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.getDrsFile, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDrsFileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDrsFileResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDrsFileResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrsFileResponse") + } + return +} + +// getDrsFile implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) getDrsFile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/drsFiles/{drsFileKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDrsFileResponse + 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/jms/20210610/DrsFile/GetDrsFile" + err = common.PostProcessServiceError(err, "JavaManagementService", "GetDrsFile", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExportSetting Returns export setting for the specified Fleet. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetExportSetting.go.html to see an example of how to use GetExportSetting API. +// A default retry strategy applies to this operation GetExportSetting() +func (client JavaManagementServiceClient) GetExportSetting(ctx context.Context, request GetExportSettingRequest) (response GetExportSettingResponse, 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.getExportSetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetExportSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetExportSettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetExportSettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExportSettingResponse") + } + return +} + +// getExportSetting implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) getExportSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/exportSetting", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetExportSettingResponse + 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/jms/20210610/ExportSetting/GetExportSetting" + err = common.PostProcessServiceError(err, "JavaManagementService", "GetExportSetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExportStatus Returns last export status for the specified Fleet. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/GetExportStatus.go.html to see an example of how to use GetExportStatus API. +// A default retry strategy applies to this operation GetExportStatus() +func (client JavaManagementServiceClient) GetExportStatus(ctx context.Context, request GetExportStatusRequest) (response GetExportStatusResponse, 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.getExportStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetExportStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetExportStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetExportStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExportStatusResponse") + } + return +} + +// getExportStatus implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) getExportStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/exportStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetExportStatusResponse + 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/jms/20210610/ExportStatus/GetExportStatus" + err = common.PostProcessServiceError(err, "JavaManagementService", "GetExportStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetFleet Retrieve a Fleet with the specified identifier. // // # See also @@ -1449,6 +1870,64 @@ func (client JavaManagementServiceClient) listCryptoAnalysisResults(ctx context. return response, err } +// ListDrsFiles List the details about the created DRS files in the Fleet. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/ListDrsFiles.go.html to see an example of how to use ListDrsFiles API. +// A default retry strategy applies to this operation ListDrsFiles() +func (client JavaManagementServiceClient) ListDrsFiles(ctx context.Context, request ListDrsFilesRequest) (response ListDrsFilesResponse, 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.listDrsFiles, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDrsFilesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDrsFilesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDrsFilesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrsFilesResponse") + } + return +} + +// listDrsFiles implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) listDrsFiles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fleets/{fleetId}/drsFiles", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListDrsFilesResponse + 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/jms/20210610/DrsFileCollection/ListDrsFiles" + err = common.PostProcessServiceError(err, "JavaManagementService", "ListDrsFiles", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListFleetDiagnoses List potential diagnoses that would put a fleet into FAILED or NEEDS_ATTENTION lifecycle state. // // # See also @@ -3208,6 +3687,127 @@ func (client JavaManagementServiceClient) summarizeResourceInventory(ctx context return response, err } +// UpdateDrsFile Request to perform validaition of the DRS file and update the existing file in the Object Storage. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/UpdateDrsFile.go.html to see an example of how to use UpdateDrsFile API. +// A default retry strategy applies to this operation UpdateDrsFile() +func (client JavaManagementServiceClient) UpdateDrsFile(ctx context.Context, request UpdateDrsFileRequest) (response UpdateDrsFileResponse, 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.updateDrsFile, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDrsFileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDrsFileResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDrsFileResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrsFileResponse") + } + return +} + +// updateDrsFile implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) updateDrsFile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fleets/{fleetId}/drsFiles/{drsFileKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateDrsFileResponse + 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/jms/20210610/Fleet/UpdateDrsFile" + err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateDrsFile", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateExportSetting Updates existing export setting for the specified Fleet. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/UpdateExportSetting.go.html to see an example of how to use UpdateExportSetting API. +// A default retry strategy applies to this operation UpdateExportSetting() +func (client JavaManagementServiceClient) UpdateExportSetting(ctx context.Context, request UpdateExportSettingRequest) (response UpdateExportSettingResponse, 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.updateExportSetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateExportSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateExportSettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateExportSettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateExportSettingResponse") + } + return +} + +// updateExportSetting implements the OCIOperation interface (enables retrying operations) +func (client JavaManagementServiceClient) updateExportSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fleets/{fleetId}/exportSetting", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateExportSettingResponse + 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/jms/20210610/ExportSetting/UpdateExportSetting" + err = common.PostProcessServiceError(err, "JavaManagementService", "UpdateExportSetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateFleet Update the Fleet specified by an identifier. // // # See also diff --git a/jms/lcm_work_item_details.go b/jms/lcm_work_item_details.go new file mode 100644 index 0000000000..a3aa16b3d2 --- /dev/null +++ b/jms/lcm_work_item_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LcmWorkItemDetails The work item details with LCM related information. +type LcmWorkItemDetails struct { + PostInstallationActions *PostInstallationActionSettings `mandatory:"false" json:"postInstallationActions"` + + // The work item type. + WorkItemType WorkItemTypeEnum `mandatory:"false" json:"workItemType,omitempty"` +} + +// GetWorkItemType returns WorkItemType +func (m LcmWorkItemDetails) GetWorkItemType() WorkItemTypeEnum { + return m.WorkItemType +} + +func (m LcmWorkItemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LcmWorkItemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkItemTypeEnum(string(m.WorkItemType)); !ok && m.WorkItemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for WorkItemType: %s. Supported values are: %s.", m.WorkItemType, strings.Join(GetWorkItemTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LcmWorkItemDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLcmWorkItemDetails LcmWorkItemDetails + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeLcmWorkItemDetails + }{ + "LCM", + (MarshalTypeLcmWorkItemDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/jms/list_blocklists_request_response.go b/jms/list_blocklists_request_response.go index 37a3a6a089..42871fffe3 100644 --- a/jms/list_blocklists_request_response.go +++ b/jms/list_blocklists_request_response.go @@ -139,8 +139,15 @@ const ( ListBlocklistsOperationRequestCryptoEventAnalysis ListBlocklistsOperationEnum = "REQUEST_CRYPTO_EVENT_ANALYSIS" ListBlocklistsOperationRequestPerformanceTuningAnalysis ListBlocklistsOperationEnum = "REQUEST_PERFORMANCE_TUNING_ANALYSIS" ListBlocklistsOperationRequestJavaMigrationAnalysis ListBlocklistsOperationEnum = "REQUEST_JAVA_MIGRATION_ANALYSIS" + ListBlocklistsOperationDeleteJmsReport ListBlocklistsOperationEnum = "DELETE_JMS_REPORT" ListBlocklistsOperationScanJavaServerUsage ListBlocklistsOperationEnum = "SCAN_JAVA_SERVER_USAGE" ListBlocklistsOperationScanLibraryUsage ListBlocklistsOperationEnum = "SCAN_LIBRARY_USAGE" + ListBlocklistsOperationExportDataCsv ListBlocklistsOperationEnum = "EXPORT_DATA_CSV" + ListBlocklistsOperationCreateDrsFile ListBlocklistsOperationEnum = "CREATE_DRS_FILE" + ListBlocklistsOperationUpdateDrsFile ListBlocklistsOperationEnum = "UPDATE_DRS_FILE" + ListBlocklistsOperationDeleteDrsFile ListBlocklistsOperationEnum = "DELETE_DRS_FILE" + ListBlocklistsOperationEnableDrs ListBlocklistsOperationEnum = "ENABLE_DRS" + ListBlocklistsOperationDisableDrs ListBlocklistsOperationEnum = "DISABLE_DRS" ) var mappingListBlocklistsOperationEnum = map[string]ListBlocklistsOperationEnum{ @@ -155,8 +162,15 @@ var mappingListBlocklistsOperationEnum = map[string]ListBlocklistsOperationEnum{ "REQUEST_CRYPTO_EVENT_ANALYSIS": ListBlocklistsOperationRequestCryptoEventAnalysis, "REQUEST_PERFORMANCE_TUNING_ANALYSIS": ListBlocklistsOperationRequestPerformanceTuningAnalysis, "REQUEST_JAVA_MIGRATION_ANALYSIS": ListBlocklistsOperationRequestJavaMigrationAnalysis, + "DELETE_JMS_REPORT": ListBlocklistsOperationDeleteJmsReport, "SCAN_JAVA_SERVER_USAGE": ListBlocklistsOperationScanJavaServerUsage, "SCAN_LIBRARY_USAGE": ListBlocklistsOperationScanLibraryUsage, + "EXPORT_DATA_CSV": ListBlocklistsOperationExportDataCsv, + "CREATE_DRS_FILE": ListBlocklistsOperationCreateDrsFile, + "UPDATE_DRS_FILE": ListBlocklistsOperationUpdateDrsFile, + "DELETE_DRS_FILE": ListBlocklistsOperationDeleteDrsFile, + "ENABLE_DRS": ListBlocklistsOperationEnableDrs, + "DISABLE_DRS": ListBlocklistsOperationDisableDrs, } var mappingListBlocklistsOperationEnumLowerCase = map[string]ListBlocklistsOperationEnum{ @@ -171,8 +185,15 @@ var mappingListBlocklistsOperationEnumLowerCase = map[string]ListBlocklistsOpera "request_crypto_event_analysis": ListBlocklistsOperationRequestCryptoEventAnalysis, "request_performance_tuning_analysis": ListBlocklistsOperationRequestPerformanceTuningAnalysis, "request_java_migration_analysis": ListBlocklistsOperationRequestJavaMigrationAnalysis, + "delete_jms_report": ListBlocklistsOperationDeleteJmsReport, "scan_java_server_usage": ListBlocklistsOperationScanJavaServerUsage, "scan_library_usage": ListBlocklistsOperationScanLibraryUsage, + "export_data_csv": ListBlocklistsOperationExportDataCsv, + "create_drs_file": ListBlocklistsOperationCreateDrsFile, + "update_drs_file": ListBlocklistsOperationUpdateDrsFile, + "delete_drs_file": ListBlocklistsOperationDeleteDrsFile, + "enable_drs": ListBlocklistsOperationEnableDrs, + "disable_drs": ListBlocklistsOperationDisableDrs, } // GetListBlocklistsOperationEnumValues Enumerates the set of values for ListBlocklistsOperationEnum @@ -198,8 +219,15 @@ func GetListBlocklistsOperationEnumStringValues() []string { "REQUEST_CRYPTO_EVENT_ANALYSIS", "REQUEST_PERFORMANCE_TUNING_ANALYSIS", "REQUEST_JAVA_MIGRATION_ANALYSIS", + "DELETE_JMS_REPORT", "SCAN_JAVA_SERVER_USAGE", "SCAN_LIBRARY_USAGE", + "EXPORT_DATA_CSV", + "CREATE_DRS_FILE", + "UPDATE_DRS_FILE", + "DELETE_DRS_FILE", + "ENABLE_DRS", + "DISABLE_DRS", } } diff --git a/jms/list_drs_files_request_response.go b/jms/list_drs_files_request_response.go new file mode 100644 index 0000000000..5e8f1235a4 --- /dev/null +++ b/jms/list_drs_files_request_response.go @@ -0,0 +1,215 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDrsFilesRequest wrapper for the ListDrsFiles operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/ListDrsFiles.go.html to see an example of how to use ListDrsFilesRequest. +type ListDrsFilesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListDrsFilesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field that sorts the DRS details results. Only one sort order can be provided. + // The default order for _drsFileKey_ is **descending**. + // If no value is specified, then _drsFileKey_ is default. + SortBy ListDrsFilesSortByEnum `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 ListDrsFilesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDrsFilesRequest) 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 ListDrsFilesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrsFilesRequest) 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 ListDrsFilesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDrsFilesSortOrderEnum(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(GetListDrsFilesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListDrsFilesSortByEnum(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(GetListDrsFilesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDrsFilesResponse wrapper for the ListDrsFiles operation +type ListDrsFilesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of DrsFileCollection instances + DrsFileCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListDrsFilesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDrsFilesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDrsFilesSortOrderEnum Enum with underlying type: string +type ListDrsFilesSortOrderEnum string + +// Set of constants representing the allowable values for ListDrsFilesSortOrderEnum +const ( + ListDrsFilesSortOrderAsc ListDrsFilesSortOrderEnum = "ASC" + ListDrsFilesSortOrderDesc ListDrsFilesSortOrderEnum = "DESC" +) + +var mappingListDrsFilesSortOrderEnum = map[string]ListDrsFilesSortOrderEnum{ + "ASC": ListDrsFilesSortOrderAsc, + "DESC": ListDrsFilesSortOrderDesc, +} + +var mappingListDrsFilesSortOrderEnumLowerCase = map[string]ListDrsFilesSortOrderEnum{ + "asc": ListDrsFilesSortOrderAsc, + "desc": ListDrsFilesSortOrderDesc, +} + +// GetListDrsFilesSortOrderEnumValues Enumerates the set of values for ListDrsFilesSortOrderEnum +func GetListDrsFilesSortOrderEnumValues() []ListDrsFilesSortOrderEnum { + values := make([]ListDrsFilesSortOrderEnum, 0) + for _, v := range mappingListDrsFilesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDrsFilesSortOrderEnumStringValues Enumerates the set of values in String for ListDrsFilesSortOrderEnum +func GetListDrsFilesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDrsFilesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrsFilesSortOrderEnum(val string) (ListDrsFilesSortOrderEnum, bool) { + enum, ok := mappingListDrsFilesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDrsFilesSortByEnum Enum with underlying type: string +type ListDrsFilesSortByEnum string + +// Set of constants representing the allowable values for ListDrsFilesSortByEnum +const ( + ListDrsFilesSortByBucketname ListDrsFilesSortByEnum = "bucketName" + ListDrsFilesSortByNamespace ListDrsFilesSortByEnum = "namespace" + ListDrsFilesSortByDrsfilekey ListDrsFilesSortByEnum = "drsFileKey" + ListDrsFilesSortByDrsfilename ListDrsFilesSortByEnum = "drsFileName" + ListDrsFilesSortByChecksumtype ListDrsFilesSortByEnum = "checksumType" + ListDrsFilesSortByIsdefault ListDrsFilesSortByEnum = "isDefault" +) + +var mappingListDrsFilesSortByEnum = map[string]ListDrsFilesSortByEnum{ + "bucketName": ListDrsFilesSortByBucketname, + "namespace": ListDrsFilesSortByNamespace, + "drsFileKey": ListDrsFilesSortByDrsfilekey, + "drsFileName": ListDrsFilesSortByDrsfilename, + "checksumType": ListDrsFilesSortByChecksumtype, + "isDefault": ListDrsFilesSortByIsdefault, +} + +var mappingListDrsFilesSortByEnumLowerCase = map[string]ListDrsFilesSortByEnum{ + "bucketname": ListDrsFilesSortByBucketname, + "namespace": ListDrsFilesSortByNamespace, + "drsfilekey": ListDrsFilesSortByDrsfilekey, + "drsfilename": ListDrsFilesSortByDrsfilename, + "checksumtype": ListDrsFilesSortByChecksumtype, + "isdefault": ListDrsFilesSortByIsdefault, +} + +// GetListDrsFilesSortByEnumValues Enumerates the set of values for ListDrsFilesSortByEnum +func GetListDrsFilesSortByEnumValues() []ListDrsFilesSortByEnum { + values := make([]ListDrsFilesSortByEnum, 0) + for _, v := range mappingListDrsFilesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDrsFilesSortByEnumStringValues Enumerates the set of values in String for ListDrsFilesSortByEnum +func GetListDrsFilesSortByEnumStringValues() []string { + return []string{ + "bucketName", + "namespace", + "drsFileKey", + "drsFileName", + "checksumType", + "isDefault", + } +} + +// GetMappingListDrsFilesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrsFilesSortByEnum(val string) (ListDrsFilesSortByEnum, bool) { + enum, ok := mappingListDrsFilesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jms/list_java_families_request_response.go b/jms/list_java_families_request_response.go index ff21f38d09..7001ab3571 100644 --- a/jms/list_java_families_request_response.go +++ b/jms/list_java_families_request_response.go @@ -24,6 +24,9 @@ type ListJavaFamiliesRequest struct { // The display name for the Java family. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + // Filter the Java Release Family versions by support status. + IsSupportedVersion *bool `mandatory:"false" contributesTo:"query" name:"isSupportedVersion"` + // The maximum number of items to return. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` diff --git a/jms/list_work_requests_request_response.go b/jms/list_work_requests_request_response.go index 1a3daf9e5b..e7ee704cff 100644 --- a/jms/list_work_requests_request_response.go +++ b/jms/list_work_requests_request_response.go @@ -36,6 +36,9 @@ type ListWorkRequestsRequest struct { // The maximum number of items to return. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + // The Fleet-unique identifier of the managed instance. + ManagedInstanceId *string `mandatory:"false" contributesTo:"query" name:"managedInstanceId"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/jms/manage_drs_details.go b/jms/manage_drs_details.go new file mode 100644 index 0000000000..8b17fab7b3 --- /dev/null +++ b/jms/manage_drs_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManageDrsDetails Details of the request to manage DRS in active managed instance(s) in a Fleet. +// When the targets aren't specified, then all active managed instance(s) currently in the Fleet are selected. +type ManageDrsDetails struct { + + // The targets to manage DRS. + Targets []DrsTarget `mandatory:"false" json:"targets"` +} + +func (m ManageDrsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManageDrsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/managed_instance_usage.go b/jms/managed_instance_usage.go index 576d3aa7ab..04428da4c3 100644 --- a/jms/managed_instance_usage.go +++ b/jms/managed_instance_usage.go @@ -35,6 +35,8 @@ type ManagedInstanceUsage struct { OperatingSystem *OperatingSystem `mandatory:"false" json:"operatingSystem"` + Agent *Agent `mandatory:"false" json:"agent"` + // The approximate count of applications reported by this managed instance. ApproximateApplicationCount *int `mandatory:"false" json:"approximateApplicationCount"` @@ -44,6 +46,9 @@ type ManagedInstanceUsage struct { // The approximate count of Java Runtimes reported by this managed instance. ApproximateJreCount *int `mandatory:"false" json:"approximateJreCount"` + // DRS file status + DrsFileStatus DrsFileStatusEnum `mandatory:"false" json:"drsFileStatus,omitempty"` + // Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` @@ -76,6 +81,9 @@ func (m ManagedInstanceUsage) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ManagedInstanceType: %s. Supported values are: %s.", m.ManagedInstanceType, strings.Join(GetManagedInstanceTypeEnumStringValues(), ","))) } + if _, ok := GetMappingDrsFileStatusEnum(string(m.DrsFileStatus)); !ok && m.DrsFileStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DrsFileStatus: %s. Supported values are: %s.", m.DrsFileStatus, strings.Join(GetDrsFileStatusEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/jms/operation_type.go b/jms/operation_type.go index 482ea207cc..6e7254a575 100644 --- a/jms/operation_type.go +++ b/jms/operation_type.go @@ -29,8 +29,15 @@ const ( OperationTypeRequestCryptoEventAnalysis OperationTypeEnum = "REQUEST_CRYPTO_EVENT_ANALYSIS" OperationTypeRequestPerformanceTuningAnalysis OperationTypeEnum = "REQUEST_PERFORMANCE_TUNING_ANALYSIS" OperationTypeRequestJavaMigrationAnalysis OperationTypeEnum = "REQUEST_JAVA_MIGRATION_ANALYSIS" + OperationTypeDeleteJmsReport OperationTypeEnum = "DELETE_JMS_REPORT" OperationTypeScanJavaServerUsage OperationTypeEnum = "SCAN_JAVA_SERVER_USAGE" OperationTypeScanLibraryUsage OperationTypeEnum = "SCAN_LIBRARY_USAGE" + OperationTypeExportDataCsv OperationTypeEnum = "EXPORT_DATA_CSV" + OperationTypeCreateDrsFile OperationTypeEnum = "CREATE_DRS_FILE" + OperationTypeUpdateDrsFile OperationTypeEnum = "UPDATE_DRS_FILE" + OperationTypeDeleteDrsFile OperationTypeEnum = "DELETE_DRS_FILE" + OperationTypeEnableDrs OperationTypeEnum = "ENABLE_DRS" + OperationTypeDisableDrs OperationTypeEnum = "DISABLE_DRS" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -45,8 +52,15 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "REQUEST_CRYPTO_EVENT_ANALYSIS": OperationTypeRequestCryptoEventAnalysis, "REQUEST_PERFORMANCE_TUNING_ANALYSIS": OperationTypeRequestPerformanceTuningAnalysis, "REQUEST_JAVA_MIGRATION_ANALYSIS": OperationTypeRequestJavaMigrationAnalysis, + "DELETE_JMS_REPORT": OperationTypeDeleteJmsReport, "SCAN_JAVA_SERVER_USAGE": OperationTypeScanJavaServerUsage, "SCAN_LIBRARY_USAGE": OperationTypeScanLibraryUsage, + "EXPORT_DATA_CSV": OperationTypeExportDataCsv, + "CREATE_DRS_FILE": OperationTypeCreateDrsFile, + "UPDATE_DRS_FILE": OperationTypeUpdateDrsFile, + "DELETE_DRS_FILE": OperationTypeDeleteDrsFile, + "ENABLE_DRS": OperationTypeEnableDrs, + "DISABLE_DRS": OperationTypeDisableDrs, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -61,8 +75,15 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "request_crypto_event_analysis": OperationTypeRequestCryptoEventAnalysis, "request_performance_tuning_analysis": OperationTypeRequestPerformanceTuningAnalysis, "request_java_migration_analysis": OperationTypeRequestJavaMigrationAnalysis, + "delete_jms_report": OperationTypeDeleteJmsReport, "scan_java_server_usage": OperationTypeScanJavaServerUsage, "scan_library_usage": OperationTypeScanLibraryUsage, + "export_data_csv": OperationTypeExportDataCsv, + "create_drs_file": OperationTypeCreateDrsFile, + "update_drs_file": OperationTypeUpdateDrsFile, + "delete_drs_file": OperationTypeDeleteDrsFile, + "enable_drs": OperationTypeEnableDrs, + "disable_drs": OperationTypeDisableDrs, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -88,8 +109,15 @@ func GetOperationTypeEnumStringValues() []string { "REQUEST_CRYPTO_EVENT_ANALYSIS", "REQUEST_PERFORMANCE_TUNING_ANALYSIS", "REQUEST_JAVA_MIGRATION_ANALYSIS", + "DELETE_JMS_REPORT", "SCAN_JAVA_SERVER_USAGE", "SCAN_LIBRARY_USAGE", + "EXPORT_DATA_CSV", + "CREATE_DRS_FILE", + "UPDATE_DRS_FILE", + "DELETE_DRS_FILE", + "ENABLE_DRS", + "DISABLE_DRS", } } diff --git a/jms/patch_detail.go b/jms/patch_detail.go new file mode 100644 index 0000000000..f49c67db71 --- /dev/null +++ b/jms/patch_detail.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchDetail My Oracle Support(MoS) patch details for the Java release. +type PatchDetail struct { + + // Commonly used name for the MoS release. + DisplayName *string `mandatory:"true" json:"displayName"` + + // MoS URL to access the artifacts for the Java release. + PatchUrl *string `mandatory:"true" json:"patchUrl"` +} + +func (m PatchDetail) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchDetail) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/performance_tuning_analysis.go b/jms/performance_tuning_analysis.go index 48db02d264..394fa29ecc 100644 --- a/jms/performance_tuning_analysis.go +++ b/jms/performance_tuning_analysis.go @@ -18,7 +18,7 @@ import ( // PerformanceTuningAnalysis Performance tuning analysis configuration type PerformanceTuningAnalysis struct { - // PerformanceTuningAnalysis flag to store enabled or disabled status. + // PerformanceTuningAnalysis flag to store enabled or disabled status IsEnabled *bool `mandatory:"false" json:"isEnabled"` } diff --git a/jms/plugin.go b/jms/plugin.go new file mode 100644 index 0000000000..024de02f3d --- /dev/null +++ b/jms/plugin.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Plugin Information about the plugin. +type Plugin struct { + + // The name of the plugin. + Name *string `mandatory:"true" json:"name"` + + // The version of the plugin. + Version *string `mandatory:"true" json:"version"` +} + +func (m Plugin) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Plugin) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/request_crypto_analyses_details.go b/jms/request_crypto_analyses_details.go index 2dd764141d..b9eedc257a 100644 --- a/jms/request_crypto_analyses_details.go +++ b/jms/request_crypto_analyses_details.go @@ -15,8 +15,8 @@ import ( "strings" ) -// RequestCryptoAnalysesDetails Details of the request to start a JFR analysis. -// When the targets aren't specified, then all managed instances currently in the Fleet are selected. +// RequestCryptoAnalysesDetails Details of the request to start a JFR crypto event analysis. +// When the targets aren't specified, then all managed instances currently in the fleet are selected. type RequestCryptoAnalysesDetails struct { // The attachment targets to start JFR. diff --git a/jms/update_drs_file_details.go b/jms/update_drs_file_details.go new file mode 100644 index 0000000000..bab99607f4 --- /dev/null +++ b/jms/update_drs_file_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrsFileDetails Details of the request to update DRS file in a Fleet. +type UpdateDrsFileDetails struct { + + // The Object Storage bucket name where the DRS file is located. + BucketName *string `mandatory:"true" json:"bucketName"` + + // The namespace for Object Storage. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the DRS file in Object Store. + DrsFileName *string `mandatory:"true" json:"drsFileName"` +} + +func (m UpdateDrsFileDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrsFileDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/update_drs_file_request_response.go b/jms/update_drs_file_request_response.go new file mode 100644 index 0000000000..fb98d92a2e --- /dev/null +++ b/jms/update_drs_file_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDrsFileRequest wrapper for the UpdateDrsFile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/UpdateDrsFile.go.html to see an example of how to use UpdateDrsFileRequest. +type UpdateDrsFileRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // Detail information to update DRS + UpdateDrsFileDetails `contributesTo:"body"` + + // The unique identifier of the DRS File in Object Storage. + DrsFileKey *string `mandatory:"true" contributesTo:"path" name:"drsFileKey"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // ETag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the ETag you + // provide matches the resource's current ETag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDrsFileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrsFileRequest) 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 UpdateDrsFileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrsFileRequest) 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 UpdateDrsFileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrsFileResponse wrapper for the UpdateDrsFile operation +type UpdateDrsFileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. + // You can use this to query the status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDrsFileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrsFileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/update_export_setting_details.go b/jms/update_export_setting_details.go new file mode 100644 index 0000000000..666ff62eca --- /dev/null +++ b/jms/update_export_setting_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service API +// +// API for the Java Management Service. Use this API to view, create, and manage Fleets. +// + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateExportSettingDetails Attributes to update a Export setting. +type UpdateExportSettingDetails struct { + + // ExportSetting flag to store enabled or disabled status. + IsEnabled *bool `mandatory:"true" json:"isEnabled"` + + // The duration of data to be exported for fleets. + ExportDuration ExportDurationEnum `mandatory:"false" json:"exportDuration,omitempty"` + + // Resource to export data associated from the fleets. + ExportResources ExportResourcesEnum `mandatory:"false" json:"exportResources,omitempty"` + + // Acknowledgement for cross region target bucket configuration. + IsCrossRegionAcknowledged *bool `mandatory:"false" json:"isCrossRegionAcknowledged"` + + // The name of the bucket where data will be exported. + TargetBucketName *string `mandatory:"false" json:"targetBucketName"` + + // The namespace of the bucket where data will be exported. + TargetBucketNamespace *string `mandatory:"false" json:"targetBucketNamespace"` + + // The namespace of the bucket where data will be exported. + TargetBucketRegion *string `mandatory:"false" json:"targetBucketRegion"` + + // Schedule at which data will be exported. + ExportFrequency ExportFrequencyEnum `mandatory:"false" json:"exportFrequency,omitempty"` +} + +func (m UpdateExportSettingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateExportSettingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExportDurationEnum(string(m.ExportDuration)); !ok && m.ExportDuration != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportDuration: %s. Supported values are: %s.", m.ExportDuration, strings.Join(GetExportDurationEnumStringValues(), ","))) + } + if _, ok := GetMappingExportResourcesEnum(string(m.ExportResources)); !ok && m.ExportResources != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportResources: %s. Supported values are: %s.", m.ExportResources, strings.Join(GetExportResourcesEnumStringValues(), ","))) + } + if _, ok := GetMappingExportFrequencyEnum(string(m.ExportFrequency)); !ok && m.ExportFrequency != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportFrequency: %s. Supported values are: %s.", m.ExportFrequency, strings.Join(GetExportFrequencyEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jms/update_export_setting_request_response.go b/jms/update_export_setting_request_response.go new file mode 100644 index 0000000000..bc1f0ab492 --- /dev/null +++ b/jms/update_export_setting_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package jms + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateExportSettingRequest wrapper for the UpdateExportSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/UpdateExportSetting.go.html to see an example of how to use UpdateExportSettingRequest. +type UpdateExportSettingRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` + + // The new details for the Export setting. + UpdateExportSettingDetails `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 UpdateExportSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateExportSettingRequest) 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 UpdateExportSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateExportSettingRequest) 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 UpdateExportSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateExportSettingResponse wrapper for the UpdateExportSetting operation +type UpdateExportSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportSetting instance + ExportSetting `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 UpdateExportSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateExportSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jms/update_fleet_agent_configuration_details.go b/jms/update_fleet_agent_configuration_details.go index 68ab8bddaf..a4293665c2 100644 --- a/jms/update_fleet_agent_configuration_details.go +++ b/jms/update_fleet_agent_configuration_details.go @@ -33,6 +33,8 @@ type UpdateFleetAgentConfigurationDetails struct { LinuxConfiguration *FleetAgentOsConfiguration `mandatory:"false" json:"linuxConfiguration"` WindowsConfiguration *FleetAgentOsConfiguration `mandatory:"false" json:"windowsConfiguration"` + + MacOsConfiguration *FleetAgentOsConfiguration `mandatory:"false" json:"macOsConfiguration"` } func (m UpdateFleetAgentConfigurationDetails) String() string { diff --git a/jms/work_item_details.go b/jms/work_item_details.go index ad71136182..61e65581dd 100644 --- a/jms/work_item_details.go +++ b/jms/work_item_details.go @@ -55,6 +55,10 @@ func (m *workitemdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, er var err error switch m.Kind { + case "LCM": + mm := LcmWorkItemDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "BASIC": mm := BasicWorkItemDetails{} err = json.Unmarshal(data, &mm) @@ -100,16 +104,19 @@ type WorkItemDetailsKindEnum string const ( WorkItemDetailsKindBasic WorkItemDetailsKindEnum = "BASIC" WorkItemDetailsKindApplication WorkItemDetailsKindEnum = "APPLICATION" + WorkItemDetailsKindLcm WorkItemDetailsKindEnum = "LCM" ) var mappingWorkItemDetailsKindEnum = map[string]WorkItemDetailsKindEnum{ "BASIC": WorkItemDetailsKindBasic, "APPLICATION": WorkItemDetailsKindApplication, + "LCM": WorkItemDetailsKindLcm, } var mappingWorkItemDetailsKindEnumLowerCase = map[string]WorkItemDetailsKindEnum{ "basic": WorkItemDetailsKindBasic, "application": WorkItemDetailsKindApplication, + "lcm": WorkItemDetailsKindLcm, } // GetWorkItemDetailsKindEnumValues Enumerates the set of values for WorkItemDetailsKindEnum @@ -126,6 +133,7 @@ func GetWorkItemDetailsKindEnumStringValues() []string { return []string{ "BASIC", "APPLICATION", + "LCM", } } diff --git a/jms/work_item_type.go b/jms/work_item_type.go index 302de42f69..be08a13ab1 100644 --- a/jms/work_item_type.go +++ b/jms/work_item_type.go @@ -18,36 +18,51 @@ type WorkItemTypeEnum string // Set of constants representing the allowable values for WorkItemTypeEnum const ( - WorkItemTypeLcm WorkItemTypeEnum = "LCM" - WorkItemTypeJfrCapture WorkItemTypeEnum = "JFR_CAPTURE" - WorkItemTypeJfrUpload WorkItemTypeEnum = "JFR_UPLOAD" - WorkItemTypeCryptoAnalysis WorkItemTypeEnum = "CRYPTO_ANALYSIS" - WorkItemTypeCryptoAnalysisMerge WorkItemTypeEnum = "CRYPTO_ANALYSIS_MERGE" - WorkItemTypeAdvancedUsageTracking WorkItemTypeEnum = "ADVANCED_USAGE_TRACKING" - WorkItemTypePerformanceTuning WorkItemTypeEnum = "PERFORMANCE_TUNING" - WorkItemTypeJmigrateAnalysis WorkItemTypeEnum = "JMIGRATE_ANALYSIS" + WorkItemTypeLcm WorkItemTypeEnum = "LCM" + WorkItemTypeJfrCapture WorkItemTypeEnum = "JFR_CAPTURE" + WorkItemTypeJfrUpload WorkItemTypeEnum = "JFR_UPLOAD" + WorkItemTypeCryptoAnalysis WorkItemTypeEnum = "CRYPTO_ANALYSIS" + WorkItemTypeCryptoAnalysisMerge WorkItemTypeEnum = "CRYPTO_ANALYSIS_MERGE" + WorkItemTypeAdvancedUsageTracking WorkItemTypeEnum = "ADVANCED_USAGE_TRACKING" + WorkItemTypeAdvUsageServerMetadata WorkItemTypeEnum = "ADV_USAGE_SERVER_METADATA" + WorkItemTypeAdvUsageServerLibraries WorkItemTypeEnum = "ADV_USAGE_SERVER_LIBRARIES" + WorkItemTypeAdvUsageJavaLibraries WorkItemTypeEnum = "ADV_USAGE_JAVA_LIBRARIES" + WorkItemTypePerformanceTuning WorkItemTypeEnum = "PERFORMANCE_TUNING" + WorkItemTypeJmigrateAnalysis WorkItemTypeEnum = "JMIGRATE_ANALYSIS" + WorkItemTypeJmigrateCreateReport WorkItemTypeEnum = "JMIGRATE_CREATE_REPORT" + WorkItemTypeDrs WorkItemTypeEnum = "DRS" ) var mappingWorkItemTypeEnum = map[string]WorkItemTypeEnum{ - "LCM": WorkItemTypeLcm, - "JFR_CAPTURE": WorkItemTypeJfrCapture, - "JFR_UPLOAD": WorkItemTypeJfrUpload, - "CRYPTO_ANALYSIS": WorkItemTypeCryptoAnalysis, - "CRYPTO_ANALYSIS_MERGE": WorkItemTypeCryptoAnalysisMerge, - "ADVANCED_USAGE_TRACKING": WorkItemTypeAdvancedUsageTracking, - "PERFORMANCE_TUNING": WorkItemTypePerformanceTuning, - "JMIGRATE_ANALYSIS": WorkItemTypeJmigrateAnalysis, + "LCM": WorkItemTypeLcm, + "JFR_CAPTURE": WorkItemTypeJfrCapture, + "JFR_UPLOAD": WorkItemTypeJfrUpload, + "CRYPTO_ANALYSIS": WorkItemTypeCryptoAnalysis, + "CRYPTO_ANALYSIS_MERGE": WorkItemTypeCryptoAnalysisMerge, + "ADVANCED_USAGE_TRACKING": WorkItemTypeAdvancedUsageTracking, + "ADV_USAGE_SERVER_METADATA": WorkItemTypeAdvUsageServerMetadata, + "ADV_USAGE_SERVER_LIBRARIES": WorkItemTypeAdvUsageServerLibraries, + "ADV_USAGE_JAVA_LIBRARIES": WorkItemTypeAdvUsageJavaLibraries, + "PERFORMANCE_TUNING": WorkItemTypePerformanceTuning, + "JMIGRATE_ANALYSIS": WorkItemTypeJmigrateAnalysis, + "JMIGRATE_CREATE_REPORT": WorkItemTypeJmigrateCreateReport, + "DRS": WorkItemTypeDrs, } var mappingWorkItemTypeEnumLowerCase = map[string]WorkItemTypeEnum{ - "lcm": WorkItemTypeLcm, - "jfr_capture": WorkItemTypeJfrCapture, - "jfr_upload": WorkItemTypeJfrUpload, - "crypto_analysis": WorkItemTypeCryptoAnalysis, - "crypto_analysis_merge": WorkItemTypeCryptoAnalysisMerge, - "advanced_usage_tracking": WorkItemTypeAdvancedUsageTracking, - "performance_tuning": WorkItemTypePerformanceTuning, - "jmigrate_analysis": WorkItemTypeJmigrateAnalysis, + "lcm": WorkItemTypeLcm, + "jfr_capture": WorkItemTypeJfrCapture, + "jfr_upload": WorkItemTypeJfrUpload, + "crypto_analysis": WorkItemTypeCryptoAnalysis, + "crypto_analysis_merge": WorkItemTypeCryptoAnalysisMerge, + "advanced_usage_tracking": WorkItemTypeAdvancedUsageTracking, + "adv_usage_server_metadata": WorkItemTypeAdvUsageServerMetadata, + "adv_usage_server_libraries": WorkItemTypeAdvUsageServerLibraries, + "adv_usage_java_libraries": WorkItemTypeAdvUsageJavaLibraries, + "performance_tuning": WorkItemTypePerformanceTuning, + "jmigrate_analysis": WorkItemTypeJmigrateAnalysis, + "jmigrate_create_report": WorkItemTypeJmigrateCreateReport, + "drs": WorkItemTypeDrs, } // GetWorkItemTypeEnumValues Enumerates the set of values for WorkItemTypeEnum @@ -68,8 +83,13 @@ func GetWorkItemTypeEnumStringValues() []string { "CRYPTO_ANALYSIS", "CRYPTO_ANALYSIS_MERGE", "ADVANCED_USAGE_TRACKING", + "ADV_USAGE_SERVER_METADATA", + "ADV_USAGE_SERVER_LIBRARIES", + "ADV_USAGE_JAVA_LIBRARIES", "PERFORMANCE_TUNING", "JMIGRATE_ANALYSIS", + "JMIGRATE_CREATE_REPORT", + "DRS", } } diff --git a/jmsjavadownloads/action_type.go b/jmsjavadownloads/action_type.go new file mode 100644 index 0000000000..c569808210 --- /dev/null +++ b/jmsjavadownloads/action_type.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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/jmsjavadownloads/aggregation_sort_by.go b/jmsjavadownloads/aggregation_sort_by.go new file mode 100644 index 0000000000..52da75c842 --- /dev/null +++ b/jmsjavadownloads/aggregation_sort_by.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// AggregationSortByEnum Enum with underlying type: string +type AggregationSortByEnum string + +// Set of constants representing the allowable values for AggregationSortByEnum +const ( + AggregationSortByFamilyVersion AggregationSortByEnum = "FAMILY_VERSION" + AggregationSortByDownloadCount AggregationSortByEnum = "DOWNLOAD_COUNT" +) + +var mappingAggregationSortByEnum = map[string]AggregationSortByEnum{ + "FAMILY_VERSION": AggregationSortByFamilyVersion, + "DOWNLOAD_COUNT": AggregationSortByDownloadCount, +} + +var mappingAggregationSortByEnumLowerCase = map[string]AggregationSortByEnum{ + "family_version": AggregationSortByFamilyVersion, + "download_count": AggregationSortByDownloadCount, +} + +// GetAggregationSortByEnumValues Enumerates the set of values for AggregationSortByEnum +func GetAggregationSortByEnumValues() []AggregationSortByEnum { + values := make([]AggregationSortByEnum, 0) + for _, v := range mappingAggregationSortByEnum { + values = append(values, v) + } + return values +} + +// GetAggregationSortByEnumStringValues Enumerates the set of values in String for AggregationSortByEnum +func GetAggregationSortByEnumStringValues() []string { + return []string{ + "FAMILY_VERSION", + "DOWNLOAD_COUNT", + } +} + +// GetMappingAggregationSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAggregationSortByEnum(val string) (AggregationSortByEnum, bool) { + enum, ok := mappingAggregationSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/cancel_work_request_request_response.go b/jmsjavadownloads/cancel_work_request_request_response.go new file mode 100644 index 0000000000..7af756cf32 --- /dev/null +++ b/jmsjavadownloads/cancel_work_request_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CancelWorkRequestRequest wrapper for the CancelWorkRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CancelWorkRequest.go.html to see an example of how to use CancelWorkRequestRequest. +type CancelWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // ETag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the ETag you + // provide matches the resource's current ETag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // 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 CancelWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CancelWorkRequestRequest) 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 CancelWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CancelWorkRequestRequest) 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 CancelWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CancelWorkRequestResponse wrapper for the CancelWorkRequest operation +type CancelWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CancelWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CancelWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/checksum_type.go b/jmsjavadownloads/checksum_type.go new file mode 100644 index 0000000000..7a5bab9c92 --- /dev/null +++ b/jmsjavadownloads/checksum_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// ChecksumTypeEnum Enum with underlying type: string +type ChecksumTypeEnum string + +// Set of constants representing the allowable values for ChecksumTypeEnum +const ( + ChecksumTypeSha256 ChecksumTypeEnum = "SHA256" +) + +var mappingChecksumTypeEnum = map[string]ChecksumTypeEnum{ + "SHA256": ChecksumTypeSha256, +} + +var mappingChecksumTypeEnumLowerCase = map[string]ChecksumTypeEnum{ + "sha256": ChecksumTypeSha256, +} + +// GetChecksumTypeEnumValues Enumerates the set of values for ChecksumTypeEnum +func GetChecksumTypeEnumValues() []ChecksumTypeEnum { + values := make([]ChecksumTypeEnum, 0) + for _, v := range mappingChecksumTypeEnum { + values = append(values, v) + } + return values +} + +// GetChecksumTypeEnumStringValues Enumerates the set of values in String for ChecksumTypeEnum +func GetChecksumTypeEnumStringValues() []string { + return []string{ + "SHA256", + } +} + +// GetMappingChecksumTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingChecksumTypeEnum(val string) (ChecksumTypeEnum, bool) { + enum, ok := mappingChecksumTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/create_java_download_report_details.go b/jmsjavadownloads/create_java_download_report_details.go new file mode 100644 index 0000000000..7789be7718 --- /dev/null +++ b/jmsjavadownloads/create_java_download_report_details.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateJavaDownloadReportDetails Attributes to create a Java download report. +type CreateJavaDownloadReportDetails struct { + + // The compartment OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) here should be + // the tenancy OCID. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The format of the report that is generated. + Format JavaDownloadReportFormatEnum `mandatory:"true" json:"format"` + + // The start time from when download records have to be included (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` + + // The end time until when the download records have to be included (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeEnd *common.SDKTime `mandatory:"false" json:"timeEnd"` + + // The property to be used for sorting the reports. + SortBy JavaDownloadRecordSortByEnum `mandatory:"false" json:"sortBy,omitempty"` + + // The sort order for the reports. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` +} + +func (m CreateJavaDownloadReportDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateJavaDownloadReportDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJavaDownloadReportFormatEnum(string(m.Format)); !ok && m.Format != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Format: %s. Supported values are: %s.", m.Format, strings.Join(GetJavaDownloadReportFormatEnumStringValues(), ","))) + } + + if _, ok := GetMappingJavaDownloadRecordSortByEnum(string(m.SortBy)); !ok && m.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", m.SortBy, strings.Join(GetJavaDownloadRecordSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/create_java_download_report_request_response.go b/jmsjavadownloads/create_java_download_report_request_response.go new file mode 100644 index 0000000000..926d4d05e0 --- /dev/null +++ b/jmsjavadownloads/create_java_download_report_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateJavaDownloadReportRequest wrapper for the CreateJavaDownloadReport operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CreateJavaDownloadReport.go.html to see an example of how to use CreateJavaDownloadReportRequest. +type CreateJavaDownloadReportRequest struct { + + // Details for the new report. + CreateJavaDownloadReportDetails `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 CreateJavaDownloadReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateJavaDownloadReportRequest) 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 CreateJavaDownloadReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateJavaDownloadReportRequest) 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 CreateJavaDownloadReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateJavaDownloadReportResponse wrapper for the CreateJavaDownloadReport operation +type CreateJavaDownloadReportResponse 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateJavaDownloadReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateJavaDownloadReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/create_java_download_token_details.go b/jmsjavadownloads/create_java_download_token_details.go new file mode 100644 index 0000000000..63ff6706e1 --- /dev/null +++ b/jmsjavadownloads/create_java_download_token_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateJavaDownloadTokenDetails The attributes to create a new JavaDownloadToken. +type CreateJavaDownloadTokenDetails struct { + + // User provided display name of the JavaDownloadToken. + DisplayName *string `mandatory:"true" json:"displayName"` + + // User provided description of the JavaDownloadToken. + Description *string `mandatory:"true" json:"description"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy scoped to the JavaDownloadToken. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Expiry time of the token. + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // The Java version associated with the token. + JavaVersion *string `mandatory:"true" json:"javaVersion"` + + // The license type(s) associated with the JavaDownloadToken. + LicenseType []LicenseTypeEnum `mandatory:"true" json:"licenseType"` + + // The token default attribute. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateJavaDownloadTokenDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateJavaDownloadTokenDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/create_java_download_token_request_response.go b/jmsjavadownloads/create_java_download_token_request_response.go new file mode 100644 index 0000000000..3719e780d8 --- /dev/null +++ b/jmsjavadownloads/create_java_download_token_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateJavaDownloadTokenRequest wrapper for the CreateJavaDownloadToken operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CreateJavaDownloadToken.go.html to see an example of how to use CreateJavaDownloadTokenRequest. +type CreateJavaDownloadTokenRequest struct { + + // Details for the new JavaDownloadToken. + CreateJavaDownloadTokenDetails `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 CreateJavaDownloadTokenRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateJavaDownloadTokenRequest) 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 CreateJavaDownloadTokenRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateJavaDownloadTokenRequest) 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 CreateJavaDownloadTokenRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateJavaDownloadTokenResponse wrapper for the CreateJavaDownloadToken operation +type CreateJavaDownloadTokenResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaDownloadToken instance + JavaDownloadToken `presentIn:"body"` + + // 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateJavaDownloadTokenResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateJavaDownloadTokenResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/create_java_license_acceptance_record_details.go b/jmsjavadownloads/create_java_license_acceptance_record_details.go new file mode 100644 index 0000000000..8e7642edb9 --- /dev/null +++ b/jmsjavadownloads/create_java_license_acceptance_record_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateJavaLicenseAcceptanceRecordDetails The attributes to create a new JavaLicenseAcceptanceRecord. +type CreateJavaLicenseAcceptanceRecordDetails struct { + + // The tenancy OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user accepting the license. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // License type for the Java version. + LicenseType LicenseTypeEnum `mandatory:"true" json:"licenseType"` + + // Status of license acceptance. + LicenseAcceptanceStatus LicenseAcceptanceStatusEnum `mandatory:"true" json:"licenseAcceptanceStatus"` +} + +func (m CreateJavaLicenseAcceptanceRecordDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateJavaLicenseAcceptanceRecordDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + 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 := GetMappingLicenseAcceptanceStatusEnum(string(m.LicenseAcceptanceStatus)); !ok && m.LicenseAcceptanceStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseAcceptanceStatus: %s. Supported values are: %s.", m.LicenseAcceptanceStatus, strings.Join(GetLicenseAcceptanceStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/create_java_license_acceptance_record_request_response.go b/jmsjavadownloads/create_java_license_acceptance_record_request_response.go new file mode 100644 index 0000000000..032b4c8fd8 --- /dev/null +++ b/jmsjavadownloads/create_java_license_acceptance_record_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateJavaLicenseAcceptanceRecordRequest wrapper for the CreateJavaLicenseAcceptanceRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CreateJavaLicenseAcceptanceRecord.go.html to see an example of how to use CreateJavaLicenseAcceptanceRecordRequest. +type CreateJavaLicenseAcceptanceRecordRequest struct { + + // Details for the new JavaLicenseAcceptanceRecord. + CreateJavaLicenseAcceptanceRecordDetails `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 CreateJavaLicenseAcceptanceRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateJavaLicenseAcceptanceRecordRequest) 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 CreateJavaLicenseAcceptanceRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateJavaLicenseAcceptanceRecordRequest) 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 CreateJavaLicenseAcceptanceRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateJavaLicenseAcceptanceRecordResponse wrapper for the CreateJavaLicenseAcceptanceRecord operation +type CreateJavaLicenseAcceptanceRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaLicenseAcceptanceRecord instance + JavaLicenseAcceptanceRecord `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateJavaLicenseAcceptanceRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateJavaLicenseAcceptanceRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/delete_java_download_report_request_response.go b/jmsjavadownloads/delete_java_download_report_request_response.go new file mode 100644 index 0000000000..c32876c6e0 --- /dev/null +++ b/jmsjavadownloads/delete_java_download_report_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteJavaDownloadReportRequest wrapper for the DeleteJavaDownloadReport operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/DeleteJavaDownloadReport.go.html to see an example of how to use DeleteJavaDownloadReportRequest. +type DeleteJavaDownloadReportRequest struct { + + // Unique Java download report identifier. + JavaDownloadReportId *string `mandatory:"true" contributesTo:"path" name:"javaDownloadReportId"` + + // 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 DeleteJavaDownloadReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteJavaDownloadReportRequest) 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 DeleteJavaDownloadReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteJavaDownloadReportRequest) 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 DeleteJavaDownloadReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteJavaDownloadReportResponse wrapper for the DeleteJavaDownloadReport operation +type DeleteJavaDownloadReportResponse 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteJavaDownloadReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteJavaDownloadReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/delete_java_download_token_request_response.go b/jmsjavadownloads/delete_java_download_token_request_response.go new file mode 100644 index 0000000000..9d4c0857e6 --- /dev/null +++ b/jmsjavadownloads/delete_java_download_token_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteJavaDownloadTokenRequest wrapper for the DeleteJavaDownloadToken operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/DeleteJavaDownloadToken.go.html to see an example of how to use DeleteJavaDownloadTokenRequest. +type DeleteJavaDownloadTokenRequest struct { + + // Unique JavaDownloadToken identifier. + JavaDownloadTokenId *string `mandatory:"true" contributesTo:"path" name:"javaDownloadTokenId"` + + // 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 DeleteJavaDownloadTokenRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteJavaDownloadTokenRequest) 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 DeleteJavaDownloadTokenRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteJavaDownloadTokenRequest) 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 DeleteJavaDownloadTokenRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteJavaDownloadTokenResponse wrapper for the DeleteJavaDownloadToken operation +type DeleteJavaDownloadTokenResponse 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteJavaDownloadTokenResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteJavaDownloadTokenResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/delete_java_license_acceptance_record_request_response.go b/jmsjavadownloads/delete_java_license_acceptance_record_request_response.go new file mode 100644 index 0000000000..17677e4748 --- /dev/null +++ b/jmsjavadownloads/delete_java_license_acceptance_record_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteJavaLicenseAcceptanceRecordRequest wrapper for the DeleteJavaLicenseAcceptanceRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/DeleteJavaLicenseAcceptanceRecord.go.html to see an example of how to use DeleteJavaLicenseAcceptanceRecordRequest. +type DeleteJavaLicenseAcceptanceRecordRequest struct { + + // Unique Java license acceptance record identifier. + JavaLicenseAcceptanceRecordId *string `mandatory:"true" contributesTo:"path" name:"javaLicenseAcceptanceRecordId"` + + // 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 DeleteJavaLicenseAcceptanceRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteJavaLicenseAcceptanceRecordRequest) 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 DeleteJavaLicenseAcceptanceRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteJavaLicenseAcceptanceRecordRequest) 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 DeleteJavaLicenseAcceptanceRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteJavaLicenseAcceptanceRecordResponse wrapper for the DeleteJavaLicenseAcceptanceRecord operation +type DeleteJavaLicenseAcceptanceRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteJavaLicenseAcceptanceRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteJavaLicenseAcceptanceRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/download_url.go b/jmsjavadownloads/download_url.go new file mode 100644 index 0000000000..0c98dc1c9f --- /dev/null +++ b/jmsjavadownloads/download_url.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DownloadUrl Download Url object for the Java artifact. +type DownloadUrl struct { + + // The URL for downloading the artifact. + DownloadUrl *string `mandatory:"true" json:"downloadUrl"` + + // The type of download URL. + DownloadUrlType DownloadUrlTypeEnum `mandatory:"true" json:"downloadUrlType"` +} + +func (m DownloadUrl) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DownloadUrl) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDownloadUrlTypeEnum(string(m.DownloadUrlType)); !ok && m.DownloadUrlType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DownloadUrlType: %s. Supported values are: %s.", m.DownloadUrlType, strings.Join(GetDownloadUrlTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/download_url_type.go b/jmsjavadownloads/download_url_type.go new file mode 100644 index 0000000000..316779db98 --- /dev/null +++ b/jmsjavadownloads/download_url_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// DownloadUrlTypeEnum Enum with underlying type: string +type DownloadUrlTypeEnum string + +// Set of constants representing the allowable values for DownloadUrlTypeEnum +const ( + DownloadUrlTypeOss DownloadUrlTypeEnum = "OSS" + DownloadUrlTypeCdn DownloadUrlTypeEnum = "CDN" +) + +var mappingDownloadUrlTypeEnum = map[string]DownloadUrlTypeEnum{ + "OSS": DownloadUrlTypeOss, + "CDN": DownloadUrlTypeCdn, +} + +var mappingDownloadUrlTypeEnumLowerCase = map[string]DownloadUrlTypeEnum{ + "oss": DownloadUrlTypeOss, + "cdn": DownloadUrlTypeCdn, +} + +// GetDownloadUrlTypeEnumValues Enumerates the set of values for DownloadUrlTypeEnum +func GetDownloadUrlTypeEnumValues() []DownloadUrlTypeEnum { + values := make([]DownloadUrlTypeEnum, 0) + for _, v := range mappingDownloadUrlTypeEnum { + values = append(values, v) + } + return values +} + +// GetDownloadUrlTypeEnumStringValues Enumerates the set of values in String for DownloadUrlTypeEnum +func GetDownloadUrlTypeEnumStringValues() []string { + return []string{ + "OSS", + "CDN", + } +} + +// GetMappingDownloadUrlTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDownloadUrlTypeEnum(val string) (DownloadUrlTypeEnum, bool) { + enum, ok := mappingDownloadUrlTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/generate_artifact_download_url_details.go b/jmsjavadownloads/generate_artifact_download_url_details.go new file mode 100644 index 0000000000..0b9242d008 --- /dev/null +++ b/jmsjavadownloads/generate_artifact_download_url_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenerateArtifactDownloadUrlDetails The attributes to generate a DownloadUrl for a Java runtime artifact. +type GenerateArtifactDownloadUrlDetails struct { + + // Unique identifier for the Java runtime artifact. + ArtifactId *int64 `mandatory:"true" json:"artifactId"` +} + +func (m GenerateArtifactDownloadUrlDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenerateArtifactDownloadUrlDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/generate_artifact_download_url_request_response.go b/jmsjavadownloads/generate_artifact_download_url_request_response.go new file mode 100644 index 0000000000..119f4448ec --- /dev/null +++ b/jmsjavadownloads/generate_artifact_download_url_request_response.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GenerateArtifactDownloadUrlRequest wrapper for the GenerateArtifactDownloadUrl operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GenerateArtifactDownloadUrl.go.html to see an example of how to use GenerateArtifactDownloadUrlRequest. +type GenerateArtifactDownloadUrlRequest struct { + + // Details for generating download URL for a Java artifact. + GenerateArtifactDownloadUrlDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GenerateArtifactDownloadUrlRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GenerateArtifactDownloadUrlRequest) 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 GenerateArtifactDownloadUrlRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GenerateArtifactDownloadUrlRequest) 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 GenerateArtifactDownloadUrlRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GenerateArtifactDownloadUrlResponse wrapper for the GenerateArtifactDownloadUrl operation +type GenerateArtifactDownloadUrlResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DownloadUrl instance + DownloadUrl `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GenerateArtifactDownloadUrlResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GenerateArtifactDownloadUrlResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/get_java_download_report_content_request_response.go b/jmsjavadownloads/get_java_download_report_content_request_response.go new file mode 100644 index 0000000000..735f1d4599 --- /dev/null +++ b/jmsjavadownloads/get_java_download_report_content_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GetJavaDownloadReportContentRequest wrapper for the GetJavaDownloadReportContent operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaDownloadReportContent.go.html to see an example of how to use GetJavaDownloadReportContentRequest. +type GetJavaDownloadReportContentRequest struct { + + // Unique Java download report identifier. + JavaDownloadReportId *string `mandatory:"true" contributesTo:"path" name:"javaDownloadReportId"` + + // 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 GetJavaDownloadReportContentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetJavaDownloadReportContentRequest) 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 GetJavaDownloadReportContentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetJavaDownloadReportContentRequest) 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 GetJavaDownloadReportContentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetJavaDownloadReportContentResponse wrapper for the GetJavaDownloadReportContent operation +type GetJavaDownloadReportContentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetJavaDownloadReportContentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetJavaDownloadReportContentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/get_java_download_report_request_response.go b/jmsjavadownloads/get_java_download_report_request_response.go new file mode 100644 index 0000000000..4b7df6dc81 --- /dev/null +++ b/jmsjavadownloads/get_java_download_report_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetJavaDownloadReportRequest wrapper for the GetJavaDownloadReport operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaDownloadReport.go.html to see an example of how to use GetJavaDownloadReportRequest. +type GetJavaDownloadReportRequest struct { + + // Unique Java download report identifier. + JavaDownloadReportId *string `mandatory:"true" contributesTo:"path" name:"javaDownloadReportId"` + + // 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 GetJavaDownloadReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetJavaDownloadReportRequest) 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 GetJavaDownloadReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetJavaDownloadReportRequest) 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 GetJavaDownloadReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetJavaDownloadReportResponse wrapper for the GetJavaDownloadReport operation +type GetJavaDownloadReportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaDownloadReport instance + JavaDownloadReport `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetJavaDownloadReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetJavaDownloadReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/get_java_download_token_request_response.go b/jmsjavadownloads/get_java_download_token_request_response.go new file mode 100644 index 0000000000..d5a2a03511 --- /dev/null +++ b/jmsjavadownloads/get_java_download_token_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetJavaDownloadTokenRequest wrapper for the GetJavaDownloadToken operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaDownloadToken.go.html to see an example of how to use GetJavaDownloadTokenRequest. +type GetJavaDownloadTokenRequest struct { + + // Unique JavaDownloadToken identifier. + JavaDownloadTokenId *string `mandatory:"true" contributesTo:"path" name:"javaDownloadTokenId"` + + // 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 GetJavaDownloadTokenRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetJavaDownloadTokenRequest) 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 GetJavaDownloadTokenRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetJavaDownloadTokenRequest) 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 GetJavaDownloadTokenRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetJavaDownloadTokenResponse wrapper for the GetJavaDownloadToken operation +type GetJavaDownloadTokenResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaDownloadToken instance + JavaDownloadToken `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetJavaDownloadTokenResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetJavaDownloadTokenResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/get_java_license_acceptance_record_request_response.go b/jmsjavadownloads/get_java_license_acceptance_record_request_response.go new file mode 100644 index 0000000000..98b02f686f --- /dev/null +++ b/jmsjavadownloads/get_java_license_acceptance_record_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetJavaLicenseAcceptanceRecordRequest wrapper for the GetJavaLicenseAcceptanceRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaLicenseAcceptanceRecord.go.html to see an example of how to use GetJavaLicenseAcceptanceRecordRequest. +type GetJavaLicenseAcceptanceRecordRequest struct { + + // Unique Java license acceptance record identifier. + JavaLicenseAcceptanceRecordId *string `mandatory:"true" contributesTo:"path" name:"javaLicenseAcceptanceRecordId"` + + // 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 GetJavaLicenseAcceptanceRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetJavaLicenseAcceptanceRecordRequest) 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 GetJavaLicenseAcceptanceRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetJavaLicenseAcceptanceRecordRequest) 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 GetJavaLicenseAcceptanceRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetJavaLicenseAcceptanceRecordResponse wrapper for the GetJavaLicenseAcceptanceRecord operation +type GetJavaLicenseAcceptanceRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaLicenseAcceptanceRecord instance + JavaLicenseAcceptanceRecord `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response GetJavaLicenseAcceptanceRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetJavaLicenseAcceptanceRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/get_java_license_request_response.go b/jmsjavadownloads/get_java_license_request_response.go new file mode 100644 index 0000000000..86d3631f2e --- /dev/null +++ b/jmsjavadownloads/get_java_license_request_response.go @@ -0,0 +1,139 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetJavaLicenseRequest wrapper for the GetJavaLicense operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaLicense.go.html to see an example of how to use GetJavaLicenseRequest. +type GetJavaLicenseRequest struct { + + // Unique Java license type. + LicenseType GetJavaLicenseLicenseTypeEnum `mandatory:"true" contributesTo:"path" name:"licenseType"` + + // 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 GetJavaLicenseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetJavaLicenseRequest) 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 GetJavaLicenseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetJavaLicenseRequest) 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 GetJavaLicenseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetJavaLicenseLicenseTypeEnum(string(request.LicenseType)); !ok && request.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", request.LicenseType, strings.Join(GetGetJavaLicenseLicenseTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetJavaLicenseResponse wrapper for the GetJavaLicense operation +type GetJavaLicenseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaLicense instance + JavaLicense `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetJavaLicenseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetJavaLicenseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetJavaLicenseLicenseTypeEnum Enum with underlying type: string +type GetJavaLicenseLicenseTypeEnum string + +// Set of constants representing the allowable values for GetJavaLicenseLicenseTypeEnum +const ( + GetJavaLicenseLicenseTypeOtn GetJavaLicenseLicenseTypeEnum = "OTN" + GetJavaLicenseLicenseTypeNftc GetJavaLicenseLicenseTypeEnum = "NFTC" + GetJavaLicenseLicenseTypeRestricted GetJavaLicenseLicenseTypeEnum = "RESTRICTED" +) + +var mappingGetJavaLicenseLicenseTypeEnum = map[string]GetJavaLicenseLicenseTypeEnum{ + "OTN": GetJavaLicenseLicenseTypeOtn, + "NFTC": GetJavaLicenseLicenseTypeNftc, + "RESTRICTED": GetJavaLicenseLicenseTypeRestricted, +} + +var mappingGetJavaLicenseLicenseTypeEnumLowerCase = map[string]GetJavaLicenseLicenseTypeEnum{ + "otn": GetJavaLicenseLicenseTypeOtn, + "nftc": GetJavaLicenseLicenseTypeNftc, + "restricted": GetJavaLicenseLicenseTypeRestricted, +} + +// GetGetJavaLicenseLicenseTypeEnumValues Enumerates the set of values for GetJavaLicenseLicenseTypeEnum +func GetGetJavaLicenseLicenseTypeEnumValues() []GetJavaLicenseLicenseTypeEnum { + values := make([]GetJavaLicenseLicenseTypeEnum, 0) + for _, v := range mappingGetJavaLicenseLicenseTypeEnum { + values = append(values, v) + } + return values +} + +// GetGetJavaLicenseLicenseTypeEnumStringValues Enumerates the set of values in String for GetJavaLicenseLicenseTypeEnum +func GetGetJavaLicenseLicenseTypeEnumStringValues() []string { + return []string{ + "OTN", + "NFTC", + "RESTRICTED", + } +} + +// GetMappingGetJavaLicenseLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetJavaLicenseLicenseTypeEnum(val string) (GetJavaLicenseLicenseTypeEnum, bool) { + enum, ok := mappingGetJavaLicenseLicenseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/get_work_request_request_response.go b/jmsjavadownloads/get_work_request_request_response.go new file mode 100644 index 0000000000..a16aaca3b0 --- /dev/null +++ b/jmsjavadownloads/get_work_request_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +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/jmsjavadownloads/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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // A non-negative integer representing the number of seconds the client should wait before polling this endpoint again. + RetryAfter *int64 `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/jmsjavadownloads/java_download_count_aggregation.go b/jmsjavadownloads/java_download_count_aggregation.go new file mode 100644 index 0000000000..0c0531898c --- /dev/null +++ b/jmsjavadownloads/java_download_count_aggregation.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadCountAggregation Count of Java downloads aggregated by the specified type. +type JavaDownloadCountAggregation struct { + + // Count of Java downloads. + DownloadCount *int64 `mandatory:"true" json:"downloadCount"` + + // The Java family version. + FamilyVersion *string `mandatory:"false" json:"familyVersion"` + + // The Java family display name. + FamilyDisplayName *string `mandatory:"false" json:"familyDisplayName"` + + // The Java release version. Applicable only to `JAVA_RELEASE` aggregationType. + ReleaseVersion *string `mandatory:"false" json:"releaseVersion"` + + // The target Operating System family for the artifact. Applicable only to `PLATFORM` aggregationType. + OsFamily *string `mandatory:"false" json:"osFamily"` + + // The target Operating System architecture for the artifact. Applicable only to `PLATFORM` aggregationType. + Architecture *string `mandatory:"false" json:"architecture"` + + // The package type(typically the file extension) of the artifact. Applicable only to `PLATFORM` aggregationType. + PackageType *string `mandatory:"false" json:"packageType"` + + // Additional information about the package type. Applicable only to `PLATFORM` aggregationType. + PackageTypeDetail *string `mandatory:"false" json:"packageTypeDetail"` +} + +func (m JavaDownloadCountAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadCountAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_count_aggregation_collection.go b/jmsjavadownloads/java_download_count_aggregation_collection.go new file mode 100644 index 0000000000..a467c2349e --- /dev/null +++ b/jmsjavadownloads/java_download_count_aggregation_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadCountAggregationCollection Collection of download count aggregations. +type JavaDownloadCountAggregationCollection struct { + + // Aggregation type + AggregationType JavaDownloadCountAggregationTypeEnum `mandatory:"true" json:"aggregationType"` + + // A list of download count aggregations. + Items []JavaDownloadCountAggregation `mandatory:"true" json:"items"` +} + +func (m JavaDownloadCountAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadCountAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJavaDownloadCountAggregationTypeEnum(string(m.AggregationType)); !ok && m.AggregationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AggregationType: %s. Supported values are: %s.", m.AggregationType, strings.Join(GetJavaDownloadCountAggregationTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_count_aggregation_type.go b/jmsjavadownloads/java_download_count_aggregation_type.go new file mode 100644 index 0000000000..209ec6baa0 --- /dev/null +++ b/jmsjavadownloads/java_download_count_aggregation_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// JavaDownloadCountAggregationTypeEnum Enum with underlying type: string +type JavaDownloadCountAggregationTypeEnum string + +// Set of constants representing the allowable values for JavaDownloadCountAggregationTypeEnum +const ( + JavaDownloadCountAggregationTypeJavaFamily JavaDownloadCountAggregationTypeEnum = "JAVA_FAMILY" + JavaDownloadCountAggregationTypeJavaRelease JavaDownloadCountAggregationTypeEnum = "JAVA_RELEASE" + JavaDownloadCountAggregationTypePlatform JavaDownloadCountAggregationTypeEnum = "PLATFORM" +) + +var mappingJavaDownloadCountAggregationTypeEnum = map[string]JavaDownloadCountAggregationTypeEnum{ + "JAVA_FAMILY": JavaDownloadCountAggregationTypeJavaFamily, + "JAVA_RELEASE": JavaDownloadCountAggregationTypeJavaRelease, + "PLATFORM": JavaDownloadCountAggregationTypePlatform, +} + +var mappingJavaDownloadCountAggregationTypeEnumLowerCase = map[string]JavaDownloadCountAggregationTypeEnum{ + "java_family": JavaDownloadCountAggregationTypeJavaFamily, + "java_release": JavaDownloadCountAggregationTypeJavaRelease, + "platform": JavaDownloadCountAggregationTypePlatform, +} + +// GetJavaDownloadCountAggregationTypeEnumValues Enumerates the set of values for JavaDownloadCountAggregationTypeEnum +func GetJavaDownloadCountAggregationTypeEnumValues() []JavaDownloadCountAggregationTypeEnum { + values := make([]JavaDownloadCountAggregationTypeEnum, 0) + for _, v := range mappingJavaDownloadCountAggregationTypeEnum { + values = append(values, v) + } + return values +} + +// GetJavaDownloadCountAggregationTypeEnumStringValues Enumerates the set of values in String for JavaDownloadCountAggregationTypeEnum +func GetJavaDownloadCountAggregationTypeEnumStringValues() []string { + return []string{ + "JAVA_FAMILY", + "JAVA_RELEASE", + "PLATFORM", + } +} + +// GetMappingJavaDownloadCountAggregationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJavaDownloadCountAggregationTypeEnum(val string) (JavaDownloadCountAggregationTypeEnum, bool) { + enum, ok := mappingJavaDownloadCountAggregationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/java_download_record.go b/jmsjavadownloads/java_download_record.go new file mode 100644 index 0000000000..8fb73dc420 --- /dev/null +++ b/jmsjavadownloads/java_download_record.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadRecord A record of Java artifact download in a tenancy. +type JavaDownloadRecord struct { + + // Identifier of the source that downloaded the artifact. + DownloadSourceId *string `mandatory:"true" json:"downloadSourceId"` + + // Timestamp of download. + TimeDownloaded *common.SDKTime `mandatory:"true" json:"timeDownloaded"` + + // Type of download. + DownloadType *string `mandatory:"true" json:"downloadType"` + + // The Java family version identifier. + FamilyVersion *string `mandatory:"false" json:"familyVersion"` + + // The Java family display name. + FamilyDisplayName *string `mandatory:"false" json:"familyDisplayName"` + + // The Java release version identifier. + ReleaseVersion *string `mandatory:"false" json:"releaseVersion"` + + // The target Operating System family for the artifact. + OsFamily *string `mandatory:"false" json:"osFamily"` + + // The target Operating System architecture for the artifact. + Architecture *string `mandatory:"false" json:"architecture"` + + // The package type(typically the file extension) of the artifact. + PackageType *string `mandatory:"false" json:"packageType"` + + // Additional information about the package type. + PackageTypeDetail *string `mandatory:"false" json:"packageTypeDetail"` +} + +func (m JavaDownloadRecord) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadRecord) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_record_collection.go b/jmsjavadownloads/java_download_record_collection.go new file mode 100644 index 0000000000..0863669b73 --- /dev/null +++ b/jmsjavadownloads/java_download_record_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadRecordCollection Collection of Java download records. +type JavaDownloadRecordCollection struct { + + // A list of Java download records in a tenancy. + Items []JavaDownloadRecordSummary `mandatory:"true" json:"items"` +} + +func (m JavaDownloadRecordCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadRecordCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_record_sort_by.go b/jmsjavadownloads/java_download_record_sort_by.go new file mode 100644 index 0000000000..d3932f65f4 --- /dev/null +++ b/jmsjavadownloads/java_download_record_sort_by.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// JavaDownloadRecordSortByEnum Enum with underlying type: string +type JavaDownloadRecordSortByEnum string + +// Set of constants representing the allowable values for JavaDownloadRecordSortByEnum +const ( + JavaDownloadRecordSortByTimeDownloaded JavaDownloadRecordSortByEnum = "timeDownloaded" + JavaDownloadRecordSortByDownloadSourceId JavaDownloadRecordSortByEnum = "downloadSourceId" + JavaDownloadRecordSortByDownloadType JavaDownloadRecordSortByEnum = "downloadType" +) + +var mappingJavaDownloadRecordSortByEnum = map[string]JavaDownloadRecordSortByEnum{ + "timeDownloaded": JavaDownloadRecordSortByTimeDownloaded, + "downloadSourceId": JavaDownloadRecordSortByDownloadSourceId, + "downloadType": JavaDownloadRecordSortByDownloadType, +} + +var mappingJavaDownloadRecordSortByEnumLowerCase = map[string]JavaDownloadRecordSortByEnum{ + "timedownloaded": JavaDownloadRecordSortByTimeDownloaded, + "downloadsourceid": JavaDownloadRecordSortByDownloadSourceId, + "downloadtype": JavaDownloadRecordSortByDownloadType, +} + +// GetJavaDownloadRecordSortByEnumValues Enumerates the set of values for JavaDownloadRecordSortByEnum +func GetJavaDownloadRecordSortByEnumValues() []JavaDownloadRecordSortByEnum { + values := make([]JavaDownloadRecordSortByEnum, 0) + for _, v := range mappingJavaDownloadRecordSortByEnum { + values = append(values, v) + } + return values +} + +// GetJavaDownloadRecordSortByEnumStringValues Enumerates the set of values in String for JavaDownloadRecordSortByEnum +func GetJavaDownloadRecordSortByEnumStringValues() []string { + return []string{ + "timeDownloaded", + "downloadSourceId", + "downloadType", + } +} + +// GetMappingJavaDownloadRecordSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJavaDownloadRecordSortByEnum(val string) (JavaDownloadRecordSortByEnum, bool) { + enum, ok := mappingJavaDownloadRecordSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/java_download_record_summary.go b/jmsjavadownloads/java_download_record_summary.go new file mode 100644 index 0000000000..08d097d8bb --- /dev/null +++ b/jmsjavadownloads/java_download_record_summary.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadRecordSummary A summary of Java artifact download in a tenancy. +type JavaDownloadRecordSummary struct { + + // Identifier of the source that downloaded the artifact. + DownloadSourceId *string `mandatory:"true" json:"downloadSourceId"` + + // Timestamp of download. + TimeDownloaded *common.SDKTime `mandatory:"true" json:"timeDownloaded"` + + // Type of download. + DownloadType *string `mandatory:"true" json:"downloadType"` + + // The Java family version identifier. + FamilyVersion *string `mandatory:"false" json:"familyVersion"` + + // The Java family display name. + FamilyDisplayName *string `mandatory:"false" json:"familyDisplayName"` + + // The Java release version identifier. + ReleaseVersion *string `mandatory:"false" json:"releaseVersion"` + + // The target Operating System family for the artifact. + OsFamily *string `mandatory:"false" json:"osFamily"` + + // The target Operating System architecture for the artifact. + Architecture *string `mandatory:"false" json:"architecture"` + + // The package type(typically the file extension) of the artifact. + PackageType *string `mandatory:"false" json:"packageType"` + + // Additional information about the package type. + PackageTypeDetail *string `mandatory:"false" json:"packageTypeDetail"` +} + +func (m JavaDownloadRecordSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadRecordSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_report.go b/jmsjavadownloads/java_download_report.go new file mode 100644 index 0000000000..a3d16a7a6b --- /dev/null +++ b/jmsjavadownloads/java_download_report.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadReport Details about a Java download report in a tenancy. +// The report is a file in Object Storage. It contains the download records in a specific format. +type JavaDownloadReport struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Java download report. + Id *string `mandatory:"true" json:"id"` + + // Display name for the Java download report. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The file format of the Java download report. + Format JavaDownloadReportFormatEnum `mandatory:"true" json:"format"` + + // Approximate size of the Java download report file in bytes. + FileSizeInBytes *int64 `mandatory:"true" json:"fileSizeInBytes"` + + // The algorithm used for calculating the checksum. + ChecksumType ChecksumTypeEnum `mandatory:"true" json:"checksumType"` + + // The checksum value of the Java download report file. + ChecksumValue *string `mandatory:"true" json:"checksumValue"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy scoped to the Java download report. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + CreatedBy *Principal `mandatory:"true" json:"createdBy"` + + // The time the Java download report was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Java download report. + LifecycleState LifecycleStateEnum `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"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + 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"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JavaDownloadReport) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadReport) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJavaDownloadReportFormatEnum(string(m.Format)); !ok && m.Format != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Format: %s. Supported values are: %s.", m.Format, strings.Join(GetJavaDownloadReportFormatEnumStringValues(), ","))) + } + if _, ok := GetMappingChecksumTypeEnum(string(m.ChecksumType)); !ok && m.ChecksumType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ChecksumType: %s. Supported values are: %s.", m.ChecksumType, strings.Join(GetChecksumTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStateEnum(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(GetLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_report_collection.go b/jmsjavadownloads/java_download_report_collection.go new file mode 100644 index 0000000000..06d67cca10 --- /dev/null +++ b/jmsjavadownloads/java_download_report_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadReportCollection Collection of JavaDownloadReportSummary objects. +type JavaDownloadReportCollection struct { + + // A list of JavaDownloadReportSummary objects in a tenancy. + Items []JavaDownloadReportSummary `mandatory:"true" json:"items"` +} + +func (m JavaDownloadReportCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadReportCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_report_format.go b/jmsjavadownloads/java_download_report_format.go new file mode 100644 index 0000000000..cf306092d6 --- /dev/null +++ b/jmsjavadownloads/java_download_report_format.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// JavaDownloadReportFormatEnum Enum with underlying type: string +type JavaDownloadReportFormatEnum string + +// Set of constants representing the allowable values for JavaDownloadReportFormatEnum +const ( + JavaDownloadReportFormatCsv JavaDownloadReportFormatEnum = "CSV" +) + +var mappingJavaDownloadReportFormatEnum = map[string]JavaDownloadReportFormatEnum{ + "CSV": JavaDownloadReportFormatCsv, +} + +var mappingJavaDownloadReportFormatEnumLowerCase = map[string]JavaDownloadReportFormatEnum{ + "csv": JavaDownloadReportFormatCsv, +} + +// GetJavaDownloadReportFormatEnumValues Enumerates the set of values for JavaDownloadReportFormatEnum +func GetJavaDownloadReportFormatEnumValues() []JavaDownloadReportFormatEnum { + values := make([]JavaDownloadReportFormatEnum, 0) + for _, v := range mappingJavaDownloadReportFormatEnum { + values = append(values, v) + } + return values +} + +// GetJavaDownloadReportFormatEnumStringValues Enumerates the set of values in String for JavaDownloadReportFormatEnum +func GetJavaDownloadReportFormatEnumStringValues() []string { + return []string{ + "CSV", + } +} + +// GetMappingJavaDownloadReportFormatEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJavaDownloadReportFormatEnum(val string) (JavaDownloadReportFormatEnum, bool) { + enum, ok := mappingJavaDownloadReportFormatEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/java_download_report_sort_by.go b/jmsjavadownloads/java_download_report_sort_by.go new file mode 100644 index 0000000000..b065fbd5bc --- /dev/null +++ b/jmsjavadownloads/java_download_report_sort_by.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// JavaDownloadReportSortByEnum Enum with underlying type: string +type JavaDownloadReportSortByEnum string + +// Set of constants representing the allowable values for JavaDownloadReportSortByEnum +const ( + JavaDownloadReportSortByTimeCreated JavaDownloadReportSortByEnum = "timeCreated" + JavaDownloadReportSortByDisplayName JavaDownloadReportSortByEnum = "displayName" +) + +var mappingJavaDownloadReportSortByEnum = map[string]JavaDownloadReportSortByEnum{ + "timeCreated": JavaDownloadReportSortByTimeCreated, + "displayName": JavaDownloadReportSortByDisplayName, +} + +var mappingJavaDownloadReportSortByEnumLowerCase = map[string]JavaDownloadReportSortByEnum{ + "timecreated": JavaDownloadReportSortByTimeCreated, + "displayname": JavaDownloadReportSortByDisplayName, +} + +// GetJavaDownloadReportSortByEnumValues Enumerates the set of values for JavaDownloadReportSortByEnum +func GetJavaDownloadReportSortByEnumValues() []JavaDownloadReportSortByEnum { + values := make([]JavaDownloadReportSortByEnum, 0) + for _, v := range mappingJavaDownloadReportSortByEnum { + values = append(values, v) + } + return values +} + +// GetJavaDownloadReportSortByEnumStringValues Enumerates the set of values in String for JavaDownloadReportSortByEnum +func GetJavaDownloadReportSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingJavaDownloadReportSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingJavaDownloadReportSortByEnum(val string) (JavaDownloadReportSortByEnum, bool) { + enum, ok := mappingJavaDownloadReportSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/java_download_report_summary.go b/jmsjavadownloads/java_download_report_summary.go new file mode 100644 index 0000000000..2582634bc0 --- /dev/null +++ b/jmsjavadownloads/java_download_report_summary.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadReportSummary A summary of the Java download report in a tenancy. +type JavaDownloadReportSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Java download report. + Id *string `mandatory:"true" json:"id"` + + // Display name for the Java download report. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The file format of the Java download report. + Format JavaDownloadReportFormatEnum `mandatory:"true" json:"format"` + + // Approximate size of the Java download report file in bytes. + FileSizeInBytes *int64 `mandatory:"true" json:"fileSizeInBytes"` + + // The algorithm used for calculating the checksum. + ChecksumType ChecksumTypeEnum `mandatory:"true" json:"checksumType"` + + // The checksum value of the Java download report file. + ChecksumValue *string `mandatory:"true" json:"checksumValue"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy scoped to the Java download report. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + CreatedBy *Principal `mandatory:"true" json:"createdBy"` + + // The time the Java download report was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Java download report. + LifecycleState LifecycleStateEnum `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"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + 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"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JavaDownloadReportSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadReportSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJavaDownloadReportFormatEnum(string(m.Format)); !ok && m.Format != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Format: %s. Supported values are: %s.", m.Format, strings.Join(GetJavaDownloadReportFormatEnumStringValues(), ","))) + } + if _, ok := GetMappingChecksumTypeEnum(string(m.ChecksumType)); !ok && m.ChecksumType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ChecksumType: %s. Supported values are: %s.", m.ChecksumType, strings.Join(GetChecksumTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStateEnum(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(GetLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_token.go b/jmsjavadownloads/java_download_token.go new file mode 100644 index 0000000000..303e26888a --- /dev/null +++ b/jmsjavadownloads/java_download_token.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadToken A JavaDownloadToken is a primary resource for the script friendly URLs. The value of this token serves as the authorization token for the download. +type JavaDownloadToken struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JavaDownloadToken. + Id *string `mandatory:"true" json:"id"` + + // User provided display name of the JavaDownloadToken. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy scoped to the JavaDownloadToken. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + CreatedBy *Principal `mandatory:"true" json:"createdBy"` + + // User provided description of the JavaDownloadToken. + Description *string `mandatory:"true" json:"description"` + + // Uniquely generated value for the JavaDownloadToken. + Value *string `mandatory:"true" json:"value"` + + // The time the JavaDownloadToken was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The expiry time of the JavaDownloadToken. An RFC3339 formatted datetime string. + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // The associated Java version of the JavaDownloadToken. + JavaVersion *string `mandatory:"true" json:"javaVersion"` + + // The current state of the JavaDownloadToken. + LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + LastUpdatedBy *Principal `mandatory:"false" json:"lastUpdatedBy"` + + // The time the JavaDownloadToken was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The time the JavaDownloadToken was last used for download. An RFC3339 formatted datetime string. + TimeLastUsed *common.SDKTime `mandatory:"false" json:"timeLastUsed"` + + // The license type(s) associated with the JavaDownloadToken. + LicenseType []LicenseTypeEnum `mandatory:"false" json:"licenseType"` + + // A flag to indicate if the token is default. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // Possible lifecycle substates. + LifecycleDetails TokenLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JavaDownloadToken) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadToken) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLifecycleStateEnum(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(GetLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingTokenLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetTokenLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_token_collection.go b/jmsjavadownloads/java_download_token_collection.go new file mode 100644 index 0000000000..5635c345e2 --- /dev/null +++ b/jmsjavadownloads/java_download_token_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadTokenCollection Contains a list of JavaDownloadTokenSummary objects. +type JavaDownloadTokenCollection struct { + + // List of JavaDownloadTokens. + Items []JavaDownloadTokenSummary `mandatory:"true" json:"items"` +} + +func (m JavaDownloadTokenCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadTokenCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_download_token_summary.go b/jmsjavadownloads/java_download_token_summary.go new file mode 100644 index 0000000000..068826ffd6 --- /dev/null +++ b/jmsjavadownloads/java_download_token_summary.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaDownloadTokenSummary Summary of the JavaDownloadToken. +type JavaDownloadTokenSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JavaDownloadToken. + Id *string `mandatory:"true" json:"id"` + + // User provided display name of the JavaDownloadToken. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy scoped to the JavaDownloadToken. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + CreatedBy *Principal `mandatory:"true" json:"createdBy"` + + // User provided description of the JavaDownloadToken. + Description *string `mandatory:"true" json:"description"` + + // Uniquely generated value for the JavaDownloadToken. + Value *string `mandatory:"true" json:"value"` + + // The time the JavaDownloadToken was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The expiry time of the JavaDownloadToken. An RFC3339 formatted datetime string. + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // The associated Java version of the JavaDownloadToken. + JavaVersion *string `mandatory:"true" json:"javaVersion"` + + // The current state of the JavaDownloadToken. + LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + LastUpdatedBy *Principal `mandatory:"false" json:"lastUpdatedBy"` + + // The time the JavaDownloadToken was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The time the JavaDownloadToken was last used for download. An RFC3339 formatted datetime string. + TimeLastUsed *common.SDKTime `mandatory:"false" json:"timeLastUsed"` + + // The license type(s) associated with the JavaDownloadToken. + LicenseType []LicenseTypeEnum `mandatory:"false" json:"licenseType"` + + // A flag to indicate if the token is default. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // Possible lifecycle substates. + LifecycleDetails TokenLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JavaDownloadTokenSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaDownloadTokenSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLifecycleStateEnum(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(GetLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingTokenLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetTokenLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_license.go b/jmsjavadownloads/java_license.go new file mode 100644 index 0000000000..032f08b899 --- /dev/null +++ b/jmsjavadownloads/java_license.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaLicense Details about a license type for Java. +type JavaLicense struct { + + // Commonly used name for the license type. + DisplayName *string `mandatory:"true" json:"displayName"` + + // License Type + LicenseType LicenseTypeEnum `mandatory:"true" json:"licenseType"` + + // Publicly accessible license URL containing the detailed terms and conditions. + LicenseUrl *string `mandatory:"true" json:"licenseUrl"` +} + +func (m JavaLicense) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaLicense) ValidateEnumValue() (bool, error) { + errMessage := []string{} + 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 len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_license_acceptance_record.go b/jmsjavadownloads/java_license_acceptance_record.go new file mode 100644 index 0000000000..157cea704a --- /dev/null +++ b/jmsjavadownloads/java_license_acceptance_record.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaLicenseAcceptanceRecord User acceptance record for a Java license. +type JavaLicenseAcceptanceRecord struct { + + // The unique identifier for the acceptance record. + Id *string `mandatory:"true" json:"id"` + + // Status of license acceptance. + LicenseAcceptanceStatus LicenseAcceptanceStatusEnum `mandatory:"true" json:"licenseAcceptanceStatus"` + + // The tenancy OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user accepting the license. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // License type associated with the acceptance. + LicenseType LicenseTypeEnum `mandatory:"true" json:"licenseType"` + + CreatedBy *Principal `mandatory:"true" json:"createdBy"` + + // The date and time of license acceptance(formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + LastUpdatedBy *Principal `mandatory:"false" json:"lastUpdatedBy"` + + // The date and time of last update(formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeLastUpdated *common.SDKTime `mandatory:"false" json:"timeLastUpdated"` + + // The current state of the JavaLicenseAcceptanceRecord. + LifecycleState LifecycleStateEnum `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"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + 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"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JavaLicenseAcceptanceRecord) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaLicenseAcceptanceRecord) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseAcceptanceStatusEnum(string(m.LicenseAcceptanceStatus)); !ok && m.LicenseAcceptanceStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseAcceptanceStatus: %s. Supported values are: %s.", m.LicenseAcceptanceStatus, strings.Join(GetLicenseAcceptanceStatusEnumStringValues(), ","))) + } + 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 := GetMappingLifecycleStateEnum(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(GetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_license_acceptance_record_collection.go b/jmsjavadownloads/java_license_acceptance_record_collection.go new file mode 100644 index 0000000000..1739a3c44c --- /dev/null +++ b/jmsjavadownloads/java_license_acceptance_record_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaLicenseAcceptanceRecordCollection Contains a list of JavaLicenseAcceptanceRecordSummary objects. +type JavaLicenseAcceptanceRecordCollection struct { + + // List of JavaLicenseAcceptanceRecords. + Items []JavaLicenseAcceptanceRecordSummary `mandatory:"true" json:"items"` +} + +func (m JavaLicenseAcceptanceRecordCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaLicenseAcceptanceRecordCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_license_acceptance_record_summary.go b/jmsjavadownloads/java_license_acceptance_record_summary.go new file mode 100644 index 0000000000..0f39529025 --- /dev/null +++ b/jmsjavadownloads/java_license_acceptance_record_summary.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaLicenseAcceptanceRecordSummary User acceptance record summary for a Java license. +type JavaLicenseAcceptanceRecordSummary struct { + + // The unique identifier for the acceptance record. + Id *string `mandatory:"true" json:"id"` + + // Status of license acceptance. + LicenseAcceptanceStatus LicenseAcceptanceStatusEnum `mandatory:"true" json:"licenseAcceptanceStatus"` + + // The tenancy OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user accepting the license. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // License type associated with the acceptance. + LicenseType LicenseTypeEnum `mandatory:"true" json:"licenseType"` + + CreatedBy *Principal `mandatory:"true" json:"createdBy"` + + // The date and time of license acceptance(formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + LastUpdatedBy *Principal `mandatory:"false" json:"lastUpdatedBy"` + + // The date and time of last update(formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeLastUpdated *common.SDKTime `mandatory:"false" json:"timeLastUpdated"` + + // The current state of the JavaLicenseAcceptanceRecord. + LifecycleState LifecycleStateEnum `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"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + 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"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m JavaLicenseAcceptanceRecordSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaLicenseAcceptanceRecordSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseAcceptanceStatusEnum(string(m.LicenseAcceptanceStatus)); !ok && m.LicenseAcceptanceStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseAcceptanceStatus: %s. Supported values are: %s.", m.LicenseAcceptanceStatus, strings.Join(GetLicenseAcceptanceStatusEnumStringValues(), ","))) + } + 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 := GetMappingLifecycleStateEnum(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(GetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_license_collection.go b/jmsjavadownloads/java_license_collection.go new file mode 100644 index 0000000000..7ecdf6fe8c --- /dev/null +++ b/jmsjavadownloads/java_license_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaLicenseCollection Collection of the Java license summary objects. +type JavaLicenseCollection struct { + + // A list of JavaLicenseSummary objects. + Items []JavaLicenseSummary `mandatory:"true" json:"items"` +} + +func (m JavaLicenseCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaLicenseCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/java_license_summary.go b/jmsjavadownloads/java_license_summary.go new file mode 100644 index 0000000000..f10bfd03fc --- /dev/null +++ b/jmsjavadownloads/java_license_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// JavaLicenseSummary Summary of a license type for Java. +type JavaLicenseSummary struct { + + // Commonly used name for the license type. + DisplayName *string `mandatory:"true" json:"displayName"` + + // License Type + LicenseType LicenseTypeEnum `mandatory:"true" json:"licenseType"` + + // Publicly accessible license URL containing the detailed terms and conditions. + LicenseUrl *string `mandatory:"true" json:"licenseUrl"` +} + +func (m JavaLicenseSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m JavaLicenseSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + 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 len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/jmsjavadownloads_javadownload_client.go b/jmsjavadownloads/jmsjavadownloads_javadownload_client.go new file mode 100644 index 0000000000..a38b005c2b --- /dev/null +++ b/jmsjavadownloads/jmsjavadownloads_javadownload_client.go @@ -0,0 +1,1563 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// JavaDownloadClient a client for JavaDownload +type JavaDownloadClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewJavaDownloadClientWithConfigurationProvider Creates a new default JavaDownload client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewJavaDownloadClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client JavaDownloadClient, err error) { + if enabled := common.CheckForEnabledServices("jmsjavadownloads"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config 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 newJavaDownloadClientFromBaseClient(baseClient, provider) +} + +// NewJavaDownloadClientWithOboToken Creates a new default JavaDownload 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 NewJavaDownloadClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client JavaDownloadClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newJavaDownloadClientFromBaseClient(baseClient, configProvider) +} + +func newJavaDownloadClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client JavaDownloadClient, err error) { + // JavaDownload service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("JavaDownload")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = JavaDownloadClient{BaseClient: baseClient} + client.BasePath = "" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *JavaDownloadClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("jmsjavadownloads", "https://javamanagementservice-download.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *JavaDownloadClient) 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 *JavaDownloadClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CancelWorkRequest Cancels the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CancelWorkRequest.go.html to see an example of how to use CancelWorkRequest API. +// A default retry strategy applies to this operation CancelWorkRequest() +func (client JavaDownloadClient) CancelWorkRequest(ctx context.Context, request CancelWorkRequestRequest) (response CancelWorkRequestResponse, 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.cancelWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CancelWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CancelWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CancelWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CancelWorkRequestResponse") + } + return +} + +// cancelWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) cancelWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/20230601/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CancelWorkRequestResponse + 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, "JavaDownload", "CancelWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateJavaDownloadReport Create a new report in the specified format containing the download details +// for the tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CreateJavaDownloadReport.go.html to see an example of how to use CreateJavaDownloadReport API. +// A default retry strategy applies to this operation CreateJavaDownloadReport() +func (client JavaDownloadClient) CreateJavaDownloadReport(ctx context.Context, request CreateJavaDownloadReportRequest) (response CreateJavaDownloadReportResponse, 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.createJavaDownloadReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateJavaDownloadReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateJavaDownloadReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateJavaDownloadReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateJavaDownloadReportResponse") + } + return +} + +// createJavaDownloadReport implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) createJavaDownloadReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/20230601/javaDownloadReports", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateJavaDownloadReportResponse + 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, "JavaDownload", "CreateJavaDownloadReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateJavaDownloadToken Creates a new JavaDownloadToken in the tenancy with specified attributes. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CreateJavaDownloadToken.go.html to see an example of how to use CreateJavaDownloadToken API. +// A default retry strategy applies to this operation CreateJavaDownloadToken() +func (client JavaDownloadClient) CreateJavaDownloadToken(ctx context.Context, request CreateJavaDownloadTokenRequest) (response CreateJavaDownloadTokenResponse, 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.createJavaDownloadToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateJavaDownloadTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateJavaDownloadTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateJavaDownloadTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateJavaDownloadTokenResponse") + } + return +} + +// createJavaDownloadToken implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) createJavaDownloadToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/20230601/javaDownloadTokens", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateJavaDownloadTokenResponse + 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, "JavaDownload", "CreateJavaDownloadToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateJavaLicenseAcceptanceRecord Creates a Java license acceptance record for the specified license type in a tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/CreateJavaLicenseAcceptanceRecord.go.html to see an example of how to use CreateJavaLicenseAcceptanceRecord API. +// A default retry strategy applies to this operation CreateJavaLicenseAcceptanceRecord() +func (client JavaDownloadClient) CreateJavaLicenseAcceptanceRecord(ctx context.Context, request CreateJavaLicenseAcceptanceRecordRequest) (response CreateJavaLicenseAcceptanceRecordResponse, 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.createJavaLicenseAcceptanceRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateJavaLicenseAcceptanceRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateJavaLicenseAcceptanceRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateJavaLicenseAcceptanceRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateJavaLicenseAcceptanceRecordResponse") + } + return +} + +// createJavaLicenseAcceptanceRecord implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) createJavaLicenseAcceptanceRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/20230601/javaLicenseAcceptanceRecords", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateJavaLicenseAcceptanceRecordResponse + 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, "JavaDownload", "CreateJavaLicenseAcceptanceRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteJavaDownloadReport Deletes a JavaDownloadReport resource by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/DeleteJavaDownloadReport.go.html to see an example of how to use DeleteJavaDownloadReport API. +// A default retry strategy applies to this operation DeleteJavaDownloadReport() +func (client JavaDownloadClient) DeleteJavaDownloadReport(ctx context.Context, request DeleteJavaDownloadReportRequest) (response DeleteJavaDownloadReportResponse, 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.deleteJavaDownloadReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteJavaDownloadReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteJavaDownloadReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteJavaDownloadReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteJavaDownloadReportResponse") + } + return +} + +// deleteJavaDownloadReport implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) deleteJavaDownloadReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/20230601/javaDownloadReports/{javaDownloadReportId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteJavaDownloadReportResponse + 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, "JavaDownload", "DeleteJavaDownloadReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteJavaDownloadToken Deletes a JavaDownloadToken resource by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/DeleteJavaDownloadToken.go.html to see an example of how to use DeleteJavaDownloadToken API. +// A default retry strategy applies to this operation DeleteJavaDownloadToken() +func (client JavaDownloadClient) DeleteJavaDownloadToken(ctx context.Context, request DeleteJavaDownloadTokenRequest) (response DeleteJavaDownloadTokenResponse, 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.deleteJavaDownloadToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteJavaDownloadTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteJavaDownloadTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteJavaDownloadTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteJavaDownloadTokenResponse") + } + return +} + +// deleteJavaDownloadToken implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) deleteJavaDownloadToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/20230601/javaDownloadTokens/{javaDownloadTokenId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteJavaDownloadTokenResponse + 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, "JavaDownload", "DeleteJavaDownloadToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteJavaLicenseAcceptanceRecord Deletes a Java license acceptance record with the specified identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/DeleteJavaLicenseAcceptanceRecord.go.html to see an example of how to use DeleteJavaLicenseAcceptanceRecord API. +// A default retry strategy applies to this operation DeleteJavaLicenseAcceptanceRecord() +func (client JavaDownloadClient) DeleteJavaLicenseAcceptanceRecord(ctx context.Context, request DeleteJavaLicenseAcceptanceRecordRequest) (response DeleteJavaLicenseAcceptanceRecordResponse, 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.deleteJavaLicenseAcceptanceRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteJavaLicenseAcceptanceRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteJavaLicenseAcceptanceRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteJavaLicenseAcceptanceRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteJavaLicenseAcceptanceRecordResponse") + } + return +} + +// deleteJavaLicenseAcceptanceRecord implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) deleteJavaLicenseAcceptanceRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/20230601/javaLicenseAcceptanceRecords/{javaLicenseAcceptanceRecordId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteJavaLicenseAcceptanceRecordResponse + 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, "JavaDownload", "DeleteJavaLicenseAcceptanceRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GenerateArtifactDownloadUrl Generates a short-lived download URL and returns it in the response payload. +// The returned URL can then be used for downloading the specific Java runtime artifact. +// Use the GetJavaRelease API +// to get information about available artifacts for a specific release. Each such artifact is uniquely identified by an `artifactId`. +// Refer JavaArtifact for more details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GenerateArtifactDownloadUrl.go.html to see an example of how to use GenerateArtifactDownloadUrl API. +// A default retry strategy applies to this operation GenerateArtifactDownloadUrl() +func (client JavaDownloadClient) GenerateArtifactDownloadUrl(ctx context.Context, request GenerateArtifactDownloadUrlRequest) (response GenerateArtifactDownloadUrlResponse, 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.generateArtifactDownloadUrl, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GenerateArtifactDownloadUrlResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GenerateArtifactDownloadUrlResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GenerateArtifactDownloadUrlResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GenerateArtifactDownloadUrlResponse") + } + return +} + +// generateArtifactDownloadUrl implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) generateArtifactDownloadUrl(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/20230601/actions/generateArtifactDownloadUrl", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GenerateArtifactDownloadUrlResponse + 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, "JavaDownload", "GenerateArtifactDownloadUrl", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetJavaDownloadReport Gets a JavaDownloadReport by the specified identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaDownloadReport.go.html to see an example of how to use GetJavaDownloadReport API. +// A default retry strategy applies to this operation GetJavaDownloadReport() +func (client JavaDownloadClient) GetJavaDownloadReport(ctx context.Context, request GetJavaDownloadReportRequest) (response GetJavaDownloadReportResponse, 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.getJavaDownloadReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetJavaDownloadReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetJavaDownloadReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetJavaDownloadReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetJavaDownloadReportResponse") + } + return +} + +// getJavaDownloadReport implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) getJavaDownloadReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaDownloadReports/{javaDownloadReportId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetJavaDownloadReportResponse + 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, "JavaDownload", "GetJavaDownloadReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetJavaDownloadReportContent Retrieve a Java download report with the specified identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaDownloadReportContent.go.html to see an example of how to use GetJavaDownloadReportContent API. +// A default retry strategy applies to this operation GetJavaDownloadReportContent() +func (client JavaDownloadClient) GetJavaDownloadReportContent(ctx context.Context, request GetJavaDownloadReportContentRequest) (response GetJavaDownloadReportContentResponse, 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.getJavaDownloadReportContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetJavaDownloadReportContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetJavaDownloadReportContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetJavaDownloadReportContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetJavaDownloadReportContentResponse") + } + return +} + +// getJavaDownloadReportContent implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) getJavaDownloadReportContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaDownloadReports/{javaDownloadReportId}/content", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetJavaDownloadReportContentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "JavaDownload", "GetJavaDownloadReportContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetJavaDownloadToken Gets a JavaDownloadToken by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaDownloadToken.go.html to see an example of how to use GetJavaDownloadToken API. +// A default retry strategy applies to this operation GetJavaDownloadToken() +func (client JavaDownloadClient) GetJavaDownloadToken(ctx context.Context, request GetJavaDownloadTokenRequest) (response GetJavaDownloadTokenResponse, 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.getJavaDownloadToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetJavaDownloadTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetJavaDownloadTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetJavaDownloadTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetJavaDownloadTokenResponse") + } + return +} + +// getJavaDownloadToken implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) getJavaDownloadToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaDownloadTokens/{javaDownloadTokenId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetJavaDownloadTokenResponse + 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, "JavaDownload", "GetJavaDownloadToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetJavaLicense Return details of the specified Java license type. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaLicense.go.html to see an example of how to use GetJavaLicense API. +// A default retry strategy applies to this operation GetJavaLicense() +func (client JavaDownloadClient) GetJavaLicense(ctx context.Context, request GetJavaLicenseRequest) (response GetJavaLicenseResponse, 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.getJavaLicense, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetJavaLicenseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetJavaLicenseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetJavaLicenseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetJavaLicenseResponse") + } + return +} + +// getJavaLicense implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) getJavaLicense(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaLicenses/{licenseType}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetJavaLicenseResponse + 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, "JavaDownload", "GetJavaLicense", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetJavaLicenseAcceptanceRecord Returns a specific Java license acceptance record in a tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/GetJavaLicenseAcceptanceRecord.go.html to see an example of how to use GetJavaLicenseAcceptanceRecord API. +// A default retry strategy applies to this operation GetJavaLicenseAcceptanceRecord() +func (client JavaDownloadClient) GetJavaLicenseAcceptanceRecord(ctx context.Context, request GetJavaLicenseAcceptanceRecordRequest) (response GetJavaLicenseAcceptanceRecordResponse, 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.getJavaLicenseAcceptanceRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetJavaLicenseAcceptanceRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetJavaLicenseAcceptanceRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetJavaLicenseAcceptanceRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetJavaLicenseAcceptanceRecordResponse") + } + return +} + +// getJavaLicenseAcceptanceRecord implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) getJavaLicenseAcceptanceRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaLicenseAcceptanceRecords/{javaLicenseAcceptanceRecordId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetJavaLicenseAcceptanceRecordResponse + 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, "JavaDownload", "GetJavaLicenseAcceptanceRecord", 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/jmsjavadownloads/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client JavaDownloadClient) 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 JavaDownloadClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/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, "JavaDownload", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListJavaDownloadRecords Returns a list of Java download records in a tenancy based on specified parameters. +// See ListJavaReleases +// for possible values of `javaFamilyVersion` and `javaReleaseVersion` parameters. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaDownloadRecords.go.html to see an example of how to use ListJavaDownloadRecords API. +// A default retry strategy applies to this operation ListJavaDownloadRecords() +func (client JavaDownloadClient) ListJavaDownloadRecords(ctx context.Context, request ListJavaDownloadRecordsRequest) (response ListJavaDownloadRecordsResponse, 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.listJavaDownloadRecords, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListJavaDownloadRecordsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListJavaDownloadRecordsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListJavaDownloadRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListJavaDownloadRecordsResponse") + } + return +} + +// listJavaDownloadRecords implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) listJavaDownloadRecords(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaDownloadRecords", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListJavaDownloadRecordsResponse + 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, "JavaDownload", "ListJavaDownloadRecords", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListJavaDownloadReports Returns a list of JavaDownloadReports. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaDownloadReports.go.html to see an example of how to use ListJavaDownloadReports API. +// A default retry strategy applies to this operation ListJavaDownloadReports() +func (client JavaDownloadClient) ListJavaDownloadReports(ctx context.Context, request ListJavaDownloadReportsRequest) (response ListJavaDownloadReportsResponse, 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.listJavaDownloadReports, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListJavaDownloadReportsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListJavaDownloadReportsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListJavaDownloadReportsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListJavaDownloadReportsResponse") + } + return +} + +// listJavaDownloadReports implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) listJavaDownloadReports(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaDownloadReports", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListJavaDownloadReportsResponse + 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, "JavaDownload", "ListJavaDownloadReports", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListJavaDownloadTokens Returns a list of JavaDownloadTokens. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaDownloadTokens.go.html to see an example of how to use ListJavaDownloadTokens API. +// A default retry strategy applies to this operation ListJavaDownloadTokens() +func (client JavaDownloadClient) ListJavaDownloadTokens(ctx context.Context, request ListJavaDownloadTokensRequest) (response ListJavaDownloadTokensResponse, 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.listJavaDownloadTokens, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListJavaDownloadTokensResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListJavaDownloadTokensResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListJavaDownloadTokensResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListJavaDownloadTokensResponse") + } + return +} + +// listJavaDownloadTokens implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) listJavaDownloadTokens(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaDownloadTokens", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListJavaDownloadTokensResponse + 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, "JavaDownload", "ListJavaDownloadTokens", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListJavaLicenseAcceptanceRecords Returns a list of all the Java license acceptance records in a tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaLicenseAcceptanceRecords.go.html to see an example of how to use ListJavaLicenseAcceptanceRecords API. +// A default retry strategy applies to this operation ListJavaLicenseAcceptanceRecords() +func (client JavaDownloadClient) ListJavaLicenseAcceptanceRecords(ctx context.Context, request ListJavaLicenseAcceptanceRecordsRequest) (response ListJavaLicenseAcceptanceRecordsResponse, 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.listJavaLicenseAcceptanceRecords, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListJavaLicenseAcceptanceRecordsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListJavaLicenseAcceptanceRecordsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListJavaLicenseAcceptanceRecordsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListJavaLicenseAcceptanceRecordsResponse") + } + return +} + +// listJavaLicenseAcceptanceRecords implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) listJavaLicenseAcceptanceRecords(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaLicenseAcceptanceRecords", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListJavaLicenseAcceptanceRecordsResponse + 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, "JavaDownload", "ListJavaLicenseAcceptanceRecords", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListJavaLicenses Return a list with details of all Java licenses. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaLicenses.go.html to see an example of how to use ListJavaLicenses API. +// A default retry strategy applies to this operation ListJavaLicenses() +func (client JavaDownloadClient) ListJavaLicenses(ctx context.Context, request ListJavaLicensesRequest) (response ListJavaLicensesResponse, 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.listJavaLicenses, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListJavaLicensesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListJavaLicensesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListJavaLicensesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListJavaLicensesResponse") + } + return +} + +// listJavaLicenses implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) listJavaLicenses(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/javaLicenses", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListJavaLicensesResponse + 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, "JavaDownload", "ListJavaLicenses", 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/jmsjavadownloads/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client JavaDownloadClient) 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 JavaDownloadClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/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, "JavaDownload", "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/jmsjavadownloads/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client JavaDownloadClient) 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 JavaDownloadClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/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, "JavaDownload", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in a tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client JavaDownloadClient) 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 JavaDownloadClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/20230601/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, "JavaDownload", "ListWorkRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RequestSummarizedJavaDownloadCounts Returns list of download counts grouped by the specified property. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/RequestSummarizedJavaDownloadCounts.go.html to see an example of how to use RequestSummarizedJavaDownloadCounts API. +// A default retry strategy applies to this operation RequestSummarizedJavaDownloadCounts() +func (client JavaDownloadClient) RequestSummarizedJavaDownloadCounts(ctx context.Context, request RequestSummarizedJavaDownloadCountsRequest) (response RequestSummarizedJavaDownloadCountsResponse, 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.requestSummarizedJavaDownloadCounts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RequestSummarizedJavaDownloadCountsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RequestSummarizedJavaDownloadCountsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RequestSummarizedJavaDownloadCountsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RequestSummarizedJavaDownloadCountsResponse") + } + return +} + +// requestSummarizedJavaDownloadCounts implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) requestSummarizedJavaDownloadCounts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/20230601/actions/requestSummarizedJavaDownloadCounts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RequestSummarizedJavaDownloadCountsResponse + 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, "JavaDownload", "RequestSummarizedJavaDownloadCounts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateJavaDownloadToken Updates the JavaDownloadToken specified by the identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/UpdateJavaDownloadToken.go.html to see an example of how to use UpdateJavaDownloadToken API. +// A default retry strategy applies to this operation UpdateJavaDownloadToken() +func (client JavaDownloadClient) UpdateJavaDownloadToken(ctx context.Context, request UpdateJavaDownloadTokenRequest) (response UpdateJavaDownloadTokenResponse, 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.updateJavaDownloadToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateJavaDownloadTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateJavaDownloadTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateJavaDownloadTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateJavaDownloadTokenResponse") + } + return +} + +// updateJavaDownloadToken implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) updateJavaDownloadToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/20230601/javaDownloadTokens/{javaDownloadTokenId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateJavaDownloadTokenResponse + 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, "JavaDownload", "UpdateJavaDownloadToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateJavaLicenseAcceptanceRecord Updates a specific Java license acceptance record in a tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/UpdateJavaLicenseAcceptanceRecord.go.html to see an example of how to use UpdateJavaLicenseAcceptanceRecord API. +// A default retry strategy applies to this operation UpdateJavaLicenseAcceptanceRecord() +func (client JavaDownloadClient) UpdateJavaLicenseAcceptanceRecord(ctx context.Context, request UpdateJavaLicenseAcceptanceRecordRequest) (response UpdateJavaLicenseAcceptanceRecordResponse, 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.updateJavaLicenseAcceptanceRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateJavaLicenseAcceptanceRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateJavaLicenseAcceptanceRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateJavaLicenseAcceptanceRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateJavaLicenseAcceptanceRecordResponse") + } + return +} + +// updateJavaLicenseAcceptanceRecord implements the OCIOperation interface (enables retrying operations) +func (client JavaDownloadClient) updateJavaLicenseAcceptanceRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/20230601/javaLicenseAcceptanceRecords/{javaLicenseAcceptanceRecordId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateJavaLicenseAcceptanceRecordResponse + 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, "JavaDownload", "UpdateJavaLicenseAcceptanceRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/jmsjavadownloads/license_acceptance_sort_by.go b/jmsjavadownloads/license_acceptance_sort_by.go new file mode 100644 index 0000000000..06ab1993f6 --- /dev/null +++ b/jmsjavadownloads/license_acceptance_sort_by.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// LicenseAcceptanceSortByEnum Enum with underlying type: string +type LicenseAcceptanceSortByEnum string + +// Set of constants representing the allowable values for LicenseAcceptanceSortByEnum +const ( + LicenseAcceptanceSortByTimeAccepted LicenseAcceptanceSortByEnum = "timeAccepted" + LicenseAcceptanceSortByTimeLastUpdated LicenseAcceptanceSortByEnum = "timeLastUpdated" + LicenseAcceptanceSortByLicenseAcceptanceStatus LicenseAcceptanceSortByEnum = "licenseAcceptanceStatus" +) + +var mappingLicenseAcceptanceSortByEnum = map[string]LicenseAcceptanceSortByEnum{ + "timeAccepted": LicenseAcceptanceSortByTimeAccepted, + "timeLastUpdated": LicenseAcceptanceSortByTimeLastUpdated, + "licenseAcceptanceStatus": LicenseAcceptanceSortByLicenseAcceptanceStatus, +} + +var mappingLicenseAcceptanceSortByEnumLowerCase = map[string]LicenseAcceptanceSortByEnum{ + "timeaccepted": LicenseAcceptanceSortByTimeAccepted, + "timelastupdated": LicenseAcceptanceSortByTimeLastUpdated, + "licenseacceptancestatus": LicenseAcceptanceSortByLicenseAcceptanceStatus, +} + +// GetLicenseAcceptanceSortByEnumValues Enumerates the set of values for LicenseAcceptanceSortByEnum +func GetLicenseAcceptanceSortByEnumValues() []LicenseAcceptanceSortByEnum { + values := make([]LicenseAcceptanceSortByEnum, 0) + for _, v := range mappingLicenseAcceptanceSortByEnum { + values = append(values, v) + } + return values +} + +// GetLicenseAcceptanceSortByEnumStringValues Enumerates the set of values in String for LicenseAcceptanceSortByEnum +func GetLicenseAcceptanceSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + "timeLastUpdated", + "licenseAcceptanceStatus", + } +} + +// GetMappingLicenseAcceptanceSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLicenseAcceptanceSortByEnum(val string) (LicenseAcceptanceSortByEnum, bool) { + enum, ok := mappingLicenseAcceptanceSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/license_acceptance_status.go b/jmsjavadownloads/license_acceptance_status.go new file mode 100644 index 0000000000..b74ec08391 --- /dev/null +++ b/jmsjavadownloads/license_acceptance_status.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// LicenseAcceptanceStatusEnum Enum with underlying type: string +type LicenseAcceptanceStatusEnum string + +// Set of constants representing the allowable values for LicenseAcceptanceStatusEnum +const ( + LicenseAcceptanceStatusAccepted LicenseAcceptanceStatusEnum = "ACCEPTED" + LicenseAcceptanceStatusRevoked LicenseAcceptanceStatusEnum = "REVOKED" +) + +var mappingLicenseAcceptanceStatusEnum = map[string]LicenseAcceptanceStatusEnum{ + "ACCEPTED": LicenseAcceptanceStatusAccepted, + "REVOKED": LicenseAcceptanceStatusRevoked, +} + +var mappingLicenseAcceptanceStatusEnumLowerCase = map[string]LicenseAcceptanceStatusEnum{ + "accepted": LicenseAcceptanceStatusAccepted, + "revoked": LicenseAcceptanceStatusRevoked, +} + +// GetLicenseAcceptanceStatusEnumValues Enumerates the set of values for LicenseAcceptanceStatusEnum +func GetLicenseAcceptanceStatusEnumValues() []LicenseAcceptanceStatusEnum { + values := make([]LicenseAcceptanceStatusEnum, 0) + for _, v := range mappingLicenseAcceptanceStatusEnum { + values = append(values, v) + } + return values +} + +// GetLicenseAcceptanceStatusEnumStringValues Enumerates the set of values in String for LicenseAcceptanceStatusEnum +func GetLicenseAcceptanceStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "REVOKED", + } +} + +// GetMappingLicenseAcceptanceStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLicenseAcceptanceStatusEnum(val string) (LicenseAcceptanceStatusEnum, bool) { + enum, ok := mappingLicenseAcceptanceStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/license_sort_by.go b/jmsjavadownloads/license_sort_by.go new file mode 100644 index 0000000000..dca3f377c5 --- /dev/null +++ b/jmsjavadownloads/license_sort_by.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// LicenseSortByEnum Enum with underlying type: string +type LicenseSortByEnum string + +// Set of constants representing the allowable values for LicenseSortByEnum +const ( + LicenseSortByLicenseType LicenseSortByEnum = "licenseType" + LicenseSortByDisplayName LicenseSortByEnum = "displayName" +) + +var mappingLicenseSortByEnum = map[string]LicenseSortByEnum{ + "licenseType": LicenseSortByLicenseType, + "displayName": LicenseSortByDisplayName, +} + +var mappingLicenseSortByEnumLowerCase = map[string]LicenseSortByEnum{ + "licensetype": LicenseSortByLicenseType, + "displayname": LicenseSortByDisplayName, +} + +// GetLicenseSortByEnumValues Enumerates the set of values for LicenseSortByEnum +func GetLicenseSortByEnumValues() []LicenseSortByEnum { + values := make([]LicenseSortByEnum, 0) + for _, v := range mappingLicenseSortByEnum { + values = append(values, v) + } + return values +} + +// GetLicenseSortByEnumStringValues Enumerates the set of values in String for LicenseSortByEnum +func GetLicenseSortByEnumStringValues() []string { + return []string{ + "licenseType", + "displayName", + } +} + +// GetMappingLicenseSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLicenseSortByEnum(val string) (LicenseSortByEnum, bool) { + enum, ok := mappingLicenseSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/license_type.go b/jmsjavadownloads/license_type.go new file mode 100644 index 0000000000..ba6fe6151c --- /dev/null +++ b/jmsjavadownloads/license_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// LicenseTypeEnum Enum with underlying type: string +type LicenseTypeEnum string + +// Set of constants representing the allowable values for LicenseTypeEnum +const ( + LicenseTypeOtn LicenseTypeEnum = "OTN" + LicenseTypeNftc LicenseTypeEnum = "NFTC" + LicenseTypeRestricted LicenseTypeEnum = "RESTRICTED" +) + +var mappingLicenseTypeEnum = map[string]LicenseTypeEnum{ + "OTN": LicenseTypeOtn, + "NFTC": LicenseTypeNftc, + "RESTRICTED": LicenseTypeRestricted, +} + +var mappingLicenseTypeEnumLowerCase = map[string]LicenseTypeEnum{ + "otn": LicenseTypeOtn, + "nftc": LicenseTypeNftc, + "restricted": LicenseTypeRestricted, +} + +// GetLicenseTypeEnumValues Enumerates the set of values for LicenseTypeEnum +func GetLicenseTypeEnumValues() []LicenseTypeEnum { + values := make([]LicenseTypeEnum, 0) + for _, v := range mappingLicenseTypeEnum { + values = append(values, v) + } + return values +} + +// GetLicenseTypeEnumStringValues Enumerates the set of values in String for LicenseTypeEnum +func GetLicenseTypeEnumStringValues() []string { + return []string{ + "OTN", + "NFTC", + "RESTRICTED", + } +} + +// GetMappingLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLicenseTypeEnum(val string) (LicenseTypeEnum, bool) { + enum, ok := mappingLicenseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/lifecycle_state.go b/jmsjavadownloads/lifecycle_state.go new file mode 100644 index 0000000000..0f61c24d5c --- /dev/null +++ b/jmsjavadownloads/lifecycle_state.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// LifecycleStateEnum Enum with underlying type: string +type LifecycleStateEnum string + +// Set of constants representing the allowable values for LifecycleStateEnum +const ( + LifecycleStateActive LifecycleStateEnum = "ACTIVE" + LifecycleStateCreating LifecycleStateEnum = "CREATING" + LifecycleStateDeleted LifecycleStateEnum = "DELETED" + LifecycleStateDeleting LifecycleStateEnum = "DELETING" + LifecycleStateFailed LifecycleStateEnum = "FAILED" + LifecycleStateNeedsAttention LifecycleStateEnum = "NEEDS_ATTENTION" + LifecycleStateUpdating LifecycleStateEnum = "UPDATING" +) + +var mappingLifecycleStateEnum = map[string]LifecycleStateEnum{ + "ACTIVE": LifecycleStateActive, + "CREATING": LifecycleStateCreating, + "DELETED": LifecycleStateDeleted, + "DELETING": LifecycleStateDeleting, + "FAILED": LifecycleStateFailed, + "NEEDS_ATTENTION": LifecycleStateNeedsAttention, + "UPDATING": LifecycleStateUpdating, +} + +var mappingLifecycleStateEnumLowerCase = map[string]LifecycleStateEnum{ + "active": LifecycleStateActive, + "creating": LifecycleStateCreating, + "deleted": LifecycleStateDeleted, + "deleting": LifecycleStateDeleting, + "failed": LifecycleStateFailed, + "needs_attention": LifecycleStateNeedsAttention, + "updating": LifecycleStateUpdating, +} + +// GetLifecycleStateEnumValues Enumerates the set of values for LifecycleStateEnum +func GetLifecycleStateEnumValues() []LifecycleStateEnum { + values := make([]LifecycleStateEnum, 0) + for _, v := range mappingLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetLifecycleStateEnumStringValues Enumerates the set of values in String for LifecycleStateEnum +func GetLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "CREATING", + "DELETED", + "DELETING", + "FAILED", + "NEEDS_ATTENTION", + "UPDATING", + } +} + +// GetMappingLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLifecycleStateEnum(val string) (LifecycleStateEnum, bool) { + enum, ok := mappingLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/list_java_download_records_request_response.go b/jmsjavadownloads/list_java_download_records_request_response.go new file mode 100644 index 0000000000..680cb76907 --- /dev/null +++ b/jmsjavadownloads/list_java_download_records_request_response.go @@ -0,0 +1,222 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListJavaDownloadRecordsRequest wrapper for the ListJavaDownloadRecords operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaDownloadRecords.go.html to see an example of how to use ListJavaDownloadRecordsRequest. +type ListJavaDownloadRecordsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique Java family version identifier. + FamilyVersion *string `mandatory:"false" contributesTo:"query" name:"familyVersion"` + + // Unique Java release version identifier. + ReleaseVersion *string `mandatory:"false" contributesTo:"query" name:"releaseVersion"` + + // Target Operating System family of the artifact. + OsFamily *string `mandatory:"false" contributesTo:"query" name:"osFamily"` + + // Target Operating System architecture of the artifact. + Architecture *string `mandatory:"false" contributesTo:"query" name:"architecture"` + + // Packaging type detail of the artifact. + PackageTypeDetail *string `mandatory:"false" contributesTo:"query" name:"packageTypeDetail"` + + // The start of the time period for which reports are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStart"` + + // The end of the time period for which reports are searched (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnd"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListJavaDownloadRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // If no value is specified _timeDownloaded_ is default. + SortBy ListJavaDownloadRecordsSortByEnum `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 ListJavaDownloadRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListJavaDownloadRecordsRequest) 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 ListJavaDownloadRecordsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListJavaDownloadRecordsRequest) 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 ListJavaDownloadRecordsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListJavaDownloadRecordsSortOrderEnum(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(GetListJavaDownloadRecordsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaDownloadRecordsSortByEnum(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(GetListJavaDownloadRecordsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListJavaDownloadRecordsResponse wrapper for the ListJavaDownloadRecords operation +type ListJavaDownloadRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of JavaDownloadRecordCollection instances + JavaDownloadRecordCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListJavaDownloadRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListJavaDownloadRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListJavaDownloadRecordsSortOrderEnum Enum with underlying type: string +type ListJavaDownloadRecordsSortOrderEnum string + +// Set of constants representing the allowable values for ListJavaDownloadRecordsSortOrderEnum +const ( + ListJavaDownloadRecordsSortOrderAsc ListJavaDownloadRecordsSortOrderEnum = "ASC" + ListJavaDownloadRecordsSortOrderDesc ListJavaDownloadRecordsSortOrderEnum = "DESC" +) + +var mappingListJavaDownloadRecordsSortOrderEnum = map[string]ListJavaDownloadRecordsSortOrderEnum{ + "ASC": ListJavaDownloadRecordsSortOrderAsc, + "DESC": ListJavaDownloadRecordsSortOrderDesc, +} + +var mappingListJavaDownloadRecordsSortOrderEnumLowerCase = map[string]ListJavaDownloadRecordsSortOrderEnum{ + "asc": ListJavaDownloadRecordsSortOrderAsc, + "desc": ListJavaDownloadRecordsSortOrderDesc, +} + +// GetListJavaDownloadRecordsSortOrderEnumValues Enumerates the set of values for ListJavaDownloadRecordsSortOrderEnum +func GetListJavaDownloadRecordsSortOrderEnumValues() []ListJavaDownloadRecordsSortOrderEnum { + values := make([]ListJavaDownloadRecordsSortOrderEnum, 0) + for _, v := range mappingListJavaDownloadRecordsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadRecordsSortOrderEnumStringValues Enumerates the set of values in String for ListJavaDownloadRecordsSortOrderEnum +func GetListJavaDownloadRecordsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListJavaDownloadRecordsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadRecordsSortOrderEnum(val string) (ListJavaDownloadRecordsSortOrderEnum, bool) { + enum, ok := mappingListJavaDownloadRecordsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaDownloadRecordsSortByEnum Enum with underlying type: string +type ListJavaDownloadRecordsSortByEnum string + +// Set of constants representing the allowable values for ListJavaDownloadRecordsSortByEnum +const ( + ListJavaDownloadRecordsSortByTimedownloaded ListJavaDownloadRecordsSortByEnum = "timeDownloaded" + ListJavaDownloadRecordsSortByDownloadsourceid ListJavaDownloadRecordsSortByEnum = "downloadSourceId" + ListJavaDownloadRecordsSortByDownloadtype ListJavaDownloadRecordsSortByEnum = "downloadType" +) + +var mappingListJavaDownloadRecordsSortByEnum = map[string]ListJavaDownloadRecordsSortByEnum{ + "timeDownloaded": ListJavaDownloadRecordsSortByTimedownloaded, + "downloadSourceId": ListJavaDownloadRecordsSortByDownloadsourceid, + "downloadType": ListJavaDownloadRecordsSortByDownloadtype, +} + +var mappingListJavaDownloadRecordsSortByEnumLowerCase = map[string]ListJavaDownloadRecordsSortByEnum{ + "timedownloaded": ListJavaDownloadRecordsSortByTimedownloaded, + "downloadsourceid": ListJavaDownloadRecordsSortByDownloadsourceid, + "downloadtype": ListJavaDownloadRecordsSortByDownloadtype, +} + +// GetListJavaDownloadRecordsSortByEnumValues Enumerates the set of values for ListJavaDownloadRecordsSortByEnum +func GetListJavaDownloadRecordsSortByEnumValues() []ListJavaDownloadRecordsSortByEnum { + values := make([]ListJavaDownloadRecordsSortByEnum, 0) + for _, v := range mappingListJavaDownloadRecordsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadRecordsSortByEnumStringValues Enumerates the set of values in String for ListJavaDownloadRecordsSortByEnum +func GetListJavaDownloadRecordsSortByEnumStringValues() []string { + return []string{ + "timeDownloaded", + "downloadSourceId", + "downloadType", + } +} + +// GetMappingListJavaDownloadRecordsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadRecordsSortByEnum(val string) (ListJavaDownloadRecordsSortByEnum, bool) { + enum, ok := mappingListJavaDownloadRecordsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/list_java_download_reports_request_response.go b/jmsjavadownloads/list_java_download_reports_request_response.go new file mode 100644 index 0000000000..bcfdb272c8 --- /dev/null +++ b/jmsjavadownloads/list_java_download_reports_request_response.go @@ -0,0 +1,271 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListJavaDownloadReportsRequest wrapper for the ListJavaDownloadReports operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaDownloadReports.go.html to see an example of how to use ListJavaDownloadReportsRequest. +type ListJavaDownloadReportsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState ListJavaDownloadReportsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the display name. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Unique Java download report identifier. + JavaDownloadReportId *string `mandatory:"false" contributesTo:"query" name:"javaDownloadReportId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListJavaDownloadReportsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. If no value is specified, _timeCreated_ is the default. + SortBy ListJavaDownloadReportsSortByEnum `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 ListJavaDownloadReportsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListJavaDownloadReportsRequest) 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 ListJavaDownloadReportsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListJavaDownloadReportsRequest) 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 ListJavaDownloadReportsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListJavaDownloadReportsLifecycleStateEnum(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(GetListJavaDownloadReportsLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaDownloadReportsSortOrderEnum(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(GetListJavaDownloadReportsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaDownloadReportsSortByEnum(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(GetListJavaDownloadReportsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListJavaDownloadReportsResponse wrapper for the ListJavaDownloadReports operation +type ListJavaDownloadReportsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of JavaDownloadReportCollection instances + JavaDownloadReportCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListJavaDownloadReportsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListJavaDownloadReportsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListJavaDownloadReportsLifecycleStateEnum Enum with underlying type: string +type ListJavaDownloadReportsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListJavaDownloadReportsLifecycleStateEnum +const ( + ListJavaDownloadReportsLifecycleStateActive ListJavaDownloadReportsLifecycleStateEnum = "ACTIVE" + ListJavaDownloadReportsLifecycleStateCreating ListJavaDownloadReportsLifecycleStateEnum = "CREATING" + ListJavaDownloadReportsLifecycleStateDeleted ListJavaDownloadReportsLifecycleStateEnum = "DELETED" + ListJavaDownloadReportsLifecycleStateDeleting ListJavaDownloadReportsLifecycleStateEnum = "DELETING" + ListJavaDownloadReportsLifecycleStateFailed ListJavaDownloadReportsLifecycleStateEnum = "FAILED" + ListJavaDownloadReportsLifecycleStateNeedsAttention ListJavaDownloadReportsLifecycleStateEnum = "NEEDS_ATTENTION" + ListJavaDownloadReportsLifecycleStateUpdating ListJavaDownloadReportsLifecycleStateEnum = "UPDATING" +) + +var mappingListJavaDownloadReportsLifecycleStateEnum = map[string]ListJavaDownloadReportsLifecycleStateEnum{ + "ACTIVE": ListJavaDownloadReportsLifecycleStateActive, + "CREATING": ListJavaDownloadReportsLifecycleStateCreating, + "DELETED": ListJavaDownloadReportsLifecycleStateDeleted, + "DELETING": ListJavaDownloadReportsLifecycleStateDeleting, + "FAILED": ListJavaDownloadReportsLifecycleStateFailed, + "NEEDS_ATTENTION": ListJavaDownloadReportsLifecycleStateNeedsAttention, + "UPDATING": ListJavaDownloadReportsLifecycleStateUpdating, +} + +var mappingListJavaDownloadReportsLifecycleStateEnumLowerCase = map[string]ListJavaDownloadReportsLifecycleStateEnum{ + "active": ListJavaDownloadReportsLifecycleStateActive, + "creating": ListJavaDownloadReportsLifecycleStateCreating, + "deleted": ListJavaDownloadReportsLifecycleStateDeleted, + "deleting": ListJavaDownloadReportsLifecycleStateDeleting, + "failed": ListJavaDownloadReportsLifecycleStateFailed, + "needs_attention": ListJavaDownloadReportsLifecycleStateNeedsAttention, + "updating": ListJavaDownloadReportsLifecycleStateUpdating, +} + +// GetListJavaDownloadReportsLifecycleStateEnumValues Enumerates the set of values for ListJavaDownloadReportsLifecycleStateEnum +func GetListJavaDownloadReportsLifecycleStateEnumValues() []ListJavaDownloadReportsLifecycleStateEnum { + values := make([]ListJavaDownloadReportsLifecycleStateEnum, 0) + for _, v := range mappingListJavaDownloadReportsLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadReportsLifecycleStateEnumStringValues Enumerates the set of values in String for ListJavaDownloadReportsLifecycleStateEnum +func GetListJavaDownloadReportsLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "CREATING", + "DELETED", + "DELETING", + "FAILED", + "NEEDS_ATTENTION", + "UPDATING", + } +} + +// GetMappingListJavaDownloadReportsLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadReportsLifecycleStateEnum(val string) (ListJavaDownloadReportsLifecycleStateEnum, bool) { + enum, ok := mappingListJavaDownloadReportsLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaDownloadReportsSortOrderEnum Enum with underlying type: string +type ListJavaDownloadReportsSortOrderEnum string + +// Set of constants representing the allowable values for ListJavaDownloadReportsSortOrderEnum +const ( + ListJavaDownloadReportsSortOrderAsc ListJavaDownloadReportsSortOrderEnum = "ASC" + ListJavaDownloadReportsSortOrderDesc ListJavaDownloadReportsSortOrderEnum = "DESC" +) + +var mappingListJavaDownloadReportsSortOrderEnum = map[string]ListJavaDownloadReportsSortOrderEnum{ + "ASC": ListJavaDownloadReportsSortOrderAsc, + "DESC": ListJavaDownloadReportsSortOrderDesc, +} + +var mappingListJavaDownloadReportsSortOrderEnumLowerCase = map[string]ListJavaDownloadReportsSortOrderEnum{ + "asc": ListJavaDownloadReportsSortOrderAsc, + "desc": ListJavaDownloadReportsSortOrderDesc, +} + +// GetListJavaDownloadReportsSortOrderEnumValues Enumerates the set of values for ListJavaDownloadReportsSortOrderEnum +func GetListJavaDownloadReportsSortOrderEnumValues() []ListJavaDownloadReportsSortOrderEnum { + values := make([]ListJavaDownloadReportsSortOrderEnum, 0) + for _, v := range mappingListJavaDownloadReportsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadReportsSortOrderEnumStringValues Enumerates the set of values in String for ListJavaDownloadReportsSortOrderEnum +func GetListJavaDownloadReportsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListJavaDownloadReportsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadReportsSortOrderEnum(val string) (ListJavaDownloadReportsSortOrderEnum, bool) { + enum, ok := mappingListJavaDownloadReportsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaDownloadReportsSortByEnum Enum with underlying type: string +type ListJavaDownloadReportsSortByEnum string + +// Set of constants representing the allowable values for ListJavaDownloadReportsSortByEnum +const ( + ListJavaDownloadReportsSortByTimecreated ListJavaDownloadReportsSortByEnum = "timeCreated" + ListJavaDownloadReportsSortByDisplayname ListJavaDownloadReportsSortByEnum = "displayName" +) + +var mappingListJavaDownloadReportsSortByEnum = map[string]ListJavaDownloadReportsSortByEnum{ + "timeCreated": ListJavaDownloadReportsSortByTimecreated, + "displayName": ListJavaDownloadReportsSortByDisplayname, +} + +var mappingListJavaDownloadReportsSortByEnumLowerCase = map[string]ListJavaDownloadReportsSortByEnum{ + "timecreated": ListJavaDownloadReportsSortByTimecreated, + "displayname": ListJavaDownloadReportsSortByDisplayname, +} + +// GetListJavaDownloadReportsSortByEnumValues Enumerates the set of values for ListJavaDownloadReportsSortByEnum +func GetListJavaDownloadReportsSortByEnumValues() []ListJavaDownloadReportsSortByEnum { + values := make([]ListJavaDownloadReportsSortByEnum, 0) + for _, v := range mappingListJavaDownloadReportsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadReportsSortByEnumStringValues Enumerates the set of values in String for ListJavaDownloadReportsSortByEnum +func GetListJavaDownloadReportsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListJavaDownloadReportsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadReportsSortByEnum(val string) (ListJavaDownloadReportsSortByEnum, bool) { + enum, ok := mappingListJavaDownloadReportsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/list_java_download_tokens_request_response.go b/jmsjavadownloads/list_java_download_tokens_request_response.go new file mode 100644 index 0000000000..4361a0e955 --- /dev/null +++ b/jmsjavadownloads/list_java_download_tokens_request_response.go @@ -0,0 +1,294 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListJavaDownloadTokensRequest wrapper for the ListJavaDownloadTokens operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaDownloadTokens.go.html to see an example of how to use ListJavaDownloadTokensRequest. +type ListJavaDownloadTokensRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState ListJavaDownloadTokensLifecycleStateEnum `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 JavaDownloadToken identifier. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // Unique JavaDownloadToken value. + Value *string `mandatory:"false" contributesTo:"query" name:"value"` + + // Unique Java family version identifier. + FamilyVersion *string `mandatory:"false" contributesTo:"query" name:"familyVersion"` + + // A filter to return only resources that match the user principal detail. + // The search string can be any of the property values from the Principal object. + // This object is used as response datatype for the `createdBy` and `lastUpdatedBy` fields in applicable resource. + SearchByUser *string `mandatory:"false" contributesTo:"query" name:"searchByUser"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListJavaDownloadTokensSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. If no value is specified, _timeCreated_ is the default. + SortBy ListJavaDownloadTokensSortByEnum `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 ListJavaDownloadTokensRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListJavaDownloadTokensRequest) 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 ListJavaDownloadTokensRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListJavaDownloadTokensRequest) 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 ListJavaDownloadTokensRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListJavaDownloadTokensLifecycleStateEnum(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(GetListJavaDownloadTokensLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaDownloadTokensSortOrderEnum(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(GetListJavaDownloadTokensSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaDownloadTokensSortByEnum(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(GetListJavaDownloadTokensSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListJavaDownloadTokensResponse wrapper for the ListJavaDownloadTokens operation +type ListJavaDownloadTokensResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of JavaDownloadTokenCollection instances + JavaDownloadTokenCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListJavaDownloadTokensResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListJavaDownloadTokensResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListJavaDownloadTokensLifecycleStateEnum Enum with underlying type: string +type ListJavaDownloadTokensLifecycleStateEnum string + +// Set of constants representing the allowable values for ListJavaDownloadTokensLifecycleStateEnum +const ( + ListJavaDownloadTokensLifecycleStateActive ListJavaDownloadTokensLifecycleStateEnum = "ACTIVE" + ListJavaDownloadTokensLifecycleStateCreating ListJavaDownloadTokensLifecycleStateEnum = "CREATING" + ListJavaDownloadTokensLifecycleStateDeleted ListJavaDownloadTokensLifecycleStateEnum = "DELETED" + ListJavaDownloadTokensLifecycleStateDeleting ListJavaDownloadTokensLifecycleStateEnum = "DELETING" + ListJavaDownloadTokensLifecycleStateFailed ListJavaDownloadTokensLifecycleStateEnum = "FAILED" + ListJavaDownloadTokensLifecycleStateNeedsAttention ListJavaDownloadTokensLifecycleStateEnum = "NEEDS_ATTENTION" + ListJavaDownloadTokensLifecycleStateUpdating ListJavaDownloadTokensLifecycleStateEnum = "UPDATING" +) + +var mappingListJavaDownloadTokensLifecycleStateEnum = map[string]ListJavaDownloadTokensLifecycleStateEnum{ + "ACTIVE": ListJavaDownloadTokensLifecycleStateActive, + "CREATING": ListJavaDownloadTokensLifecycleStateCreating, + "DELETED": ListJavaDownloadTokensLifecycleStateDeleted, + "DELETING": ListJavaDownloadTokensLifecycleStateDeleting, + "FAILED": ListJavaDownloadTokensLifecycleStateFailed, + "NEEDS_ATTENTION": ListJavaDownloadTokensLifecycleStateNeedsAttention, + "UPDATING": ListJavaDownloadTokensLifecycleStateUpdating, +} + +var mappingListJavaDownloadTokensLifecycleStateEnumLowerCase = map[string]ListJavaDownloadTokensLifecycleStateEnum{ + "active": ListJavaDownloadTokensLifecycleStateActive, + "creating": ListJavaDownloadTokensLifecycleStateCreating, + "deleted": ListJavaDownloadTokensLifecycleStateDeleted, + "deleting": ListJavaDownloadTokensLifecycleStateDeleting, + "failed": ListJavaDownloadTokensLifecycleStateFailed, + "needs_attention": ListJavaDownloadTokensLifecycleStateNeedsAttention, + "updating": ListJavaDownloadTokensLifecycleStateUpdating, +} + +// GetListJavaDownloadTokensLifecycleStateEnumValues Enumerates the set of values for ListJavaDownloadTokensLifecycleStateEnum +func GetListJavaDownloadTokensLifecycleStateEnumValues() []ListJavaDownloadTokensLifecycleStateEnum { + values := make([]ListJavaDownloadTokensLifecycleStateEnum, 0) + for _, v := range mappingListJavaDownloadTokensLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadTokensLifecycleStateEnumStringValues Enumerates the set of values in String for ListJavaDownloadTokensLifecycleStateEnum +func GetListJavaDownloadTokensLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "CREATING", + "DELETED", + "DELETING", + "FAILED", + "NEEDS_ATTENTION", + "UPDATING", + } +} + +// GetMappingListJavaDownloadTokensLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadTokensLifecycleStateEnum(val string) (ListJavaDownloadTokensLifecycleStateEnum, bool) { + enum, ok := mappingListJavaDownloadTokensLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaDownloadTokensSortOrderEnum Enum with underlying type: string +type ListJavaDownloadTokensSortOrderEnum string + +// Set of constants representing the allowable values for ListJavaDownloadTokensSortOrderEnum +const ( + ListJavaDownloadTokensSortOrderAsc ListJavaDownloadTokensSortOrderEnum = "ASC" + ListJavaDownloadTokensSortOrderDesc ListJavaDownloadTokensSortOrderEnum = "DESC" +) + +var mappingListJavaDownloadTokensSortOrderEnum = map[string]ListJavaDownloadTokensSortOrderEnum{ + "ASC": ListJavaDownloadTokensSortOrderAsc, + "DESC": ListJavaDownloadTokensSortOrderDesc, +} + +var mappingListJavaDownloadTokensSortOrderEnumLowerCase = map[string]ListJavaDownloadTokensSortOrderEnum{ + "asc": ListJavaDownloadTokensSortOrderAsc, + "desc": ListJavaDownloadTokensSortOrderDesc, +} + +// GetListJavaDownloadTokensSortOrderEnumValues Enumerates the set of values for ListJavaDownloadTokensSortOrderEnum +func GetListJavaDownloadTokensSortOrderEnumValues() []ListJavaDownloadTokensSortOrderEnum { + values := make([]ListJavaDownloadTokensSortOrderEnum, 0) + for _, v := range mappingListJavaDownloadTokensSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadTokensSortOrderEnumStringValues Enumerates the set of values in String for ListJavaDownloadTokensSortOrderEnum +func GetListJavaDownloadTokensSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListJavaDownloadTokensSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadTokensSortOrderEnum(val string) (ListJavaDownloadTokensSortOrderEnum, bool) { + enum, ok := mappingListJavaDownloadTokensSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaDownloadTokensSortByEnum Enum with underlying type: string +type ListJavaDownloadTokensSortByEnum string + +// Set of constants representing the allowable values for ListJavaDownloadTokensSortByEnum +const ( + ListJavaDownloadTokensSortByTimecreated ListJavaDownloadTokensSortByEnum = "timeCreated" + ListJavaDownloadTokensSortByTimeexpires ListJavaDownloadTokensSortByEnum = "timeExpires" + ListJavaDownloadTokensSortByState ListJavaDownloadTokensSortByEnum = "state" + ListJavaDownloadTokensSortByDisplayname ListJavaDownloadTokensSortByEnum = "displayName" + ListJavaDownloadTokensSortByJavaversion ListJavaDownloadTokensSortByEnum = "javaVersion" +) + +var mappingListJavaDownloadTokensSortByEnum = map[string]ListJavaDownloadTokensSortByEnum{ + "timeCreated": ListJavaDownloadTokensSortByTimecreated, + "timeExpires": ListJavaDownloadTokensSortByTimeexpires, + "state": ListJavaDownloadTokensSortByState, + "displayName": ListJavaDownloadTokensSortByDisplayname, + "javaVersion": ListJavaDownloadTokensSortByJavaversion, +} + +var mappingListJavaDownloadTokensSortByEnumLowerCase = map[string]ListJavaDownloadTokensSortByEnum{ + "timecreated": ListJavaDownloadTokensSortByTimecreated, + "timeexpires": ListJavaDownloadTokensSortByTimeexpires, + "state": ListJavaDownloadTokensSortByState, + "displayname": ListJavaDownloadTokensSortByDisplayname, + "javaversion": ListJavaDownloadTokensSortByJavaversion, +} + +// GetListJavaDownloadTokensSortByEnumValues Enumerates the set of values for ListJavaDownloadTokensSortByEnum +func GetListJavaDownloadTokensSortByEnumValues() []ListJavaDownloadTokensSortByEnum { + values := make([]ListJavaDownloadTokensSortByEnum, 0) + for _, v := range mappingListJavaDownloadTokensSortByEnum { + values = append(values, v) + } + return values +} + +// GetListJavaDownloadTokensSortByEnumStringValues Enumerates the set of values in String for ListJavaDownloadTokensSortByEnum +func GetListJavaDownloadTokensSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "timeExpires", + "state", + "displayName", + "javaVersion", + } +} + +// GetMappingListJavaDownloadTokensSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaDownloadTokensSortByEnum(val string) (ListJavaDownloadTokensSortByEnum, bool) { + enum, ok := mappingListJavaDownloadTokensSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/list_java_license_acceptance_records_request_response.go b/jmsjavadownloads/list_java_license_acceptance_records_request_response.go new file mode 100644 index 0000000000..c50af993a5 --- /dev/null +++ b/jmsjavadownloads/list_java_license_acceptance_records_request_response.go @@ -0,0 +1,309 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListJavaLicenseAcceptanceRecordsRequest wrapper for the ListJavaLicenseAcceptanceRecords operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaLicenseAcceptanceRecords.go.html to see an example of how to use ListJavaLicenseAcceptanceRecordsRequest. +type ListJavaLicenseAcceptanceRecordsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the user principal detail. + // The search string can be any of the property values from the Principal object. + // This object is used as response datatype for the `createdBy` and `lastUpdatedBy` fields in applicable resource. + SearchByUser *string `mandatory:"false" contributesTo:"query" name:"searchByUser"` + + // Unique Java license acceptance record identifier. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // Unique Java license type. + LicenseType ListJavaLicenseAcceptanceRecordsLicenseTypeEnum `mandatory:"false" contributesTo:"query" name:"licenseType" omitEmpty:"true"` + + // The status of license acceptance. + Status ListJavaLicenseAcceptanceRecordsStatusEnum `mandatory:"false" contributesTo:"query" name:"status" omitEmpty:"true"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListJavaLicenseAcceptanceRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. If no value is specified, _timeAccepted_ is the default. + SortBy ListJavaLicenseAcceptanceRecordsSortByEnum `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 ListJavaLicenseAcceptanceRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListJavaLicenseAcceptanceRecordsRequest) 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 ListJavaLicenseAcceptanceRecordsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListJavaLicenseAcceptanceRecordsRequest) 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 ListJavaLicenseAcceptanceRecordsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListJavaLicenseAcceptanceRecordsLicenseTypeEnum(string(request.LicenseType)); !ok && request.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", request.LicenseType, strings.Join(GetListJavaLicenseAcceptanceRecordsLicenseTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaLicenseAcceptanceRecordsStatusEnum(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(GetListJavaLicenseAcceptanceRecordsStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaLicenseAcceptanceRecordsSortOrderEnum(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(GetListJavaLicenseAcceptanceRecordsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaLicenseAcceptanceRecordsSortByEnum(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(GetListJavaLicenseAcceptanceRecordsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListJavaLicenseAcceptanceRecordsResponse wrapper for the ListJavaLicenseAcceptanceRecords operation +type ListJavaLicenseAcceptanceRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of JavaLicenseAcceptanceRecordCollection instances + JavaLicenseAcceptanceRecordCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListJavaLicenseAcceptanceRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListJavaLicenseAcceptanceRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListJavaLicenseAcceptanceRecordsLicenseTypeEnum Enum with underlying type: string +type ListJavaLicenseAcceptanceRecordsLicenseTypeEnum string + +// Set of constants representing the allowable values for ListJavaLicenseAcceptanceRecordsLicenseTypeEnum +const ( + ListJavaLicenseAcceptanceRecordsLicenseTypeOtn ListJavaLicenseAcceptanceRecordsLicenseTypeEnum = "OTN" + ListJavaLicenseAcceptanceRecordsLicenseTypeNftc ListJavaLicenseAcceptanceRecordsLicenseTypeEnum = "NFTC" + ListJavaLicenseAcceptanceRecordsLicenseTypeRestricted ListJavaLicenseAcceptanceRecordsLicenseTypeEnum = "RESTRICTED" +) + +var mappingListJavaLicenseAcceptanceRecordsLicenseTypeEnum = map[string]ListJavaLicenseAcceptanceRecordsLicenseTypeEnum{ + "OTN": ListJavaLicenseAcceptanceRecordsLicenseTypeOtn, + "NFTC": ListJavaLicenseAcceptanceRecordsLicenseTypeNftc, + "RESTRICTED": ListJavaLicenseAcceptanceRecordsLicenseTypeRestricted, +} + +var mappingListJavaLicenseAcceptanceRecordsLicenseTypeEnumLowerCase = map[string]ListJavaLicenseAcceptanceRecordsLicenseTypeEnum{ + "otn": ListJavaLicenseAcceptanceRecordsLicenseTypeOtn, + "nftc": ListJavaLicenseAcceptanceRecordsLicenseTypeNftc, + "restricted": ListJavaLicenseAcceptanceRecordsLicenseTypeRestricted, +} + +// GetListJavaLicenseAcceptanceRecordsLicenseTypeEnumValues Enumerates the set of values for ListJavaLicenseAcceptanceRecordsLicenseTypeEnum +func GetListJavaLicenseAcceptanceRecordsLicenseTypeEnumValues() []ListJavaLicenseAcceptanceRecordsLicenseTypeEnum { + values := make([]ListJavaLicenseAcceptanceRecordsLicenseTypeEnum, 0) + for _, v := range mappingListJavaLicenseAcceptanceRecordsLicenseTypeEnum { + values = append(values, v) + } + return values +} + +// GetListJavaLicenseAcceptanceRecordsLicenseTypeEnumStringValues Enumerates the set of values in String for ListJavaLicenseAcceptanceRecordsLicenseTypeEnum +func GetListJavaLicenseAcceptanceRecordsLicenseTypeEnumStringValues() []string { + return []string{ + "OTN", + "NFTC", + "RESTRICTED", + } +} + +// GetMappingListJavaLicenseAcceptanceRecordsLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaLicenseAcceptanceRecordsLicenseTypeEnum(val string) (ListJavaLicenseAcceptanceRecordsLicenseTypeEnum, bool) { + enum, ok := mappingListJavaLicenseAcceptanceRecordsLicenseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaLicenseAcceptanceRecordsStatusEnum Enum with underlying type: string +type ListJavaLicenseAcceptanceRecordsStatusEnum string + +// Set of constants representing the allowable values for ListJavaLicenseAcceptanceRecordsStatusEnum +const ( + ListJavaLicenseAcceptanceRecordsStatusAccepted ListJavaLicenseAcceptanceRecordsStatusEnum = "ACCEPTED" + ListJavaLicenseAcceptanceRecordsStatusRevoked ListJavaLicenseAcceptanceRecordsStatusEnum = "REVOKED" +) + +var mappingListJavaLicenseAcceptanceRecordsStatusEnum = map[string]ListJavaLicenseAcceptanceRecordsStatusEnum{ + "ACCEPTED": ListJavaLicenseAcceptanceRecordsStatusAccepted, + "REVOKED": ListJavaLicenseAcceptanceRecordsStatusRevoked, +} + +var mappingListJavaLicenseAcceptanceRecordsStatusEnumLowerCase = map[string]ListJavaLicenseAcceptanceRecordsStatusEnum{ + "accepted": ListJavaLicenseAcceptanceRecordsStatusAccepted, + "revoked": ListJavaLicenseAcceptanceRecordsStatusRevoked, +} + +// GetListJavaLicenseAcceptanceRecordsStatusEnumValues Enumerates the set of values for ListJavaLicenseAcceptanceRecordsStatusEnum +func GetListJavaLicenseAcceptanceRecordsStatusEnumValues() []ListJavaLicenseAcceptanceRecordsStatusEnum { + values := make([]ListJavaLicenseAcceptanceRecordsStatusEnum, 0) + for _, v := range mappingListJavaLicenseAcceptanceRecordsStatusEnum { + values = append(values, v) + } + return values +} + +// GetListJavaLicenseAcceptanceRecordsStatusEnumStringValues Enumerates the set of values in String for ListJavaLicenseAcceptanceRecordsStatusEnum +func GetListJavaLicenseAcceptanceRecordsStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "REVOKED", + } +} + +// GetMappingListJavaLicenseAcceptanceRecordsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaLicenseAcceptanceRecordsStatusEnum(val string) (ListJavaLicenseAcceptanceRecordsStatusEnum, bool) { + enum, ok := mappingListJavaLicenseAcceptanceRecordsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaLicenseAcceptanceRecordsSortOrderEnum Enum with underlying type: string +type ListJavaLicenseAcceptanceRecordsSortOrderEnum string + +// Set of constants representing the allowable values for ListJavaLicenseAcceptanceRecordsSortOrderEnum +const ( + ListJavaLicenseAcceptanceRecordsSortOrderAsc ListJavaLicenseAcceptanceRecordsSortOrderEnum = "ASC" + ListJavaLicenseAcceptanceRecordsSortOrderDesc ListJavaLicenseAcceptanceRecordsSortOrderEnum = "DESC" +) + +var mappingListJavaLicenseAcceptanceRecordsSortOrderEnum = map[string]ListJavaLicenseAcceptanceRecordsSortOrderEnum{ + "ASC": ListJavaLicenseAcceptanceRecordsSortOrderAsc, + "DESC": ListJavaLicenseAcceptanceRecordsSortOrderDesc, +} + +var mappingListJavaLicenseAcceptanceRecordsSortOrderEnumLowerCase = map[string]ListJavaLicenseAcceptanceRecordsSortOrderEnum{ + "asc": ListJavaLicenseAcceptanceRecordsSortOrderAsc, + "desc": ListJavaLicenseAcceptanceRecordsSortOrderDesc, +} + +// GetListJavaLicenseAcceptanceRecordsSortOrderEnumValues Enumerates the set of values for ListJavaLicenseAcceptanceRecordsSortOrderEnum +func GetListJavaLicenseAcceptanceRecordsSortOrderEnumValues() []ListJavaLicenseAcceptanceRecordsSortOrderEnum { + values := make([]ListJavaLicenseAcceptanceRecordsSortOrderEnum, 0) + for _, v := range mappingListJavaLicenseAcceptanceRecordsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListJavaLicenseAcceptanceRecordsSortOrderEnumStringValues Enumerates the set of values in String for ListJavaLicenseAcceptanceRecordsSortOrderEnum +func GetListJavaLicenseAcceptanceRecordsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListJavaLicenseAcceptanceRecordsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaLicenseAcceptanceRecordsSortOrderEnum(val string) (ListJavaLicenseAcceptanceRecordsSortOrderEnum, bool) { + enum, ok := mappingListJavaLicenseAcceptanceRecordsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaLicenseAcceptanceRecordsSortByEnum Enum with underlying type: string +type ListJavaLicenseAcceptanceRecordsSortByEnum string + +// Set of constants representing the allowable values for ListJavaLicenseAcceptanceRecordsSortByEnum +const ( + ListJavaLicenseAcceptanceRecordsSortByTimeaccepted ListJavaLicenseAcceptanceRecordsSortByEnum = "timeAccepted" + ListJavaLicenseAcceptanceRecordsSortByTimelastupdated ListJavaLicenseAcceptanceRecordsSortByEnum = "timeLastUpdated" + ListJavaLicenseAcceptanceRecordsSortByLicenseacceptancestatus ListJavaLicenseAcceptanceRecordsSortByEnum = "licenseAcceptanceStatus" +) + +var mappingListJavaLicenseAcceptanceRecordsSortByEnum = map[string]ListJavaLicenseAcceptanceRecordsSortByEnum{ + "timeAccepted": ListJavaLicenseAcceptanceRecordsSortByTimeaccepted, + "timeLastUpdated": ListJavaLicenseAcceptanceRecordsSortByTimelastupdated, + "licenseAcceptanceStatus": ListJavaLicenseAcceptanceRecordsSortByLicenseacceptancestatus, +} + +var mappingListJavaLicenseAcceptanceRecordsSortByEnumLowerCase = map[string]ListJavaLicenseAcceptanceRecordsSortByEnum{ + "timeaccepted": ListJavaLicenseAcceptanceRecordsSortByTimeaccepted, + "timelastupdated": ListJavaLicenseAcceptanceRecordsSortByTimelastupdated, + "licenseacceptancestatus": ListJavaLicenseAcceptanceRecordsSortByLicenseacceptancestatus, +} + +// GetListJavaLicenseAcceptanceRecordsSortByEnumValues Enumerates the set of values for ListJavaLicenseAcceptanceRecordsSortByEnum +func GetListJavaLicenseAcceptanceRecordsSortByEnumValues() []ListJavaLicenseAcceptanceRecordsSortByEnum { + values := make([]ListJavaLicenseAcceptanceRecordsSortByEnum, 0) + for _, v := range mappingListJavaLicenseAcceptanceRecordsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListJavaLicenseAcceptanceRecordsSortByEnumStringValues Enumerates the set of values in String for ListJavaLicenseAcceptanceRecordsSortByEnum +func GetListJavaLicenseAcceptanceRecordsSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + "timeLastUpdated", + "licenseAcceptanceStatus", + } +} + +// GetMappingListJavaLicenseAcceptanceRecordsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaLicenseAcceptanceRecordsSortByEnum(val string) (ListJavaLicenseAcceptanceRecordsSortByEnum, bool) { + enum, ok := mappingListJavaLicenseAcceptanceRecordsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/list_java_licenses_request_response.go b/jmsjavadownloads/list_java_licenses_request_response.go new file mode 100644 index 0000000000..3d9c787f8a --- /dev/null +++ b/jmsjavadownloads/list_java_licenses_request_response.go @@ -0,0 +1,249 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListJavaLicensesRequest wrapper for the ListJavaLicenses operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/ListJavaLicenses.go.html to see an example of how to use ListJavaLicensesRequest. +type ListJavaLicensesRequest struct { + + // Unique Java license type. + LicenseType ListJavaLicensesLicenseTypeEnum `mandatory:"false" contributesTo:"query" name:"licenseType" omitEmpty:"true"` + + // A filter to return only resources that match the display name. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order, either 'asc' or 'desc'. + SortOrder ListJavaLicensesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. If no value is specified, _licenseType_ is the default. + SortBy ListJavaLicensesSortByEnum `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 ListJavaLicensesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListJavaLicensesRequest) 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 ListJavaLicensesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListJavaLicensesRequest) 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 ListJavaLicensesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListJavaLicensesLicenseTypeEnum(string(request.LicenseType)); !ok && request.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", request.LicenseType, strings.Join(GetListJavaLicensesLicenseTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaLicensesSortOrderEnum(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(GetListJavaLicensesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListJavaLicensesSortByEnum(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(GetListJavaLicensesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListJavaLicensesResponse wrapper for the ListJavaLicenses operation +type ListJavaLicensesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of JavaLicenseCollection instances + JavaLicenseCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListJavaLicensesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListJavaLicensesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListJavaLicensesLicenseTypeEnum Enum with underlying type: string +type ListJavaLicensesLicenseTypeEnum string + +// Set of constants representing the allowable values for ListJavaLicensesLicenseTypeEnum +const ( + ListJavaLicensesLicenseTypeOtn ListJavaLicensesLicenseTypeEnum = "OTN" + ListJavaLicensesLicenseTypeNftc ListJavaLicensesLicenseTypeEnum = "NFTC" + ListJavaLicensesLicenseTypeRestricted ListJavaLicensesLicenseTypeEnum = "RESTRICTED" +) + +var mappingListJavaLicensesLicenseTypeEnum = map[string]ListJavaLicensesLicenseTypeEnum{ + "OTN": ListJavaLicensesLicenseTypeOtn, + "NFTC": ListJavaLicensesLicenseTypeNftc, + "RESTRICTED": ListJavaLicensesLicenseTypeRestricted, +} + +var mappingListJavaLicensesLicenseTypeEnumLowerCase = map[string]ListJavaLicensesLicenseTypeEnum{ + "otn": ListJavaLicensesLicenseTypeOtn, + "nftc": ListJavaLicensesLicenseTypeNftc, + "restricted": ListJavaLicensesLicenseTypeRestricted, +} + +// GetListJavaLicensesLicenseTypeEnumValues Enumerates the set of values for ListJavaLicensesLicenseTypeEnum +func GetListJavaLicensesLicenseTypeEnumValues() []ListJavaLicensesLicenseTypeEnum { + values := make([]ListJavaLicensesLicenseTypeEnum, 0) + for _, v := range mappingListJavaLicensesLicenseTypeEnum { + values = append(values, v) + } + return values +} + +// GetListJavaLicensesLicenseTypeEnumStringValues Enumerates the set of values in String for ListJavaLicensesLicenseTypeEnum +func GetListJavaLicensesLicenseTypeEnumStringValues() []string { + return []string{ + "OTN", + "NFTC", + "RESTRICTED", + } +} + +// GetMappingListJavaLicensesLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaLicensesLicenseTypeEnum(val string) (ListJavaLicensesLicenseTypeEnum, bool) { + enum, ok := mappingListJavaLicensesLicenseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaLicensesSortOrderEnum Enum with underlying type: string +type ListJavaLicensesSortOrderEnum string + +// Set of constants representing the allowable values for ListJavaLicensesSortOrderEnum +const ( + ListJavaLicensesSortOrderAsc ListJavaLicensesSortOrderEnum = "ASC" + ListJavaLicensesSortOrderDesc ListJavaLicensesSortOrderEnum = "DESC" +) + +var mappingListJavaLicensesSortOrderEnum = map[string]ListJavaLicensesSortOrderEnum{ + "ASC": ListJavaLicensesSortOrderAsc, + "DESC": ListJavaLicensesSortOrderDesc, +} + +var mappingListJavaLicensesSortOrderEnumLowerCase = map[string]ListJavaLicensesSortOrderEnum{ + "asc": ListJavaLicensesSortOrderAsc, + "desc": ListJavaLicensesSortOrderDesc, +} + +// GetListJavaLicensesSortOrderEnumValues Enumerates the set of values for ListJavaLicensesSortOrderEnum +func GetListJavaLicensesSortOrderEnumValues() []ListJavaLicensesSortOrderEnum { + values := make([]ListJavaLicensesSortOrderEnum, 0) + for _, v := range mappingListJavaLicensesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListJavaLicensesSortOrderEnumStringValues Enumerates the set of values in String for ListJavaLicensesSortOrderEnum +func GetListJavaLicensesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListJavaLicensesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaLicensesSortOrderEnum(val string) (ListJavaLicensesSortOrderEnum, bool) { + enum, ok := mappingListJavaLicensesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListJavaLicensesSortByEnum Enum with underlying type: string +type ListJavaLicensesSortByEnum string + +// Set of constants representing the allowable values for ListJavaLicensesSortByEnum +const ( + ListJavaLicensesSortByLicensetype ListJavaLicensesSortByEnum = "licenseType" + ListJavaLicensesSortByDisplayname ListJavaLicensesSortByEnum = "displayName" +) + +var mappingListJavaLicensesSortByEnum = map[string]ListJavaLicensesSortByEnum{ + "licenseType": ListJavaLicensesSortByLicensetype, + "displayName": ListJavaLicensesSortByDisplayname, +} + +var mappingListJavaLicensesSortByEnumLowerCase = map[string]ListJavaLicensesSortByEnum{ + "licensetype": ListJavaLicensesSortByLicensetype, + "displayname": ListJavaLicensesSortByDisplayname, +} + +// GetListJavaLicensesSortByEnumValues Enumerates the set of values for ListJavaLicensesSortByEnum +func GetListJavaLicensesSortByEnumValues() []ListJavaLicensesSortByEnum { + values := make([]ListJavaLicensesSortByEnum, 0) + for _, v := range mappingListJavaLicensesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListJavaLicensesSortByEnumStringValues Enumerates the set of values in String for ListJavaLicensesSortByEnum +func GetListJavaLicensesSortByEnumStringValues() []string { + return []string{ + "licenseType", + "displayName", + } +} + +// GetMappingListJavaLicensesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListJavaLicensesSortByEnum(val string) (ListJavaLicensesSortByEnum, bool) { + enum, ok := mappingListJavaLicensesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/list_work_request_errors_request_response.go b/jmsjavadownloads/list_work_request_errors_request_response.go new file mode 100644 index 0000000000..919166335c --- /dev/null +++ b/jmsjavadownloads/list_work_request_errors_request_response.go @@ -0,0 +1,193 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +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/jmsjavadownloads/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"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The 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, 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 list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, 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/jmsjavadownloads/list_work_request_logs_request_response.go b/jmsjavadownloads/list_work_request_logs_request_response.go new file mode 100644 index 0000000000..193d7948aa --- /dev/null +++ b/jmsjavadownloads/list_work_request_logs_request_response.go @@ -0,0 +1,193 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +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/jmsjavadownloads/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"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The 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, 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 list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, 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/jmsjavadownloads/list_work_requests_request_response.go b/jmsjavadownloads/list_work_requests_request_response.go new file mode 100644 index 0000000000..33b76bad18 --- /dev/null +++ b/jmsjavadownloads/list_work_requests_request_response.go @@ -0,0 +1,271 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +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/jmsjavadownloads/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. +type ListWorkRequestsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The ID of an asynchronous work request. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // A filter to return only resources their lifecycleState matches the given OperationStatus. + Status ListWorkRequestsStatusEnum `mandatory:"false" contributesTo:"query" name:"status" omitEmpty:"true"` + + // The ID of the resource affected by the work request. + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The sort order, 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response 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/jmsjavadownloads/operation_status.go b/jmsjavadownloads/operation_status.go new file mode 100644 index 0000000000..01f2992dd4 --- /dev/null +++ b/jmsjavadownloads/operation_status.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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/jmsjavadownloads/operation_type.go b/jmsjavadownloads/operation_type.go new file mode 100644 index 0000000000..f35599b87c --- /dev/null +++ b/jmsjavadownloads/operation_type.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// OperationTypeEnum Enum with underlying type: string +type OperationTypeEnum string + +// Set of constants representing the allowable values for OperationTypeEnum +const ( + OperationTypeCreateJavaDownloadToken OperationTypeEnum = "CREATE_JAVA_DOWNLOAD_TOKEN" + OperationTypeUpdateJavaDownloadToken OperationTypeEnum = "UPDATE_JAVA_DOWNLOAD_TOKEN" + OperationTypeDeleteJavaDownloadToken OperationTypeEnum = "DELETE_JAVA_DOWNLOAD_TOKEN" + OperationTypeCreateJavaDownloadReport OperationTypeEnum = "CREATE_JAVA_DOWNLOAD_REPORT" + OperationTypeDeleteJavaDownloadReport OperationTypeEnum = "DELETE_JAVA_DOWNLOAD_REPORT" +) + +var mappingOperationTypeEnum = map[string]OperationTypeEnum{ + "CREATE_JAVA_DOWNLOAD_TOKEN": OperationTypeCreateJavaDownloadToken, + "UPDATE_JAVA_DOWNLOAD_TOKEN": OperationTypeUpdateJavaDownloadToken, + "DELETE_JAVA_DOWNLOAD_TOKEN": OperationTypeDeleteJavaDownloadToken, + "CREATE_JAVA_DOWNLOAD_REPORT": OperationTypeCreateJavaDownloadReport, + "DELETE_JAVA_DOWNLOAD_REPORT": OperationTypeDeleteJavaDownloadReport, +} + +var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ + "create_java_download_token": OperationTypeCreateJavaDownloadToken, + "update_java_download_token": OperationTypeUpdateJavaDownloadToken, + "delete_java_download_token": OperationTypeDeleteJavaDownloadToken, + "create_java_download_report": OperationTypeCreateJavaDownloadReport, + "delete_java_download_report": OperationTypeDeleteJavaDownloadReport, +} + +// 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_JAVA_DOWNLOAD_TOKEN", + "UPDATE_JAVA_DOWNLOAD_TOKEN", + "DELETE_JAVA_DOWNLOAD_TOKEN", + "CREATE_JAVA_DOWNLOAD_REPORT", + "DELETE_JAVA_DOWNLOAD_REPORT", + } +} + +// 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/jmsjavadownloads/principal.go b/jmsjavadownloads/principal.go new file mode 100644 index 0000000000..3b1deca2d4 --- /dev/null +++ b/jmsjavadownloads/principal.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Principal An authorized principal. +type Principal struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the principal. + Id *string `mandatory:"true" json:"id"` + + // The name of the principal. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The email of the principal. + Email *string `mandatory:"false" json:"email"` +} + +func (m Principal) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Principal) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/request_summarized_java_download_counts_details.go b/jmsjavadownloads/request_summarized_java_download_counts_details.go new file mode 100644 index 0000000000..7742831b42 --- /dev/null +++ b/jmsjavadownloads/request_summarized_java_download_counts_details.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RequestSummarizedJavaDownloadCountsDetails Attributes to summarize the Java download counts in a tenancy. +type RequestSummarizedJavaDownloadCountsDetails struct { + + // The compartment OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) here should be the tenancy OCID. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Group as property specifying the aggregation type for download counts. + GroupAs JavaDownloadCountAggregationTypeEnum `mandatory:"true" json:"groupAs"` + + // Unique Java family version identifier. + FamilyVersion *string `mandatory:"false" json:"familyVersion"` + + // Unique Java release version identifier. + ReleaseVersion *string `mandatory:"false" json:"releaseVersion"` + + // The start time from when download data has to be included (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeStart *common.SDKTime `mandatory:"false" json:"timeStart"` + + // The end time until when the download data has to be included (formatted according to RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339)). + TimeEnd *common.SDKTime `mandatory:"false" json:"timeEnd"` + + // The property to be used for sorting the aggregated report. + SortBy AggregationSortByEnum `mandatory:"false" json:"sortBy,omitempty"` + + // The sort order for the aggregated report. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" json:"limit"` + + // The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous call. + Page *string `mandatory:"false" json:"page"` +} + +func (m RequestSummarizedJavaDownloadCountsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RequestSummarizedJavaDownloadCountsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJavaDownloadCountAggregationTypeEnum(string(m.GroupAs)); !ok && m.GroupAs != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for GroupAs: %s. Supported values are: %s.", m.GroupAs, strings.Join(GetJavaDownloadCountAggregationTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingAggregationSortByEnum(string(m.SortBy)); !ok && m.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", m.SortBy, strings.Join(GetAggregationSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/request_summarized_java_download_counts_request_response.go b/jmsjavadownloads/request_summarized_java_download_counts_request_response.go new file mode 100644 index 0000000000..304825ff0b --- /dev/null +++ b/jmsjavadownloads/request_summarized_java_download_counts_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RequestSummarizedJavaDownloadCountsRequest wrapper for the RequestSummarizedJavaDownloadCounts operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/RequestSummarizedJavaDownloadCounts.go.html to see an example of how to use RequestSummarizedJavaDownloadCountsRequest. +type RequestSummarizedJavaDownloadCountsRequest struct { + + // Details for retreiving the summary of download counts. + RequestSummarizedJavaDownloadCountsDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RequestSummarizedJavaDownloadCountsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RequestSummarizedJavaDownloadCountsRequest) 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 RequestSummarizedJavaDownloadCountsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RequestSummarizedJavaDownloadCountsRequest) 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 RequestSummarizedJavaDownloadCountsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RequestSummarizedJavaDownloadCountsResponse wrapper for the RequestSummarizedJavaDownloadCounts operation +type RequestSummarizedJavaDownloadCountsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaDownloadCountAggregationCollection instance + JavaDownloadCountAggregationCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response RequestSummarizedJavaDownloadCountsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RequestSummarizedJavaDownloadCountsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/sort_order.go b/jmsjavadownloads/sort_order.go new file mode 100644 index 0000000000..5dc65aa6a8 --- /dev/null +++ b/jmsjavadownloads/sort_order.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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/jmsjavadownloads/token_lifecycle_details.go b/jmsjavadownloads/token_lifecycle_details.go new file mode 100644 index 0000000000..946fba9e7e --- /dev/null +++ b/jmsjavadownloads/token_lifecycle_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// TokenLifecycleDetailsEnum Enum with underlying type: string +type TokenLifecycleDetailsEnum string + +// Set of constants representing the allowable values for TokenLifecycleDetailsEnum +const ( + TokenLifecycleDetailsExpired TokenLifecycleDetailsEnum = "EXPIRED" + TokenLifecycleDetailsRevoking TokenLifecycleDetailsEnum = "REVOKING" + TokenLifecycleDetailsRevoked TokenLifecycleDetailsEnum = "REVOKED" +) + +var mappingTokenLifecycleDetailsEnum = map[string]TokenLifecycleDetailsEnum{ + "EXPIRED": TokenLifecycleDetailsExpired, + "REVOKING": TokenLifecycleDetailsRevoking, + "REVOKED": TokenLifecycleDetailsRevoked, +} + +var mappingTokenLifecycleDetailsEnumLowerCase = map[string]TokenLifecycleDetailsEnum{ + "expired": TokenLifecycleDetailsExpired, + "revoking": TokenLifecycleDetailsRevoking, + "revoked": TokenLifecycleDetailsRevoked, +} + +// GetTokenLifecycleDetailsEnumValues Enumerates the set of values for TokenLifecycleDetailsEnum +func GetTokenLifecycleDetailsEnumValues() []TokenLifecycleDetailsEnum { + values := make([]TokenLifecycleDetailsEnum, 0) + for _, v := range mappingTokenLifecycleDetailsEnum { + values = append(values, v) + } + return values +} + +// GetTokenLifecycleDetailsEnumStringValues Enumerates the set of values in String for TokenLifecycleDetailsEnum +func GetTokenLifecycleDetailsEnumStringValues() []string { + return []string{ + "EXPIRED", + "REVOKING", + "REVOKED", + } +} + +// GetMappingTokenLifecycleDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTokenLifecycleDetailsEnum(val string) (TokenLifecycleDetailsEnum, bool) { + enum, ok := mappingTokenLifecycleDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/token_sort_by.go b/jmsjavadownloads/token_sort_by.go new file mode 100644 index 0000000000..c14886fef0 --- /dev/null +++ b/jmsjavadownloads/token_sort_by.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "strings" +) + +// TokenSortByEnum Enum with underlying type: string +type TokenSortByEnum string + +// Set of constants representing the allowable values for TokenSortByEnum +const ( + TokenSortByTimeCreated TokenSortByEnum = "timeCreated" + TokenSortByTimeExpires TokenSortByEnum = "timeExpires" + TokenSortByState TokenSortByEnum = "state" + TokenSortByDisplayName TokenSortByEnum = "displayName" + TokenSortByJavaVersion TokenSortByEnum = "javaVersion" +) + +var mappingTokenSortByEnum = map[string]TokenSortByEnum{ + "timeCreated": TokenSortByTimeCreated, + "timeExpires": TokenSortByTimeExpires, + "state": TokenSortByState, + "displayName": TokenSortByDisplayName, + "javaVersion": TokenSortByJavaVersion, +} + +var mappingTokenSortByEnumLowerCase = map[string]TokenSortByEnum{ + "timecreated": TokenSortByTimeCreated, + "timeexpires": TokenSortByTimeExpires, + "state": TokenSortByState, + "displayname": TokenSortByDisplayName, + "javaversion": TokenSortByJavaVersion, +} + +// GetTokenSortByEnumValues Enumerates the set of values for TokenSortByEnum +func GetTokenSortByEnumValues() []TokenSortByEnum { + values := make([]TokenSortByEnum, 0) + for _, v := range mappingTokenSortByEnum { + values = append(values, v) + } + return values +} + +// GetTokenSortByEnumStringValues Enumerates the set of values in String for TokenSortByEnum +func GetTokenSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "timeExpires", + "state", + "displayName", + "javaVersion", + } +} + +// GetMappingTokenSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTokenSortByEnum(val string) (TokenSortByEnum, bool) { + enum, ok := mappingTokenSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/jmsjavadownloads/update_java_download_token_details.go b/jmsjavadownloads/update_java_download_token_details.go new file mode 100644 index 0000000000..341218a8de --- /dev/null +++ b/jmsjavadownloads/update_java_download_token_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateJavaDownloadTokenDetails The attributes of the JavaDownloadToken to be updated. +type UpdateJavaDownloadTokenDetails struct { + + // User provided display name of the JavaDownloadToken. + DisplayName *string `mandatory:"false" json:"displayName"` + + // User provided description of the JavaDownloadToken. + Description *string `mandatory:"false" json:"description"` + + // Update the token default status. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // Expiry time of the token. + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The license type(s) associated with the JavaDownloadToken. + LicenseType []LicenseTypeEnum `mandatory:"false" json:"licenseType"` + + // Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}`. (See Managing Tags and Tag Namespaces (https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}`. (See Understanding Free-form Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateJavaDownloadTokenDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateJavaDownloadTokenDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/update_java_download_token_request_response.go b/jmsjavadownloads/update_java_download_token_request_response.go new file mode 100644 index 0000000000..f978eca3e3 --- /dev/null +++ b/jmsjavadownloads/update_java_download_token_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateJavaDownloadTokenRequest wrapper for the UpdateJavaDownloadToken operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/UpdateJavaDownloadToken.go.html to see an example of how to use UpdateJavaDownloadTokenRequest. +type UpdateJavaDownloadTokenRequest struct { + + // Unique JavaDownloadToken identifier. + JavaDownloadTokenId *string `mandatory:"true" contributesTo:"path" name:"javaDownloadTokenId"` + + // The attributes to be updated. + UpdateJavaDownloadTokenDetails `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 UpdateJavaDownloadTokenRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateJavaDownloadTokenRequest) 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 UpdateJavaDownloadTokenRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateJavaDownloadTokenRequest) 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 UpdateJavaDownloadTokenRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateJavaDownloadTokenResponse wrapper for the UpdateJavaDownloadToken operation +type UpdateJavaDownloadTokenResponse 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, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateJavaDownloadTokenResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateJavaDownloadTokenResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/update_java_license_acceptance_record_details.go b/jmsjavadownloads/update_java_license_acceptance_record_details.go new file mode 100644 index 0000000000..ca12917a1c --- /dev/null +++ b/jmsjavadownloads/update_java_license_acceptance_record_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateJavaLicenseAcceptanceRecordDetails The attributes for updating a Java license acceptance record. +type UpdateJavaLicenseAcceptanceRecordDetails struct { + + // Status of license acceptance. + LicenseAcceptanceStatus LicenseAcceptanceStatusEnum `mandatory:"true" json:"licenseAcceptanceStatus"` +} + +func (m UpdateJavaLicenseAcceptanceRecordDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateJavaLicenseAcceptanceRecordDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseAcceptanceStatusEnum(string(m.LicenseAcceptanceStatus)); !ok && m.LicenseAcceptanceStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseAcceptanceStatus: %s. Supported values are: %s.", m.LicenseAcceptanceStatus, strings.Join(GetLicenseAcceptanceStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/jmsjavadownloads/update_java_license_acceptance_record_request_response.go b/jmsjavadownloads/update_java_license_acceptance_record_request_response.go new file mode 100644 index 0000000000..997d949b8a --- /dev/null +++ b/jmsjavadownloads/update_java_license_acceptance_record_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 jmsjavadownloads + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateJavaLicenseAcceptanceRecordRequest wrapper for the UpdateJavaLicenseAcceptanceRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jmsjavadownloads/UpdateJavaLicenseAcceptanceRecord.go.html to see an example of how to use UpdateJavaLicenseAcceptanceRecordRequest. +type UpdateJavaLicenseAcceptanceRecordRequest struct { + + // Unique Java license acceptance record identifier. + JavaLicenseAcceptanceRecordId *string `mandatory:"true" contributesTo:"path" name:"javaLicenseAcceptanceRecordId"` + + // Attributes for updating the JavaLicenseAcceptanceRecord. + UpdateJavaLicenseAcceptanceRecordDetails `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 UpdateJavaLicenseAcceptanceRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateJavaLicenseAcceptanceRecordRequest) 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 UpdateJavaLicenseAcceptanceRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateJavaLicenseAcceptanceRecordRequest) 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 UpdateJavaLicenseAcceptanceRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateJavaLicenseAcceptanceRecordResponse wrapper for the UpdateJavaLicenseAcceptanceRecord operation +type UpdateJavaLicenseAcceptanceRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The JavaLicenseAcceptanceRecord instance + JavaLicenseAcceptanceRecord `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateJavaLicenseAcceptanceRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateJavaLicenseAcceptanceRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/jmsjavadownloads/work_request.go b/jmsjavadownloads/work_request.go new file mode 100644 index 0000000000..bf571add55 --- /dev/null +++ b/jmsjavadownloads/work_request.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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 OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy scoped to the work request. + 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 request was completed, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +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/jmsjavadownloads/work_request_error.go b/jmsjavadownloads/work_request_error.go new file mode 100644 index 0000000000..5099d98f1a --- /dev/null +++ b/jmsjavadownloads/work_request_error.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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/jmsjavadownloads/work_request_error_collection.go b/jmsjavadownloads/work_request_error_collection.go new file mode 100644 index 0000000000..890de81a4b --- /dev/null +++ b/jmsjavadownloads/work_request_error_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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/jmsjavadownloads/work_request_log_entry.go b/jmsjavadownloads/work_request_log_entry.go new file mode 100644 index 0000000000..503fd0b0b0 --- /dev/null +++ b/jmsjavadownloads/work_request_log_entry.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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/jmsjavadownloads/work_request_log_entry_collection.go b/jmsjavadownloads/work_request_log_entry_collection.go new file mode 100644 index 0000000000..dd004a66eb --- /dev/null +++ b/jmsjavadownloads/work_request_log_entry_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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/jmsjavadownloads/work_request_resource.go b/jmsjavadownloads/work_request_resource.go new file mode 100644 index 0000000000..f3d4a82393 --- /dev/null +++ b/jmsjavadownloads/work_request_resource.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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"` +} + +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/jmsjavadownloads/work_request_summary.go b/jmsjavadownloads/work_request_summary.go new file mode 100644 index 0000000000..0f1b72c3f0 --- /dev/null +++ b/jmsjavadownloads/work_request_summary.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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 OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy scoped to the work request. + 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 request was completed, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +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/jmsjavadownloads/work_request_summary_collection.go b/jmsjavadownloads/work_request_summary_collection.go new file mode 100644 index 0000000000..ac1ef3b159 --- /dev/null +++ b/jmsjavadownloads/work_request_summary_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Java Management Service Download API +// +// The APIs for the download engine of the Java Management Service. +// + +package jmsjavadownloads + +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 +}