From 455306bab7e42c9da473cff6006963f65ee904f4 Mon Sep 17 00:00:00 2001 From: DEXREQ Automation Date: Thu, 31 Aug 2023 18:03:01 +0000 Subject: [PATCH] Merge pull request #2513 in SDK/oci-go-sdk from merge_to_github2023-08-31 to github Releasing Version 65.49.0 Squashed commit of the following: commit 2b1a64ba8f3ae2234c2eb090361eeb0987f596bf Author: oci-dex-release-bot Date: Thu Aug 31 17:47:33 2023 +0000 Releasing version 65 49 0 --- CHANGELOG.md | 18 ++ cims/account_item.go | 92 ++++++++ cims/activity_item.go | 136 +++++++++-- cims/availability_domain.go | 192 ---------------- cims/category.go | 12 +- cims/cims_incident_client.go | 71 +++++- cims/cims_user_client.go | 149 ------------ cims/classifier.go | 6 +- cims/contact.go | 11 +- cims/contact_list.go | 6 +- cims/contextual_data.go | 16 +- cims/create_account_item_details.go | 83 +++++++ cims/create_category_details.go | 9 +- cims/create_incident.go | 12 +- cims/create_incident_request_response.go | 20 +- cims/create_issue_type_details.go | 7 +- cims/create_item_details.go | 15 +- cims/create_limit_item_details.go | 12 +- cims/create_resource_details.go | 25 +-- cims/create_sub_category_details.go | 11 +- cims/create_tech_support_item_details.go | 11 +- cims/create_ticket_details.go | 16 +- cims/create_user_details.go | 19 +- cims/error_code.go | 212 ++++++++++++------ ....go => get_csi_number_request_response.go} | 51 +++-- cims/get_incident_request_response.go | 29 ++- cims/get_status_request_response.go | 9 +- cims/incident.go | 10 +- cims/incident_resource_type.go | 14 +- cims/incident_summary.go | 8 +- cims/incident_type.go | 8 +- cims/issue_type.go | 9 +- cims/item.go | 12 +- cims/lifecycle_details.go | 6 +- cims/lifecycle_state.go | 6 +- cims/limit_item.go | 16 +- ...ncident_resource_types_request_response.go | 17 +- cims/list_incidents_request_response.go | 28 ++- cims/problem_type.go | 10 +- cims/region.go | 140 ------------ cims/resource.go | 24 +- cims/scope.go | 6 +- cims/service_categories.go | 49 ++++ cims/service_category.go | 8 +- cims/sort_by.go | 6 +- cims/sort_order.go | 6 +- cims/status.go | 6 +- cims/sub_category.go | 12 +- cims/tech_support_item.go | 8 +- cims/tenancy_information.go | 10 +- cims/ticket.go | 10 +- cims/time_zone.go | 6 +- cims/unit.go | 6 +- cims/update_activity_item_details.go | 13 +- cims/update_incident.go | 12 +- cims/update_incident_request_response.go | 25 ++- cims/update_item_details.go | 9 +- cims/update_resource_details.go | 7 +- cims/update_ticket_details.go | 7 +- cims/user.go | 30 ++- cims/validate_user_request_response.go | 81 ++++++- cims/validation_response.go | 6 +- common/client.go | 12 + common/configuration.go | 100 ++++++++- common/configuration_test.go | 123 ++++++++++ common/version.go | 2 +- ...st_work_request_errors_request_response.go | 92 ++++++++ ...list_work_request_logs_request_response.go | 92 ++++++++ .../list_work_requests_request_response.go | 160 +++++++++++++ .../asynchronous_export_glossary_details.go | 38 ++++ ...ronous_export_glossary_request_response.go | 106 +++++++++ .../asynchronous_export_glossary_result.go | 52 +++++ .../asynchronous_export_request_details.go | 38 ++++ datacatalog/asynchronous_export_result.go | 52 +++++ datacatalog/attribute.go | 4 + datacatalog/attribute_summary.go | 4 + datacatalog/create_job_definition_details.go | 3 + datacatalog/create_job_details.go | 1 + datacatalog/data_asset.go | 4 + datacatalog/data_asset_summary.go | 4 + datacatalog/datacatalog_client.go | 120 ++++++++++ datacatalog/entity.go | 4 + datacatalog/entity_lineage.go | 58 +++++ datacatalog/entity_summary.go | 4 + .../faceted_search_date_filter_request.go | 2 +- .../faceted_search_string_filter_request.go | 5 +- datacatalog/fetch_entity_lineage_details.go | 54 +++++ .../fetch_entity_lineage_request_response.go | 115 ++++++++++ datacatalog/folder.go | 4 + datacatalog/folder_summary.go | 4 + datacatalog/job.go | 4 + datacatalog/job_definition.go | 3 + datacatalog/job_definition_summary.go | 3 + datacatalog/job_summary.go | 4 + datacatalog/job_type.go | 8 + datacatalog/lineage_direction.go | 61 +++++ datacatalog/lineage_object.go | 75 +++++++ datacatalog/lineage_relationship.go | 46 ++++ .../list_attributes_request_response.go | 25 ++- datacatalog/list_entities_request_response.go | 19 +- datacatalog/list_folders_request_response.go | 22 +- .../list_job_definitions_request_response.go | 11 + .../list_job_executions_request_response.go | 8 + datacatalog/list_jobs_request_response.go | 12 + datacatalog/object_lineage.go | 58 +++++ datacatalog/object_lineage_request_details.go | 54 +++++ .../object_storage_object_reference.go | 46 ++++ datacatalog/update_job_definition_details.go | 3 + datacatalog/update_job_details.go | 1 + queue/action_type.go | 2 +- queue/change_queue_compartment_details.go | 2 +- ...ange_queue_compartment_request_response.go | 4 +- queue/channel_collection.go | 39 ++++ queue/create_queue_details.go | 17 +- queue/create_queue_request_response.go | 2 +- queue/delete_message_request_response.go | 4 +- queue/delete_messages_details.go | 2 +- queue/delete_messages_details_entry.go | 4 +- queue/delete_messages_request_response.go | 4 +- queue/delete_messages_result.go | 2 +- queue/delete_messages_result_entry.go | 2 +- queue/delete_queue_request_response.go | 4 +- queue/get_message.go | 16 +- queue/get_messages.go | 2 +- queue/get_messages_request_response.go | 21 +- queue/get_queue_request_response.go | 4 +- queue/get_stats_request_response.go | 7 +- queue/get_work_request_request_response.go | 2 +- queue/list_channels_request_response.go | 104 +++++++++ queue/list_queues_request_response.go | 10 +- ...st_work_request_errors_request_response.go | 6 +- ...list_work_request_logs_request_response.go | 6 +- queue/list_work_requests_request_response.go | 8 +- queue/message_metadata.go | 42 ++++ queue/operation_status.go | 2 +- queue/operation_type.go | 2 +- queue/purge_queue_details.go | 13 +- queue/purge_queue_request_response.go | 4 +- queue/put_message.go | 10 +- queue/put_messages.go | 6 +- queue/put_messages_details.go | 2 +- queue/put_messages_details_entry.go | 4 +- queue/put_messages_request_response.go | 4 +- queue/queue.go | 27 ++- queue/queue_client.go | 86 ++++++- queue/queue_collection.go | 2 +- queue/queue_queueadmin_client.go | 17 +- queue/queue_stats.go | 7 +- queue/queue_summary.go | 22 +- queue/sort_order.go | 2 +- queue/stats.go | 4 +- queue/update_message_details.go | 2 +- queue/update_message_request_response.go | 4 +- queue/update_messages_details.go | 4 +- queue/update_messages_details_entry.go | 4 +- queue/update_messages_request_response.go | 4 +- queue/update_messages_result.go | 4 +- queue/update_messages_result_entry.go | 7 +- queue/update_queue_details.go | 13 +- queue/update_queue_request_response.go | 4 +- queue/updated_message.go | 7 +- queue/work_request.go | 4 +- queue/work_request_error.go | 4 +- queue/work_request_error_collection.go | 2 +- queue/work_request_log_entry.go | 4 +- queue/work_request_log_entry_collection.go | 2 +- queue/work_request_resource.go | 2 +- queue/work_request_summary.go | 6 +- queue/work_request_summary_collection.go | 2 +- 169 files changed, 3254 insertions(+), 956 deletions(-) create mode 100644 cims/account_item.go delete mode 100644 cims/availability_domain.go delete mode 100644 cims/cims_user_client.go create mode 100644 cims/create_account_item_details.go rename cims/{create_user_request_response.go => get_csi_number_request_response.go} (57%) delete mode 100644 cims/region.go create mode 100644 cims/service_categories.go create mode 100644 datacatalog/asynchronous_export_glossary_details.go create mode 100644 datacatalog/asynchronous_export_glossary_request_response.go create mode 100644 datacatalog/asynchronous_export_glossary_result.go create mode 100644 datacatalog/asynchronous_export_request_details.go create mode 100644 datacatalog/asynchronous_export_result.go create mode 100644 datacatalog/entity_lineage.go create mode 100644 datacatalog/fetch_entity_lineage_details.go create mode 100644 datacatalog/fetch_entity_lineage_request_response.go create mode 100644 datacatalog/lineage_direction.go create mode 100644 datacatalog/lineage_object.go create mode 100644 datacatalog/lineage_relationship.go create mode 100644 datacatalog/object_lineage.go create mode 100644 datacatalog/object_lineage_request_details.go create mode 100644 datacatalog/object_storage_object_reference.go create mode 100644 queue/channel_collection.go create mode 100644 queue/list_channels_request_response.go create mode 100644 queue/message_metadata.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ad50ec8ba..5064c81478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.49.0 - 2023-09-05 +### Added +- Support for queue channels in the Queue Service +- Support for entity lineage retrieval and asynchronous glossary export in the Data Catalog service +- Support for filtering and sorting while listing work requests in the Container Instances service +- Support for the ability to create support requests for various support ticket types (TECH,LIMIT, ACCOUNT) in the Customer Incident Management Service +- Endpoint changed from https://incidentmanagement.{region}.{domainAndTopLevelDomain} to https://incidentmanagement.{region}.oci.{domainAndTopLevelDomain} (e.g. https://incidentmanagement.us-phoenix-1.oraclecloud.com to https://incidentmanagement.us-phoenix-1.oci.oraclecloud.com) in the Customer Incident Management Service + +### Breaking Changes +- The type of property `Region` was changed from `RegionEnum` to `*string` in the models `Resource` and `CreateResourceDetails` in the Customer Incident Management Service +- The models `AvailabilityDomain`, `RegionEnum`, `CreateUserRequest`, and `UserClient` were removed from the Customer Incident Management Service +- The type of property `ProblemType` was changed from `string` to `ProblemType` in the `ValidateUserRequest` model in the Customer Incident Management Service +- The property `Source` was removed from the model `GetStatusRequest` in the Customer Incident Management Service +- The property `ProblemType` was renamed to `Problemtype` in the model `GetIncidentRequest` in the Customer Incident Management Service +- The property `AvailabilityDomain` was removed from the models `Resource` and `CreateResourceDetails` in the Customer Incident Management Service +- The property `Country` was removed from the model `CreateUserDetails` in the Customer Incident Management Service + + ## 65.48.0 - 2023-08-29 ### Added - Support for creating and updating network monitors in the Application Performance Monitoring Synthetics service diff --git a/cims/account_item.go b/cims/account_item.go new file mode 100644 index 0000000000..9aba32b57f --- /dev/null +++ b/cims/account_item.go @@ -0,0 +1,92 @@ +// 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. + +// Support Management API +// +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// + +package cims + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AccountItem Details about the AccountItem object. +type AccountItem struct { + + // Unique identifier for the item. + ItemKey *string `mandatory:"true" json:"itemKey"` + + // The display name of the item. Avoid entering confidential information. + Name *string `mandatory:"false" json:"name"` + + Category *Category `mandatory:"false" json:"category"` + + SubCategory *SubCategory `mandatory:"false" json:"subCategory"` + + IssueType *IssueType `mandatory:"false" json:"issueType"` +} + +//GetItemKey returns ItemKey +func (m AccountItem) GetItemKey() *string { + return m.ItemKey +} + +//GetName returns Name +func (m AccountItem) GetName() *string { + return m.Name +} + +//GetCategory returns Category +func (m AccountItem) GetCategory() *Category { + return m.Category +} + +//GetSubCategory returns SubCategory +func (m AccountItem) GetSubCategory() *SubCategory { + return m.SubCategory +} + +//GetIssueType returns IssueType +func (m AccountItem) GetIssueType() *IssueType { + return m.IssueType +} + +func (m AccountItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AccountItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AccountItem) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAccountItem AccountItem + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAccountItem + }{ + "account", + (MarshalTypeAccountItem)(m), + } + + return json.Marshal(&s) +} diff --git a/cims/activity_item.go b/cims/activity_item.go index 22571c8bc4..b139cd117c 100644 --- a/cims/activity_item.go +++ b/cims/activity_item.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -22,7 +26,16 @@ type ActivityItem struct { // Unique identifier for the item. ItemKey *string `mandatory:"true" json:"itemKey"` - // The display name of the item. + // Comments added with the activity on the support ticket. + Comments *string `mandatory:"true" json:"comments"` + + // The time when the activity was created, in milliseconds since epoch time. + TimeCreated *int `mandatory:"true" json:"timeCreated"` + + // The time when the activity was updated, in milliseconds since epoch time. + TimeUpdated *int `mandatory:"true" json:"timeUpdated"` + + // The display name of the item. Avoid entering confidential information. Name *string `mandatory:"false" json:"name"` Category *Category `mandatory:"false" json:"category"` @@ -31,20 +44,15 @@ type ActivityItem struct { IssueType *IssueType `mandatory:"false" json:"issueType"` - // Comments added with the activity on the support ticket. - Comments *string `mandatory:"false" json:"comments"` - - // The time when the activity was created, in milliseconds since epoch time. - TimeCreated *int `mandatory:"false" json:"timeCreated"` + // The type of activity occuring on the support ticket. + ActivityType ActivityItemActivityTypeEnum `mandatory:"true" json:"activityType"` - // The time when the activity was updated, in milliseconds since epoch time. - TimeUpdated *int `mandatory:"false" json:"timeUpdated"` + ActivityAuthor ActivityItemActivityAuthorEnum `mandatory:"true" json:"activityAuthor"` - // The type of activity occuring on the support ticket. - ActivityType ActivityItemActivityTypeEnum `mandatory:"false" json:"activityType,omitempty"` + ItemType ActivityItemItemTypeEnum `mandatory:"false" json:"itemType,omitempty"` - // The person who updates the activity on the support ticket. - ActivityAuthor ActivityItemActivityAuthorEnum `mandatory:"false" json:"activityAuthor,omitempty"` + // Who updates the activity on the support ticket. + ItemStatus ActivityItemItemStatusEnum `mandatory:"false" json:"itemStatus,omitempty"` } //GetItemKey returns ItemKey @@ -87,6 +95,12 @@ func (m ActivityItem) ValidateEnumValue() (bool, error) { if _, ok := GetMappingActivityItemActivityAuthorEnum(string(m.ActivityAuthor)); !ok && m.ActivityAuthor != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActivityAuthor: %s. Supported values are: %s.", m.ActivityAuthor, strings.Join(GetActivityItemActivityAuthorEnumStringValues(), ","))) } + if _, ok := GetMappingActivityItemItemTypeEnum(string(m.ItemType)); !ok && m.ItemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ItemType: %s. Supported values are: %s.", m.ItemType, strings.Join(GetActivityItemItemTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingActivityItemItemStatusEnum(string(m.ItemStatus)); !ok && m.ItemStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ItemStatus: %s. Supported values are: %s.", m.ItemStatus, strings.Join(GetActivityItemItemStatusEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -117,6 +131,7 @@ const ( ActivityItemActivityTypeProblemDescription ActivityItemActivityTypeEnum = "PROBLEM_DESCRIPTION" ActivityItemActivityTypeUpdate ActivityItemActivityTypeEnum = "UPDATE" ActivityItemActivityTypeClose ActivityItemActivityTypeEnum = "CLOSE" + ActivityItemActivityTypeReopen ActivityItemActivityTypeEnum = "REOPEN" ) var mappingActivityItemActivityTypeEnum = map[string]ActivityItemActivityTypeEnum{ @@ -124,6 +139,7 @@ var mappingActivityItemActivityTypeEnum = map[string]ActivityItemActivityTypeEnu "PROBLEM_DESCRIPTION": ActivityItemActivityTypeProblemDescription, "UPDATE": ActivityItemActivityTypeUpdate, "CLOSE": ActivityItemActivityTypeClose, + "REOPEN": ActivityItemActivityTypeReopen, } var mappingActivityItemActivityTypeEnumLowerCase = map[string]ActivityItemActivityTypeEnum{ @@ -131,6 +147,7 @@ var mappingActivityItemActivityTypeEnumLowerCase = map[string]ActivityItemActivi "problem_description": ActivityItemActivityTypeProblemDescription, "update": ActivityItemActivityTypeUpdate, "close": ActivityItemActivityTypeClose, + "reopen": ActivityItemActivityTypeReopen, } // GetActivityItemActivityTypeEnumValues Enumerates the set of values for ActivityItemActivityTypeEnum @@ -149,6 +166,7 @@ func GetActivityItemActivityTypeEnumStringValues() []string { "PROBLEM_DESCRIPTION", "UPDATE", "CLOSE", + "REOPEN", } } @@ -199,3 +217,95 @@ func GetMappingActivityItemActivityAuthorEnum(val string) (ActivityItemActivityA enum, ok := mappingActivityItemActivityAuthorEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// ActivityItemItemTypeEnum Enum with underlying type: string +type ActivityItemItemTypeEnum string + +// Set of constants representing the allowable values for ActivityItemItemTypeEnum +const ( + ActivityItemItemTypeAttachments ActivityItemItemTypeEnum = "ATTACHMENTS" + ActivityItemItemTypeComments ActivityItemItemTypeEnum = "COMMENTS" +) + +var mappingActivityItemItemTypeEnum = map[string]ActivityItemItemTypeEnum{ + "ATTACHMENTS": ActivityItemItemTypeAttachments, + "COMMENTS": ActivityItemItemTypeComments, +} + +var mappingActivityItemItemTypeEnumLowerCase = map[string]ActivityItemItemTypeEnum{ + "attachments": ActivityItemItemTypeAttachments, + "comments": ActivityItemItemTypeComments, +} + +// GetActivityItemItemTypeEnumValues Enumerates the set of values for ActivityItemItemTypeEnum +func GetActivityItemItemTypeEnumValues() []ActivityItemItemTypeEnum { + values := make([]ActivityItemItemTypeEnum, 0) + for _, v := range mappingActivityItemItemTypeEnum { + values = append(values, v) + } + return values +} + +// GetActivityItemItemTypeEnumStringValues Enumerates the set of values in String for ActivityItemItemTypeEnum +func GetActivityItemItemTypeEnumStringValues() []string { + return []string{ + "ATTACHMENTS", + "COMMENTS", + } +} + +// GetMappingActivityItemItemTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingActivityItemItemTypeEnum(val string) (ActivityItemItemTypeEnum, bool) { + enum, ok := mappingActivityItemItemTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ActivityItemItemStatusEnum Enum with underlying type: string +type ActivityItemItemStatusEnum string + +// Set of constants representing the allowable values for ActivityItemItemStatusEnum +const ( + ActivityItemItemStatusProcessing ActivityItemItemStatusEnum = "PROCESSING" + ActivityItemItemStatusAttached ActivityItemItemStatusEnum = "ATTACHED" + ActivityItemItemStatusRemoved ActivityItemItemStatusEnum = "REMOVED" + ActivityItemItemStatusFailed ActivityItemItemStatusEnum = "FAILED" +) + +var mappingActivityItemItemStatusEnum = map[string]ActivityItemItemStatusEnum{ + "PROCESSING": ActivityItemItemStatusProcessing, + "ATTACHED": ActivityItemItemStatusAttached, + "REMOVED": ActivityItemItemStatusRemoved, + "FAILED": ActivityItemItemStatusFailed, +} + +var mappingActivityItemItemStatusEnumLowerCase = map[string]ActivityItemItemStatusEnum{ + "processing": ActivityItemItemStatusProcessing, + "attached": ActivityItemItemStatusAttached, + "removed": ActivityItemItemStatusRemoved, + "failed": ActivityItemItemStatusFailed, +} + +// GetActivityItemItemStatusEnumValues Enumerates the set of values for ActivityItemItemStatusEnum +func GetActivityItemItemStatusEnumValues() []ActivityItemItemStatusEnum { + values := make([]ActivityItemItemStatusEnum, 0) + for _, v := range mappingActivityItemItemStatusEnum { + values = append(values, v) + } + return values +} + +// GetActivityItemItemStatusEnumStringValues Enumerates the set of values in String for ActivityItemItemStatusEnum +func GetActivityItemItemStatusEnumStringValues() []string { + return []string{ + "PROCESSING", + "ATTACHED", + "REMOVED", + "FAILED", + } +} + +// GetMappingActivityItemItemStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingActivityItemItemStatusEnum(val string) (ActivityItemItemStatusEnum, bool) { + enum, ok := mappingActivityItemItemStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/cims/availability_domain.go b/cims/availability_domain.go deleted file mode 100644 index 8873aa8534..0000000000 --- a/cims/availability_domain.go +++ /dev/null @@ -1,192 +0,0 @@ -// 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. - -// Support Management API -// -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. -// - -package cims - -import ( - "strings" -) - -// AvailabilityDomainEnum Enum with underlying type: string -type AvailabilityDomainEnum string - -// Set of constants representing the allowable values for AvailabilityDomainEnum -const ( - AvailabilityDomainDev1 AvailabilityDomainEnum = "DEV_1" - AvailabilityDomainDev2 AvailabilityDomainEnum = "DEV_2" - AvailabilityDomainDev3 AvailabilityDomainEnum = "DEV_3" - AvailabilityDomainIntegNext1 AvailabilityDomainEnum = "INTEG_NEXT_1" - AvailabilityDomainIntegStable1 AvailabilityDomainEnum = "INTEG_STABLE_1" - AvailabilityDomainSeaAd1 AvailabilityDomainEnum = "SEA_AD_1" - AvailabilityDomainSeaAd2 AvailabilityDomainEnum = "SEA_AD_2" - AvailabilityDomainSeaAd3 AvailabilityDomainEnum = "SEA_AD_3" - AvailabilityDomainPhxAd1 AvailabilityDomainEnum = "PHX_AD_1" - AvailabilityDomainPhxAd2 AvailabilityDomainEnum = "PHX_AD_2" - AvailabilityDomainPhxAd3 AvailabilityDomainEnum = "PHX_AD_3" - AvailabilityDomainUsAshburnAd1 AvailabilityDomainEnum = "US_ASHBURN_AD_1" - AvailabilityDomainUsAshburnAd2 AvailabilityDomainEnum = "US_ASHBURN_AD_2" - AvailabilityDomainUsAshburnAd3 AvailabilityDomainEnum = "US_ASHBURN_AD_3" - AvailabilityDomainUsAshburnAd4 AvailabilityDomainEnum = "US_ASHBURN_AD_4" - AvailabilityDomainEuFrankfurt1Ad1 AvailabilityDomainEnum = "EU_FRANKFURT_1_AD_1" - AvailabilityDomainEuFrankfurt1Ad2 AvailabilityDomainEnum = "EU_FRANKFURT_1_AD_2" - AvailabilityDomainEuFrankfurt1Ad3 AvailabilityDomainEnum = "EU_FRANKFURT_1_AD_3" - AvailabilityDomainUkLondon1Ad1 AvailabilityDomainEnum = "UK_LONDON_1_AD_1" - AvailabilityDomainUkLondon1Ad2 AvailabilityDomainEnum = "UK_LONDON_1_AD_2" - AvailabilityDomainUkLondon1Ad3 AvailabilityDomainEnum = "UK_LONDON_1_AD_3" - AvailabilityDomainCaToronto1Ad1 AvailabilityDomainEnum = "CA_TORONTO_1_AD_1" - AvailabilityDomainApTokyo1Ad1 AvailabilityDomainEnum = "AP_TOKYO_1_AD_1" - AvailabilityDomainApSeoul1Ad1 AvailabilityDomainEnum = "AP_SEOUL_1_AD_1" - AvailabilityDomainApMumbai1Ad1 AvailabilityDomainEnum = "AP_MUMBAI_1_AD_1" - AvailabilityDomainSaSaopaulo1Ad1 AvailabilityDomainEnum = "SA_SAOPAULO_1_AD_1" - AvailabilityDomainMeJeddah1Ad1 AvailabilityDomainEnum = "ME_JEDDAH_1_AD_1" - AvailabilityDomainApOsaka1Ad1 AvailabilityDomainEnum = "AP_OSAKA_1_AD_1" - AvailabilityDomainApSydney1Ad1 AvailabilityDomainEnum = "AP_SYDNEY_1_AD_1" - AvailabilityDomainEuZurich1Ad1 AvailabilityDomainEnum = "EU_ZURICH_1_AD_1" - AvailabilityDomainEuAmsterdam1Ad1 AvailabilityDomainEnum = "EU_AMSTERDAM_1_AD_1" - AvailabilityDomainApMelbourne1Ad1 AvailabilityDomainEnum = "AP_MELBOURNE_1_AD_1" - AvailabilityDomainCaMontreal1Ad1 AvailabilityDomainEnum = "CA_MONTREAL_1_AD_1" - AvailabilityDomainApHyderabad1Ad1 AvailabilityDomainEnum = "AP_HYDERABAD_1_AD_1" - AvailabilityDomainApChuncheon1Ad1 AvailabilityDomainEnum = "AP_CHUNCHEON_1_AD_1" - AvailabilityDomainNoAd AvailabilityDomainEnum = "NO_AD" -) - -var mappingAvailabilityDomainEnum = map[string]AvailabilityDomainEnum{ - "DEV_1": AvailabilityDomainDev1, - "DEV_2": AvailabilityDomainDev2, - "DEV_3": AvailabilityDomainDev3, - "INTEG_NEXT_1": AvailabilityDomainIntegNext1, - "INTEG_STABLE_1": AvailabilityDomainIntegStable1, - "SEA_AD_1": AvailabilityDomainSeaAd1, - "SEA_AD_2": AvailabilityDomainSeaAd2, - "SEA_AD_3": AvailabilityDomainSeaAd3, - "PHX_AD_1": AvailabilityDomainPhxAd1, - "PHX_AD_2": AvailabilityDomainPhxAd2, - "PHX_AD_3": AvailabilityDomainPhxAd3, - "US_ASHBURN_AD_1": AvailabilityDomainUsAshburnAd1, - "US_ASHBURN_AD_2": AvailabilityDomainUsAshburnAd2, - "US_ASHBURN_AD_3": AvailabilityDomainUsAshburnAd3, - "US_ASHBURN_AD_4": AvailabilityDomainUsAshburnAd4, - "EU_FRANKFURT_1_AD_1": AvailabilityDomainEuFrankfurt1Ad1, - "EU_FRANKFURT_1_AD_2": AvailabilityDomainEuFrankfurt1Ad2, - "EU_FRANKFURT_1_AD_3": AvailabilityDomainEuFrankfurt1Ad3, - "UK_LONDON_1_AD_1": AvailabilityDomainUkLondon1Ad1, - "UK_LONDON_1_AD_2": AvailabilityDomainUkLondon1Ad2, - "UK_LONDON_1_AD_3": AvailabilityDomainUkLondon1Ad3, - "CA_TORONTO_1_AD_1": AvailabilityDomainCaToronto1Ad1, - "AP_TOKYO_1_AD_1": AvailabilityDomainApTokyo1Ad1, - "AP_SEOUL_1_AD_1": AvailabilityDomainApSeoul1Ad1, - "AP_MUMBAI_1_AD_1": AvailabilityDomainApMumbai1Ad1, - "SA_SAOPAULO_1_AD_1": AvailabilityDomainSaSaopaulo1Ad1, - "ME_JEDDAH_1_AD_1": AvailabilityDomainMeJeddah1Ad1, - "AP_OSAKA_1_AD_1": AvailabilityDomainApOsaka1Ad1, - "AP_SYDNEY_1_AD_1": AvailabilityDomainApSydney1Ad1, - "EU_ZURICH_1_AD_1": AvailabilityDomainEuZurich1Ad1, - "EU_AMSTERDAM_1_AD_1": AvailabilityDomainEuAmsterdam1Ad1, - "AP_MELBOURNE_1_AD_1": AvailabilityDomainApMelbourne1Ad1, - "CA_MONTREAL_1_AD_1": AvailabilityDomainCaMontreal1Ad1, - "AP_HYDERABAD_1_AD_1": AvailabilityDomainApHyderabad1Ad1, - "AP_CHUNCHEON_1_AD_1": AvailabilityDomainApChuncheon1Ad1, - "NO_AD": AvailabilityDomainNoAd, -} - -var mappingAvailabilityDomainEnumLowerCase = map[string]AvailabilityDomainEnum{ - "dev_1": AvailabilityDomainDev1, - "dev_2": AvailabilityDomainDev2, - "dev_3": AvailabilityDomainDev3, - "integ_next_1": AvailabilityDomainIntegNext1, - "integ_stable_1": AvailabilityDomainIntegStable1, - "sea_ad_1": AvailabilityDomainSeaAd1, - "sea_ad_2": AvailabilityDomainSeaAd2, - "sea_ad_3": AvailabilityDomainSeaAd3, - "phx_ad_1": AvailabilityDomainPhxAd1, - "phx_ad_2": AvailabilityDomainPhxAd2, - "phx_ad_3": AvailabilityDomainPhxAd3, - "us_ashburn_ad_1": AvailabilityDomainUsAshburnAd1, - "us_ashburn_ad_2": AvailabilityDomainUsAshburnAd2, - "us_ashburn_ad_3": AvailabilityDomainUsAshburnAd3, - "us_ashburn_ad_4": AvailabilityDomainUsAshburnAd4, - "eu_frankfurt_1_ad_1": AvailabilityDomainEuFrankfurt1Ad1, - "eu_frankfurt_1_ad_2": AvailabilityDomainEuFrankfurt1Ad2, - "eu_frankfurt_1_ad_3": AvailabilityDomainEuFrankfurt1Ad3, - "uk_london_1_ad_1": AvailabilityDomainUkLondon1Ad1, - "uk_london_1_ad_2": AvailabilityDomainUkLondon1Ad2, - "uk_london_1_ad_3": AvailabilityDomainUkLondon1Ad3, - "ca_toronto_1_ad_1": AvailabilityDomainCaToronto1Ad1, - "ap_tokyo_1_ad_1": AvailabilityDomainApTokyo1Ad1, - "ap_seoul_1_ad_1": AvailabilityDomainApSeoul1Ad1, - "ap_mumbai_1_ad_1": AvailabilityDomainApMumbai1Ad1, - "sa_saopaulo_1_ad_1": AvailabilityDomainSaSaopaulo1Ad1, - "me_jeddah_1_ad_1": AvailabilityDomainMeJeddah1Ad1, - "ap_osaka_1_ad_1": AvailabilityDomainApOsaka1Ad1, - "ap_sydney_1_ad_1": AvailabilityDomainApSydney1Ad1, - "eu_zurich_1_ad_1": AvailabilityDomainEuZurich1Ad1, - "eu_amsterdam_1_ad_1": AvailabilityDomainEuAmsterdam1Ad1, - "ap_melbourne_1_ad_1": AvailabilityDomainApMelbourne1Ad1, - "ca_montreal_1_ad_1": AvailabilityDomainCaMontreal1Ad1, - "ap_hyderabad_1_ad_1": AvailabilityDomainApHyderabad1Ad1, - "ap_chuncheon_1_ad_1": AvailabilityDomainApChuncheon1Ad1, - "no_ad": AvailabilityDomainNoAd, -} - -// GetAvailabilityDomainEnumValues Enumerates the set of values for AvailabilityDomainEnum -func GetAvailabilityDomainEnumValues() []AvailabilityDomainEnum { - values := make([]AvailabilityDomainEnum, 0) - for _, v := range mappingAvailabilityDomainEnum { - values = append(values, v) - } - return values -} - -// GetAvailabilityDomainEnumStringValues Enumerates the set of values in String for AvailabilityDomainEnum -func GetAvailabilityDomainEnumStringValues() []string { - return []string{ - "DEV_1", - "DEV_2", - "DEV_3", - "INTEG_NEXT_1", - "INTEG_STABLE_1", - "SEA_AD_1", - "SEA_AD_2", - "SEA_AD_3", - "PHX_AD_1", - "PHX_AD_2", - "PHX_AD_3", - "US_ASHBURN_AD_1", - "US_ASHBURN_AD_2", - "US_ASHBURN_AD_3", - "US_ASHBURN_AD_4", - "EU_FRANKFURT_1_AD_1", - "EU_FRANKFURT_1_AD_2", - "EU_FRANKFURT_1_AD_3", - "UK_LONDON_1_AD_1", - "UK_LONDON_1_AD_2", - "UK_LONDON_1_AD_3", - "CA_TORONTO_1_AD_1", - "AP_TOKYO_1_AD_1", - "AP_SEOUL_1_AD_1", - "AP_MUMBAI_1_AD_1", - "SA_SAOPAULO_1_AD_1", - "ME_JEDDAH_1_AD_1", - "AP_OSAKA_1_AD_1", - "AP_SYDNEY_1_AD_1", - "EU_ZURICH_1_AD_1", - "EU_AMSTERDAM_1_AD_1", - "AP_MELBOURNE_1_AD_1", - "CA_MONTREAL_1_AD_1", - "AP_HYDERABAD_1_AD_1", - "AP_CHUNCHEON_1_AD_1", - "NO_AD", - } -} - -// GetMappingAvailabilityDomainEnum performs case Insensitive comparison on enum value and return the desired enum -func GetMappingAvailabilityDomainEnum(val string) (AvailabilityDomainEnum, bool) { - enum, ok := mappingAvailabilityDomainEnumLowerCase[strings.ToLower(val)] - return enum, ok -} diff --git a/cims/category.go b/cims/category.go index a1bad8b5f8..3ff5d8786a 100644 --- a/cims/category.go +++ b/cims/category.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,13 +19,13 @@ import ( "strings" ) -// Category Details about the category associated with the support ticket. +// Category Details about the service category associated with the support ticket. type Category struct { - // Unique identifier for the category. + // Unique identifier for the service category. CategoryKey *string `mandatory:"false" json:"categoryKey"` - // The name of the category. For example, `Compute` or `Identity`. + // The name of the service category. For example, `Compute` or `Identity`. Name *string `mandatory:"false" json:"name"` } diff --git a/cims/cims_incident_client.go b/cims/cims_incident_client.go index 356141faaf..92b7c8a7e3 100644 --- a/cims/cims_incident_client.go +++ b/cims/cims_incident_client.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -67,7 +71,7 @@ func newIncidentClientFromBaseClient(baseClient common.BaseClient, configProvide // SetRegion overrides the region of this client. func (client *IncidentClient) SetRegion(region string) { - client.Host = common.StringToRegion(region).EndpointForTemplate("cims", "https://incidentmanagement.{region}.{secondLevelDomain}") + client.Host = common.StringToRegion(region).EndpointForTemplate("cims", "https://incidentmanagement.{region}.oci.{secondLevelDomain}") } // SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid @@ -91,7 +95,7 @@ func (client *IncidentClient) ConfigurationProvider() *common.ConfigurationProvi return client.config } -// CreateIncident Enables the customer to create an support ticket. +// CreateIncident Operation to create a support ticket. // // See also // @@ -148,7 +152,64 @@ func (client IncidentClient) createIncident(ctx context.Context, request common. return response, err } -// GetIncident Gets the details of the support ticket. +// GetCsiNumber Fetches csi number of the user. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cims/GetCsiNumber.go.html to see an example of how to use GetCsiNumber API. +func (client IncidentClient) GetCsiNumber(ctx context.Context, request GetCsiNumberRequest) (response GetCsiNumberResponse, 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.getCsiNumber, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCsiNumberResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCsiNumberResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCsiNumberResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCsiNumberResponse") + } + return +} + +// getCsiNumber implements the OCIOperation interface (enables retrying operations) +func (client IncidentClient) getCsiNumber(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/v2/incidents/getCsiNumber", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCsiNumberResponse + 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, "Incident", "GetCsiNumber", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIncident Gets details about the specified support ticket. // // See also // @@ -242,7 +303,7 @@ func (client IncidentClient) GetStatus(ctx context.Context, request GetStatusReq // getStatus implements the OCIOperation interface (enables retrying operations) func (client IncidentClient) getStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/v2/incidents/status/{source}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/v2/incidents/status", binaryReqBody, extraHeaders) if err != nil { return nil, err } diff --git a/cims/cims_user_client.go b/cims/cims_user_client.go deleted file mode 100644 index dbf122897b..0000000000 --- a/cims/cims_user_client.go +++ /dev/null @@ -1,149 +0,0 @@ -// 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. - -// Support Management API -// -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. -// - -package cims - -import ( - "context" - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "github.com/oracle/oci-go-sdk/v65/common/auth" - "net/http" -) - -// UserClient a client for User -type UserClient struct { - common.BaseClient - config *common.ConfigurationProvider -} - -// NewUserClientWithConfigurationProvider Creates a new default User client with the given configuration provider. -// the configuration provider will be used for the default signer as well as reading the region -func NewUserClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client UserClient, err error) { - if enabled := common.CheckForEnabledServices("cims"); !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 newUserClientFromBaseClient(baseClient, provider) -} - -// NewUserClientWithOboToken Creates a new default User 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 NewUserClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client UserClient, err error) { - baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) - if err != nil { - return client, err - } - - return newUserClientFromBaseClient(baseClient, configProvider) -} - -func newUserClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client UserClient, err error) { - // User service default circuit breaker is enabled - baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("User")) - common.ConfigCircuitBreakerFromEnvVar(&baseClient) - common.ConfigCircuitBreakerFromGlobalVar(&baseClient) - - client = UserClient{BaseClient: baseClient} - client.BasePath = "20181231" - err = client.setConfigurationProvider(configProvider) - return -} - -// SetRegion overrides the region of this client. -func (client *UserClient) SetRegion(region string) { - client.Host = common.StringToRegion(region).EndpointForTemplate("cims", "https://incidentmanagement.{region}.{secondLevelDomain}") -} - -// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid -func (client *UserClient) 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 *UserClient) ConfigurationProvider() *common.ConfigurationProvider { - return client.config -} - -// CreateUser Create user to request Customer Support Identifier(CSI) to Customer User Administrator(CUA). -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cims/CreateUser.go.html to see an example of how to use CreateUser API. -func (client UserClient) CreateUser(ctx context.Context, request CreateUserRequest) (response CreateUserResponse, 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.createUser, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = CreateUserResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(CreateUserResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateUserResponse") - } - return -} - -// createUser implements the OCIOperation interface (enables retrying operations) -func (client UserClient) createUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPost, "/v2/users", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response CreateUserResponse - var httpResponse *http.Response - httpResponse, err = client.Call(ctx, &httpRequest) - defer common.CloseBodyIfValid(httpResponse) - response.RawResponse = httpResponse - if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/incidentmanagement/20181231/User/CreateUser" - err = common.PostProcessServiceError(err, "User", "CreateUser", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} diff --git a/cims/classifier.go b/cims/classifier.go index 5ddf159308..6ee21652e9 100644 --- a/cims/classifier.go +++ b/cims/classifier.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/contact.go b/cims/contact.go index 0be2894ada..c7910f9463 100644 --- a/cims/contact.go +++ b/cims/contact.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,7 +19,7 @@ import ( "strings" ) -// Contact Contact details for the customer. +// Contact Contact details for the customer. Avoid entering confidential information. type Contact struct { // The name of the contact person. @@ -24,6 +28,9 @@ type Contact struct { // The email of the contact person. ContactEmail *string `mandatory:"false" json:"contactEmail"` + // The email of the contact person. + Email *string `mandatory:"false" json:"email"` + // The phone number of the contact person. ContactPhone *string `mandatory:"false" json:"contactPhone"` diff --git a/cims/contact_list.go b/cims/contact_list.go index ae0cf08ed9..2f34fd7b50 100644 --- a/cims/contact_list.go +++ b/cims/contact_list.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/contextual_data.go b/cims/contextual_data.go index eae088ed16..99adb6dffc 100644 --- a/cims/contextual_data.go +++ b/cims/contextual_data.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,19 +19,19 @@ import ( "strings" ) -// ContextualData The representation of ContextualData +// ContextualData Information collected from user context during ticket creation. type ContextualData struct { - // The unique client identifier + // The unique identifier for the client. ClientId *string `mandatory:"true" json:"clientId"` - // The schema name + // The name assigned to the schema. SchemaName *string `mandatory:"true" json:"schemaName"` - // The schema version + // The version of the schema. SchemaVersion *string `mandatory:"true" json:"schemaVersion"` - // The context data payload + // The payload for the contextual data. Payload *string `mandatory:"true" json:"payload"` } diff --git a/cims/create_account_item_details.go b/cims/create_account_item_details.go new file mode 100644 index 0000000000..9df131260d --- /dev/null +++ b/cims/create_account_item_details.go @@ -0,0 +1,83 @@ +// 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. + +// Support Management API +// +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// + +package cims + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAccountItemDetails Details about the issue that the account support ticket relates to. Avoid entering confidential information. +type CreateAccountItemDetails struct { + Category *CreateCategoryDetails `mandatory:"false" json:"category"` + + SubCategory *CreateSubCategoryDetails `mandatory:"false" json:"subCategory"` + + IssueType *CreateIssueTypeDetails `mandatory:"false" json:"issueType"` + + // The display name of the ticket. Avoid entering confidential information. + Name *string `mandatory:"false" json:"name"` +} + +//GetCategory returns Category +func (m CreateAccountItemDetails) GetCategory() *CreateCategoryDetails { + return m.Category +} + +//GetSubCategory returns SubCategory +func (m CreateAccountItemDetails) GetSubCategory() *CreateSubCategoryDetails { + return m.SubCategory +} + +//GetIssueType returns IssueType +func (m CreateAccountItemDetails) GetIssueType() *CreateIssueTypeDetails { + return m.IssueType +} + +//GetName returns Name +func (m CreateAccountItemDetails) GetName() *string { + return m.Name +} + +func (m CreateAccountItemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAccountItemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAccountItemDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAccountItemDetails CreateAccountItemDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeCreateAccountItemDetails + }{ + "account", + (MarshalTypeCreateAccountItemDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/cims/create_category_details.go b/cims/create_category_details.go index 715be89780..dae0f58d19 100644 --- a/cims/create_category_details.go +++ b/cims/create_category_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,10 +20,9 @@ import ( ) // CreateCategoryDetails Details for creating the category of the support ticket. -// **Caution:** Avoid using any confidential information when you supply string values using the API. type CreateCategoryDetails struct { - // Unique identifier for the category. + // Unique identifier for the service category. CategoryKey *string `mandatory:"false" json:"categoryKey"` } diff --git a/cims/create_incident.go b/cims/create_incident.go index a097d1f884..05949d9f34 100644 --- a/cims/create_incident.go +++ b/cims/create_incident.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,7 +20,6 @@ import ( ) // CreateIncident Details gathered during the creation of the support ticket. -// **Caution:** Avoid using any confidential information when you supply string values using the API. type CreateIncident struct { // The OCID of the tenancy. @@ -24,10 +27,11 @@ type CreateIncident struct { Ticket *CreateTicketDetails `mandatory:"true" json:"ticket"` - // The kind of support ticket, such as a technical issue request. + // The kind of support ticket, such as a technical support request or a limit increase request. ProblemType ProblemTypeEnum `mandatory:"true" json:"problemType"` - // The Customer Support Identifier number for the support account. + // The Customer Support Identifier (CSI) number associated with the support account. + // The CSI is required for technical support tickets and optional for limits and billing tickets. Csi *string `mandatory:"false" json:"csi"` // The list of contacts. diff --git a/cims/create_incident_request_response.go b/cims/create_incident_request_response.go index 048895401f..c4d1f429bb 100644 --- a/cims/create_incident_request_response.go +++ b/cims/create_incident_request_response.go @@ -21,15 +21,27 @@ type CreateIncidentRequest struct { // Incident information CreateIncidentDetails CreateIncident `contributesTo:"body"` - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` + // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` + // Token type that determine which cloud provider the request come from. + Bearertokentype *string `mandatory:"false" contributesTo:"header" name:"bearertokentype"` + + // Token that provided by multi cloud provider, which help to validate the email. + Bearertoken *string `mandatory:"false" contributesTo:"header" name:"bearertoken"` + + // IdToken that provided by multi cloud provider, which help to validate the email. + Idtoken *string `mandatory:"false" contributesTo:"header" name:"idtoken"` + + // The OCID of identity domain. + Domainid *string `mandatory:"false" contributesTo:"header" name:"domainid"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -81,7 +93,7 @@ type CreateIncidentResponse struct { // The Incident instance Incident `presentIn:"body"` - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request identifier. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } diff --git a/cims/create_issue_type_details.go b/cims/create_issue_type_details.go index 3136321e2f..05914b47ea 100644 --- a/cims/create_issue_type_details.go +++ b/cims/create_issue_type_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,7 +20,6 @@ import ( ) // CreateIssueTypeDetails Details for creating the issue type of the support ticket. -// **Caution:** Avoid using any confidential information when you supply string values using the API. type CreateIssueTypeDetails struct { // Unique identifier for the issue type. diff --git a/cims/create_item_details.go b/cims/create_item_details.go index d53fd063ba..61d8d96fc6 100644 --- a/cims/create_item_details.go +++ b/cims/create_item_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,8 +20,7 @@ import ( "strings" ) -// CreateItemDetails Details gathered during item creation. -// **Caution:** Avoid using any confidential information when you supply string values using the API. +// CreateItemDetails Details gathered during ticket creation. type CreateItemDetails interface { GetCategory() *CreateCategoryDetails @@ -25,7 +28,7 @@ type CreateItemDetails interface { GetIssueType() *CreateIssueTypeDetails - // The display name of the item. + // The display name of the ticket. Avoid entering confidential information. GetName() *string } @@ -75,6 +78,10 @@ func (m *createitemdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := CreateLimitItemDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "account": + mm := CreateAccountItemDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for CreateItemDetails: %s.", m.Type) return *m, nil diff --git a/cims/create_limit_item_details.go b/cims/create_limit_item_details.go index b34e98e9e9..8c2981f3f6 100644 --- a/cims/create_limit_item_details.go +++ b/cims/create_limit_item_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,7 +20,7 @@ import ( "strings" ) -// CreateLimitItemDetails Reserved for future use. +// CreateLimitItemDetails Details about the service limit increase request. Avoid entering confidential information. type CreateLimitItemDetails struct { Category *CreateCategoryDetails `mandatory:"false" json:"category"` @@ -24,7 +28,7 @@ type CreateLimitItemDetails struct { IssueType *CreateIssueTypeDetails `mandatory:"false" json:"issueType"` - // The display name of the item. + // The display name of the ticket. Avoid entering confidential information. Name *string `mandatory:"false" json:"name"` // The limit of the resource currently available. @@ -33,7 +37,7 @@ type CreateLimitItemDetails struct { // The current usage of the resource. CurrentUsage *int `mandatory:"false" json:"currentUsage"` - // Reserved for future use. + // The new service limit being requested. RequestedLimit *int `mandatory:"false" json:"requestedLimit"` // The current status of the request. diff --git a/cims/create_resource_details.go b/cims/create_resource_details.go index 23b91e3742..7a73340e12 100644 --- a/cims/create_resource_details.go +++ b/cims/create_resource_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -17,15 +21,11 @@ import ( ) // CreateResourceDetails Details about the resource that the support ticket relates to. -// **Caution:** Avoid using any confidential information when you supply string values using the API. type CreateResourceDetails struct { Item CreateItemDetails `mandatory:"false" json:"item"` // The list of available Oracle Cloud Infrastructure regions. - Region RegionEnum `mandatory:"false" json:"region,omitempty"` - - // The list of available Oracle Cloud Infrastructure availability domains. - AvailabilityDomain AvailabilityDomainEnum `mandatory:"false" json:"availabilityDomain,omitempty"` + Region *string `mandatory:"false" json:"region"` } func (m CreateResourceDetails) String() string { @@ -38,12 +38,6 @@ func (m CreateResourceDetails) String() string { func (m CreateResourceDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} - if _, ok := GetMappingRegionEnum(string(m.Region)); !ok && m.Region != "" { - errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Region: %s. Supported values are: %s.", m.Region, strings.Join(GetRegionEnumStringValues(), ","))) - } - if _, ok := GetMappingAvailabilityDomainEnum(string(m.AvailabilityDomain)); !ok && m.AvailabilityDomain != "" { - errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AvailabilityDomain: %s. Supported values are: %s.", m.AvailabilityDomain, strings.Join(GetAvailabilityDomainEnumStringValues(), ","))) - } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -53,9 +47,8 @@ func (m CreateResourceDetails) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *CreateResourceDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - Item createitemdetails `json:"item"` - Region RegionEnum `json:"region"` - AvailabilityDomain AvailabilityDomainEnum `json:"availabilityDomain"` + Item createitemdetails `json:"item"` + Region *string `json:"region"` }{} e = json.Unmarshal(data, &model) @@ -75,7 +68,5 @@ func (m *CreateResourceDetails) UnmarshalJSON(data []byte) (e error) { m.Region = model.Region - m.AvailabilityDomain = model.AvailabilityDomain - return } diff --git a/cims/create_sub_category_details.go b/cims/create_sub_category_details.go index 8bef8dd450..d9f6082a7e 100644 --- a/cims/create_sub_category_details.go +++ b/cims/create_sub_category_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,11 +19,10 @@ import ( "strings" ) -// CreateSubCategoryDetails Details for creating the subcategory of the support ticket. -// **Caution:** Avoid using any confidential information when you supply string values using the API. +// CreateSubCategoryDetails Details for creating the service subcategory of the support ticket. type CreateSubCategoryDetails struct { - // Unique identifier for the subcategory. + // Unique identifier for the service subcategory. SubCategoryKey *string `mandatory:"false" json:"subCategoryKey"` } diff --git a/cims/create_tech_support_item_details.go b/cims/create_tech_support_item_details.go index fa1df8f60b..7cf3fd40eb 100644 --- a/cims/create_tech_support_item_details.go +++ b/cims/create_tech_support_item_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,8 +20,7 @@ import ( "strings" ) -// CreateTechSupportItemDetails Details about the issue that the technical support request relates to. -// **Caution:** Avoid using any confidential information when you supply string values using the API. +// CreateTechSupportItemDetails Details about the issue that the technical support ticket relates to. Avoid entering confidential information. type CreateTechSupportItemDetails struct { Category *CreateCategoryDetails `mandatory:"false" json:"category"` @@ -25,7 +28,7 @@ type CreateTechSupportItemDetails struct { IssueType *CreateIssueTypeDetails `mandatory:"false" json:"issueType"` - // The display name of the item. + // The display name of the ticket. Avoid entering confidential information. Name *string `mandatory:"false" json:"name"` } diff --git a/cims/create_ticket_details.go b/cims/create_ticket_details.go index f5c6e9828b..fd443530d2 100644 --- a/cims/create_ticket_details.go +++ b/cims/create_ticket_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,22 +20,20 @@ import ( ) // CreateTicketDetails Details relevant to the support ticket. -// **Caution:** Avoid using any confidential information when you supply string values using the API. type CreateTicketDetails struct { // The severity of the support ticket. Severity CreateTicketDetailsSeverityEnum `mandatory:"true" json:"severity"` - // The title of the support ticket. + // The title of the support ticket. Avoid entering confidential information. Title *string `mandatory:"true" json:"title"` - // The description of the support ticket. + // The description of the support ticket. Avoid entering confidential information. Description *string `mandatory:"true" json:"description"` // The list of resources. ResourceList []CreateResourceDetails `mandatory:"false" json:"resourceList"` - // The context from where the ticket is getting created. ContextualData *ContextualData `mandatory:"false" json:"contextualData"` } @@ -62,18 +64,21 @@ const ( CreateTicketDetailsSeverityHighest CreateTicketDetailsSeverityEnum = "HIGHEST" CreateTicketDetailsSeverityHigh CreateTicketDetailsSeverityEnum = "HIGH" CreateTicketDetailsSeverityMedium CreateTicketDetailsSeverityEnum = "MEDIUM" + CreateTicketDetailsSeverityLow CreateTicketDetailsSeverityEnum = "LOW" ) var mappingCreateTicketDetailsSeverityEnum = map[string]CreateTicketDetailsSeverityEnum{ "HIGHEST": CreateTicketDetailsSeverityHighest, "HIGH": CreateTicketDetailsSeverityHigh, "MEDIUM": CreateTicketDetailsSeverityMedium, + "LOW": CreateTicketDetailsSeverityLow, } var mappingCreateTicketDetailsSeverityEnumLowerCase = map[string]CreateTicketDetailsSeverityEnum{ "highest": CreateTicketDetailsSeverityHighest, "high": CreateTicketDetailsSeverityHigh, "medium": CreateTicketDetailsSeverityMedium, + "low": CreateTicketDetailsSeverityLow, } // GetCreateTicketDetailsSeverityEnumValues Enumerates the set of values for CreateTicketDetailsSeverityEnum @@ -91,6 +96,7 @@ func GetCreateTicketDetailsSeverityEnumStringValues() []string { "HIGHEST", "HIGH", "MEDIUM", + "LOW", } } diff --git a/cims/create_user_details.go b/cims/create_user_details.go index fe9f38ff8e..6e27739cf3 100644 --- a/cims/create_user_details.go +++ b/cims/create_user_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,7 +19,7 @@ import ( "strings" ) -// CreateUserDetails Details about creation of user. +// CreateUserDetails Details for creating a new user. type CreateUserDetails struct { // The OCID of the tenancy. @@ -27,10 +31,7 @@ type CreateUserDetails struct { // Last name of the user. LastName *string `mandatory:"true" json:"lastName"` - // Country of the user. - Country *string `mandatory:"true" json:"country"` - - // CSI to be associated to the user. + // CSI associated with the user. Csi *string `mandatory:"true" json:"csi"` // Contact number of the user. @@ -41,6 +42,9 @@ type CreateUserDetails struct { // Organization of the user. OrganizationName *string `mandatory:"true" json:"organizationName"` + + // The kind of support ticket, such as a technical support request or a limit increase request. + ProblemType ProblemTypeEnum `mandatory:"true" json:"problemType"` } func (m CreateUserDetails) String() string { @@ -52,6 +56,9 @@ func (m CreateUserDetails) String() string { // Not recommended for calling this function directly func (m CreateUserDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingProblemTypeEnum(string(m.ProblemType)); !ok && m.ProblemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProblemType: %s. Supported values are: %s.", m.ProblemType, strings.Join(GetProblemTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) diff --git a/cims/error_code.go b/cims/error_code.go index a8a84928de..7fc0acf800 100644 --- a/cims/error_code.go +++ b/cims/error_code.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -18,81 +22,132 @@ type ErrorCodeEnum string // Set of constants representing the allowable values for ErrorCodeEnum const ( - ErrorCodeContentEmpty ErrorCodeEnum = "CONTENT_EMPTY" - ErrorCodeClientException ErrorCodeEnum = "CLIENT_EXCEPTION" - ErrorCodeInvalidFormat ErrorCodeEnum = "INVALID_FORMAT" - ErrorCodeInvalidJsonInput ErrorCodeEnum = "INVALID_JSON_INPUT" - ErrorCodeSslAuthorization ErrorCodeEnum = "SSL_AUTHORIZATION" - ErrorCodeAuthFailed ErrorCodeEnum = "AUTH_FAILED" - ErrorCodeCsiNotAuthorized ErrorCodeEnum = "CSI_NOT_AUTHORIZED" - ErrorCodeUserPolicyNotAuthorized ErrorCodeEnum = "USER_POLICY_NOT_AUTHORIZED" - ErrorCodeEmailNotVerified ErrorCodeEnum = "EMAIL_NOT_VERIFIED" - ErrorCodeEmailNotFound ErrorCodeEnum = "EMAIL_NOT_FOUND" - ErrorCodeIdcsEmailNotValid ErrorCodeEnum = "IDCS_EMAIL_NOT_VALID" - ErrorCodeInvalidPath ErrorCodeEnum = "INVALID_PATH" - ErrorCodeMethodNotAllowed ErrorCodeEnum = "METHOD_NOT_ALLOWED" - ErrorCodeJsonProcessing ErrorCodeEnum = "JSON_PROCESSING" - ErrorCodeGenericException ErrorCodeEnum = "GENERIC_EXCEPTION" - ErrorCodeExternalServiceProviderUnavailable ErrorCodeEnum = "EXTERNAL_SERVICE_PROVIDER_UNAVAILABLE" - ErrorCodeExternalServiceProviderTimeout ErrorCodeEnum = "EXTERNAL_SERVICE_PROVIDER_TIMEOUT" - ErrorCodeTooManyRequests ErrorCodeEnum = "TOO_MANY_REQUESTS" - ErrorCodeIdpScimNotSetup ErrorCodeEnum = "IDP_SCIM_NOT_SETUP" - ErrorCodeIncidentNotFound ErrorCodeEnum = "INCIDENT_NOT_FOUND" - ErrorCodeInvalidUserCsi ErrorCodeEnum = "INVALID_USER_CSI" - ErrorCodeDataAlreadyExists ErrorCodeEnum = "DATA_ALREADY_EXISTS" - ErrorCodeAuthUserNotMatching ErrorCodeEnum = "AUTH_USER_NOT_MATCHING" + ErrorCodeContentEmpty ErrorCodeEnum = "CONTENT_EMPTY" + ErrorCodeClientException ErrorCodeEnum = "CLIENT_EXCEPTION" + ErrorCodeInvalidFormat ErrorCodeEnum = "INVALID_FORMAT" + ErrorCodeInvalidJsonInput ErrorCodeEnum = "INVALID_JSON_INPUT" + ErrorCodeSslAuthorization ErrorCodeEnum = "SSL_AUTHORIZATION" + ErrorCodeAuthFailed ErrorCodeEnum = "AUTH_FAILED" + ErrorCodeAuthzFailed ErrorCodeEnum = "AUTHZ_FAILED" + ErrorCodeCsiNotAuthorized ErrorCodeEnum = "CSI_NOT_AUTHORIZED" + ErrorCodeUserPolicyNotAuthorized ErrorCodeEnum = "USER_POLICY_NOT_AUTHORIZED" + ErrorCodeEmailNotVerified ErrorCodeEnum = "EMAIL_NOT_VERIFIED" + ErrorCodeEmailNotFound ErrorCodeEnum = "EMAIL_NOT_FOUND" + ErrorCodeOciEmailNotFound ErrorCodeEnum = "OCI_EMAIL_NOT_FOUND" + ErrorCodeMosEmailNotFound ErrorCodeEnum = "MOS_EMAIL_NOT_FOUND" + ErrorCodeIdcsEmailNotValid ErrorCodeEnum = "IDCS_EMAIL_NOT_VALID" + ErrorCodeInvalidPath ErrorCodeEnum = "INVALID_PATH" + ErrorCodeMethodNotAllowed ErrorCodeEnum = "METHOD_NOT_ALLOWED" + ErrorCodeJsonProcessing ErrorCodeEnum = "JSON_PROCESSING" + ErrorCodeGenericException ErrorCodeEnum = "GENERIC_EXCEPTION" + ErrorCodeExternalServiceProviderUnavailable ErrorCodeEnum = "EXTERNAL_SERVICE_PROVIDER_UNAVAILABLE" + ErrorCodeExternalServiceProviderTimeout ErrorCodeEnum = "EXTERNAL_SERVICE_PROVIDER_TIMEOUT" + ErrorCodeTooManyRequests ErrorCodeEnum = "TOO_MANY_REQUESTS" + ErrorCodeIdpScimNotSetup ErrorCodeEnum = "IDP_SCIM_NOT_SETUP" + ErrorCodeIncidentNotFound ErrorCodeEnum = "INCIDENT_NOT_FOUND" + ErrorCodeInvalidUserCsi ErrorCodeEnum = "INVALID_USER_CSI" + ErrorCodeDataAlreadyExists ErrorCodeEnum = "DATA_ALREADY_EXISTS" + ErrorCodeAuthUserNotMatching ErrorCodeEnum = "AUTH_USER_NOT_MATCHING" + ErrorCodeContactNotApproved ErrorCodeEnum = "CONTACT_NOT_APPROVED" + ErrorCodeCreateProfileMosFailure ErrorCodeEnum = "CREATE_PROFILE_MOS_FAILURE" + ErrorCodeCreateProfileCreateOssoFailure ErrorCodeEnum = "CREATE_PROFILE_CREATE_OSSO_FAILURE" + ErrorCodeCreateProfileIdentityFailure ErrorCodeEnum = "CREATE_PROFILE_IDENTITY_FAILURE" + ErrorCodeCreateProfileVerifyOssoFailure ErrorCodeEnum = "CREATE_PROFILE_VERIFY_OSSO_FAILURE" + ErrorCodeProfileAccountNotVerified ErrorCodeEnum = "PROFILE_ACCOUNT_NOT_VERIFIED" + ErrorCodeSupportAccountNotFound ErrorCodeEnum = "SUPPORT_ACCOUNT_NOT_FOUND" + ErrorCodeSupportAccountPendingCsiApproval ErrorCodeEnum = "SUPPORT_ACCOUNT_PENDING_CSI_APPROVAL" + ErrorCodeFreeTierCustomerSliUnsupported ErrorCodeEnum = "FREE_TIER_CUSTOMER_SLI_UNSUPPORTED" + ErrorCodeProfileAccountVerified ErrorCodeEnum = "PROFILE_ACCOUNT_VERIFIED" + ErrorCodeProfileVerifiedCsiRequestPending ErrorCodeEnum = "PROFILE_VERIFIED_CSI_REQUEST_PENDING" + ErrorCodeProfileVerifiedCsiRequestNotFound ErrorCodeEnum = "PROFILE_VERIFIED_CSI_REQUEST_NOT_FOUND" + ErrorCodeCreateProfileOrganizationNameInvalid ErrorCodeEnum = "CREATE_PROFILE_ORGANIZATION_NAME_INVALID" + ErrorCodeCreateProfileEmailInvalid ErrorCodeEnum = "CREATE_PROFILE_EMAIL_INVALID" ) var mappingErrorCodeEnum = map[string]ErrorCodeEnum{ - "CONTENT_EMPTY": ErrorCodeContentEmpty, - "CLIENT_EXCEPTION": ErrorCodeClientException, - "INVALID_FORMAT": ErrorCodeInvalidFormat, - "INVALID_JSON_INPUT": ErrorCodeInvalidJsonInput, - "SSL_AUTHORIZATION": ErrorCodeSslAuthorization, - "AUTH_FAILED": ErrorCodeAuthFailed, - "CSI_NOT_AUTHORIZED": ErrorCodeCsiNotAuthorized, - "USER_POLICY_NOT_AUTHORIZED": ErrorCodeUserPolicyNotAuthorized, - "EMAIL_NOT_VERIFIED": ErrorCodeEmailNotVerified, - "EMAIL_NOT_FOUND": ErrorCodeEmailNotFound, - "IDCS_EMAIL_NOT_VALID": ErrorCodeIdcsEmailNotValid, - "INVALID_PATH": ErrorCodeInvalidPath, - "METHOD_NOT_ALLOWED": ErrorCodeMethodNotAllowed, - "JSON_PROCESSING": ErrorCodeJsonProcessing, - "GENERIC_EXCEPTION": ErrorCodeGenericException, - "EXTERNAL_SERVICE_PROVIDER_UNAVAILABLE": ErrorCodeExternalServiceProviderUnavailable, - "EXTERNAL_SERVICE_PROVIDER_TIMEOUT": ErrorCodeExternalServiceProviderTimeout, - "TOO_MANY_REQUESTS": ErrorCodeTooManyRequests, - "IDP_SCIM_NOT_SETUP": ErrorCodeIdpScimNotSetup, - "INCIDENT_NOT_FOUND": ErrorCodeIncidentNotFound, - "INVALID_USER_CSI": ErrorCodeInvalidUserCsi, - "DATA_ALREADY_EXISTS": ErrorCodeDataAlreadyExists, - "AUTH_USER_NOT_MATCHING": ErrorCodeAuthUserNotMatching, + "CONTENT_EMPTY": ErrorCodeContentEmpty, + "CLIENT_EXCEPTION": ErrorCodeClientException, + "INVALID_FORMAT": ErrorCodeInvalidFormat, + "INVALID_JSON_INPUT": ErrorCodeInvalidJsonInput, + "SSL_AUTHORIZATION": ErrorCodeSslAuthorization, + "AUTH_FAILED": ErrorCodeAuthFailed, + "AUTHZ_FAILED": ErrorCodeAuthzFailed, + "CSI_NOT_AUTHORIZED": ErrorCodeCsiNotAuthorized, + "USER_POLICY_NOT_AUTHORIZED": ErrorCodeUserPolicyNotAuthorized, + "EMAIL_NOT_VERIFIED": ErrorCodeEmailNotVerified, + "EMAIL_NOT_FOUND": ErrorCodeEmailNotFound, + "OCI_EMAIL_NOT_FOUND": ErrorCodeOciEmailNotFound, + "MOS_EMAIL_NOT_FOUND": ErrorCodeMosEmailNotFound, + "IDCS_EMAIL_NOT_VALID": ErrorCodeIdcsEmailNotValid, + "INVALID_PATH": ErrorCodeInvalidPath, + "METHOD_NOT_ALLOWED": ErrorCodeMethodNotAllowed, + "JSON_PROCESSING": ErrorCodeJsonProcessing, + "GENERIC_EXCEPTION": ErrorCodeGenericException, + "EXTERNAL_SERVICE_PROVIDER_UNAVAILABLE": ErrorCodeExternalServiceProviderUnavailable, + "EXTERNAL_SERVICE_PROVIDER_TIMEOUT": ErrorCodeExternalServiceProviderTimeout, + "TOO_MANY_REQUESTS": ErrorCodeTooManyRequests, + "IDP_SCIM_NOT_SETUP": ErrorCodeIdpScimNotSetup, + "INCIDENT_NOT_FOUND": ErrorCodeIncidentNotFound, + "INVALID_USER_CSI": ErrorCodeInvalidUserCsi, + "DATA_ALREADY_EXISTS": ErrorCodeDataAlreadyExists, + "AUTH_USER_NOT_MATCHING": ErrorCodeAuthUserNotMatching, + "CONTACT_NOT_APPROVED": ErrorCodeContactNotApproved, + "CREATE_PROFILE_MOS_FAILURE": ErrorCodeCreateProfileMosFailure, + "CREATE_PROFILE_CREATE_OSSO_FAILURE": ErrorCodeCreateProfileCreateOssoFailure, + "CREATE_PROFILE_IDENTITY_FAILURE": ErrorCodeCreateProfileIdentityFailure, + "CREATE_PROFILE_VERIFY_OSSO_FAILURE": ErrorCodeCreateProfileVerifyOssoFailure, + "PROFILE_ACCOUNT_NOT_VERIFIED": ErrorCodeProfileAccountNotVerified, + "SUPPORT_ACCOUNT_NOT_FOUND": ErrorCodeSupportAccountNotFound, + "SUPPORT_ACCOUNT_PENDING_CSI_APPROVAL": ErrorCodeSupportAccountPendingCsiApproval, + "FREE_TIER_CUSTOMER_SLI_UNSUPPORTED": ErrorCodeFreeTierCustomerSliUnsupported, + "PROFILE_ACCOUNT_VERIFIED": ErrorCodeProfileAccountVerified, + "PROFILE_VERIFIED_CSI_REQUEST_PENDING": ErrorCodeProfileVerifiedCsiRequestPending, + "PROFILE_VERIFIED_CSI_REQUEST_NOT_FOUND": ErrorCodeProfileVerifiedCsiRequestNotFound, + "CREATE_PROFILE_ORGANIZATION_NAME_INVALID": ErrorCodeCreateProfileOrganizationNameInvalid, + "CREATE_PROFILE_EMAIL_INVALID": ErrorCodeCreateProfileEmailInvalid, } var mappingErrorCodeEnumLowerCase = map[string]ErrorCodeEnum{ - "content_empty": ErrorCodeContentEmpty, - "client_exception": ErrorCodeClientException, - "invalid_format": ErrorCodeInvalidFormat, - "invalid_json_input": ErrorCodeInvalidJsonInput, - "ssl_authorization": ErrorCodeSslAuthorization, - "auth_failed": ErrorCodeAuthFailed, - "csi_not_authorized": ErrorCodeCsiNotAuthorized, - "user_policy_not_authorized": ErrorCodeUserPolicyNotAuthorized, - "email_not_verified": ErrorCodeEmailNotVerified, - "email_not_found": ErrorCodeEmailNotFound, - "idcs_email_not_valid": ErrorCodeIdcsEmailNotValid, - "invalid_path": ErrorCodeInvalidPath, - "method_not_allowed": ErrorCodeMethodNotAllowed, - "json_processing": ErrorCodeJsonProcessing, - "generic_exception": ErrorCodeGenericException, - "external_service_provider_unavailable": ErrorCodeExternalServiceProviderUnavailable, - "external_service_provider_timeout": ErrorCodeExternalServiceProviderTimeout, - "too_many_requests": ErrorCodeTooManyRequests, - "idp_scim_not_setup": ErrorCodeIdpScimNotSetup, - "incident_not_found": ErrorCodeIncidentNotFound, - "invalid_user_csi": ErrorCodeInvalidUserCsi, - "data_already_exists": ErrorCodeDataAlreadyExists, - "auth_user_not_matching": ErrorCodeAuthUserNotMatching, + "content_empty": ErrorCodeContentEmpty, + "client_exception": ErrorCodeClientException, + "invalid_format": ErrorCodeInvalidFormat, + "invalid_json_input": ErrorCodeInvalidJsonInput, + "ssl_authorization": ErrorCodeSslAuthorization, + "auth_failed": ErrorCodeAuthFailed, + "authz_failed": ErrorCodeAuthzFailed, + "csi_not_authorized": ErrorCodeCsiNotAuthorized, + "user_policy_not_authorized": ErrorCodeUserPolicyNotAuthorized, + "email_not_verified": ErrorCodeEmailNotVerified, + "email_not_found": ErrorCodeEmailNotFound, + "oci_email_not_found": ErrorCodeOciEmailNotFound, + "mos_email_not_found": ErrorCodeMosEmailNotFound, + "idcs_email_not_valid": ErrorCodeIdcsEmailNotValid, + "invalid_path": ErrorCodeInvalidPath, + "method_not_allowed": ErrorCodeMethodNotAllowed, + "json_processing": ErrorCodeJsonProcessing, + "generic_exception": ErrorCodeGenericException, + "external_service_provider_unavailable": ErrorCodeExternalServiceProviderUnavailable, + "external_service_provider_timeout": ErrorCodeExternalServiceProviderTimeout, + "too_many_requests": ErrorCodeTooManyRequests, + "idp_scim_not_setup": ErrorCodeIdpScimNotSetup, + "incident_not_found": ErrorCodeIncidentNotFound, + "invalid_user_csi": ErrorCodeInvalidUserCsi, + "data_already_exists": ErrorCodeDataAlreadyExists, + "auth_user_not_matching": ErrorCodeAuthUserNotMatching, + "contact_not_approved": ErrorCodeContactNotApproved, + "create_profile_mos_failure": ErrorCodeCreateProfileMosFailure, + "create_profile_create_osso_failure": ErrorCodeCreateProfileCreateOssoFailure, + "create_profile_identity_failure": ErrorCodeCreateProfileIdentityFailure, + "create_profile_verify_osso_failure": ErrorCodeCreateProfileVerifyOssoFailure, + "profile_account_not_verified": ErrorCodeProfileAccountNotVerified, + "support_account_not_found": ErrorCodeSupportAccountNotFound, + "support_account_pending_csi_approval": ErrorCodeSupportAccountPendingCsiApproval, + "free_tier_customer_sli_unsupported": ErrorCodeFreeTierCustomerSliUnsupported, + "profile_account_verified": ErrorCodeProfileAccountVerified, + "profile_verified_csi_request_pending": ErrorCodeProfileVerifiedCsiRequestPending, + "profile_verified_csi_request_not_found": ErrorCodeProfileVerifiedCsiRequestNotFound, + "create_profile_organization_name_invalid": ErrorCodeCreateProfileOrganizationNameInvalid, + "create_profile_email_invalid": ErrorCodeCreateProfileEmailInvalid, } // GetErrorCodeEnumValues Enumerates the set of values for ErrorCodeEnum @@ -113,10 +168,13 @@ func GetErrorCodeEnumStringValues() []string { "INVALID_JSON_INPUT", "SSL_AUTHORIZATION", "AUTH_FAILED", + "AUTHZ_FAILED", "CSI_NOT_AUTHORIZED", "USER_POLICY_NOT_AUTHORIZED", "EMAIL_NOT_VERIFIED", "EMAIL_NOT_FOUND", + "OCI_EMAIL_NOT_FOUND", + "MOS_EMAIL_NOT_FOUND", "IDCS_EMAIL_NOT_VALID", "INVALID_PATH", "METHOD_NOT_ALLOWED", @@ -130,6 +188,20 @@ func GetErrorCodeEnumStringValues() []string { "INVALID_USER_CSI", "DATA_ALREADY_EXISTS", "AUTH_USER_NOT_MATCHING", + "CONTACT_NOT_APPROVED", + "CREATE_PROFILE_MOS_FAILURE", + "CREATE_PROFILE_CREATE_OSSO_FAILURE", + "CREATE_PROFILE_IDENTITY_FAILURE", + "CREATE_PROFILE_VERIFY_OSSO_FAILURE", + "PROFILE_ACCOUNT_NOT_VERIFIED", + "SUPPORT_ACCOUNT_NOT_FOUND", + "SUPPORT_ACCOUNT_PENDING_CSI_APPROVAL", + "FREE_TIER_CUSTOMER_SLI_UNSUPPORTED", + "PROFILE_ACCOUNT_VERIFIED", + "PROFILE_VERIFIED_CSI_REQUEST_PENDING", + "PROFILE_VERIFIED_CSI_REQUEST_NOT_FOUND", + "CREATE_PROFILE_ORGANIZATION_NAME_INVALID", + "CREATE_PROFILE_EMAIL_INVALID", } } diff --git a/cims/create_user_request_response.go b/cims/get_csi_number_request_response.go similarity index 57% rename from cims/create_user_request_response.go rename to cims/get_csi_number_request_response.go index fe4bf51b5f..6d0748fede 100644 --- a/cims/create_user_request_response.go +++ b/cims/get_csi_number_request_response.go @@ -11,36 +11,51 @@ import ( "strings" ) -// CreateUserRequest wrapper for the CreateUser operation +// GetCsiNumberRequest wrapper for the GetCsiNumber operation // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cims/CreateUser.go.html to see an example of how to use CreateUserRequest. -type CreateUserRequest struct { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cims/GetCsiNumber.go.html to see an example of how to use GetCsiNumberRequest. +type GetCsiNumberRequest struct { - // User information - CreateUserDetails `contributesTo:"body"` + // Tenancy Ocid in oracle cloud Infrastructure + TenantId *string `mandatory:"true" contributesTo:"query" name:"tenantId"` - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` + // Home region of the customer which is part of oracle cloud infrastructure regions + Region *string `mandatory:"true" contributesTo:"query" name:"region"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` + // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` + // Token type that determine which cloud provider the request come from. + Bearertokentype *string `mandatory:"false" contributesTo:"header" name:"bearertokentype"` + + // Token that provided by multi cloud provider, which help to validate the email. + Bearertoken *string `mandatory:"false" contributesTo:"header" name:"bearertoken"` + + // IdToken that provided by multi cloud provider, which help to validate the email. + Idtoken *string `mandatory:"false" contributesTo:"header" name:"idtoken"` + + // The OCID of identity domain. + Domainid *string `mandatory:"false" contributesTo:"header" name:"domainid"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata } -func (request CreateUserRequest) String() string { +func (request GetCsiNumberRequest) String() string { return common.PointerString(request) } // HTTPRequest implements the OCIRequest interface -func (request CreateUserRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { +func (request GetCsiNumberRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { _, err := request.ValidateEnumValue() if err != nil { @@ -50,21 +65,21 @@ func (request CreateUserRequest) HTTPRequest(method, path string, binaryRequestB } // BinaryRequestBody implements the OCIRequest interface -func (request CreateUserRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { +func (request GetCsiNumberRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { return nil, false } // RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request CreateUserRequest) RetryPolicy() *common.RetryPolicy { +func (request GetCsiNumberRequest) 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 CreateUserRequest) ValidateEnumValue() (bool, error) { +func (request GetCsiNumberRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -72,24 +87,24 @@ func (request CreateUserRequest) ValidateEnumValue() (bool, error) { return false, nil } -// CreateUserResponse wrapper for the CreateUser operation -type CreateUserResponse struct { +// GetCsiNumberResponse wrapper for the GetCsiNumber operation +type GetCsiNumberResponse struct { // The underlying http response RawResponse *http.Response - // The User instance - User `presentIn:"body"` + // The string instance + Value *string `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } -func (response CreateUserResponse) String() string { +func (response GetCsiNumberResponse) String() string { return common.PointerString(response) } // HTTPResponse implements the OCIResponse interface -func (response CreateUserResponse) HTTPResponse() *http.Response { +func (response GetCsiNumberResponse) HTTPResponse() *http.Response { return response.RawResponse } diff --git a/cims/get_incident_request_response.go b/cims/get_incident_request_response.go index 8b07af140f..34149f28a2 100644 --- a/cims/get_incident_request_response.go +++ b/cims/get_incident_request_response.go @@ -21,20 +21,35 @@ type GetIncidentRequest struct { // Unique identifier for the support ticket. IncidentKey *string `mandatory:"true" contributesTo:"path" name:"incidentKey"` - // The Customer Support Identifier associated with the support account. - Csi *string `mandatory:"true" contributesTo:"header" name:"csi"` - - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // The Customer Support Identifier (CSI) associated with the support account. + Csi *string `mandatory:"false" contributesTo:"header" name:"csi"` + + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` + // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` + // The OCID of the tenancy. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + // The kind of support request. - ProblemType *string `mandatory:"false" contributesTo:"header" name:"problem-type"` + Problemtype *string `mandatory:"false" contributesTo:"header" name:"problemtype"` + + // Token type that determine which cloud provider the request come from. + Bearertokentype *string `mandatory:"false" contributesTo:"header" name:"bearertokentype"` + + // Token that provided by multi cloud provider, which help to validate the email. + Bearertoken *string `mandatory:"false" contributesTo:"header" name:"bearertoken"` + + // IdToken that provided by multi cloud provider, which help to validate the email. + Idtoken *string `mandatory:"false" contributesTo:"header" name:"idtoken"` + + // The OCID of identity domain. + Domainid *string `mandatory:"false" contributesTo:"header" name:"domainid"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. diff --git a/cims/get_status_request_response.go b/cims/get_status_request_response.go index fea12f7a80..303236c3c9 100644 --- a/cims/get_status_request_response.go +++ b/cims/get_status_request_response.go @@ -18,15 +18,12 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cims/GetStatus.go.html to see an example of how to use GetStatusRequest. type GetStatusRequest struct { - // The system that generated the support ticket, such as My Oracle Support. - Source *string `mandatory:"true" contributesTo:"path" name:"source"` - - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` + // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` diff --git a/cims/incident.go b/cims/incident.go index dcf6394a91..577858074e 100644 --- a/cims/incident.go +++ b/cims/incident.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,7 +19,7 @@ import ( "strings" ) -// Incident Details of about the incident object. +// Incident Details about the support ticket. type Incident struct { // Unique identifier for the support ticket. @@ -32,7 +36,7 @@ type Incident struct { IncidentType *IncidentType `mandatory:"false" json:"incidentType"` - // The kind of support ticket, such as a technical support request. + // The kind of support ticket, such as a technical support request or a limit increase request. ProblemType ProblemTypeEnum `mandatory:"false" json:"problemType,omitempty"` // The incident referrer. This value is often the URL that the customer used when creating the support ticket. diff --git a/cims/incident_resource_type.go b/cims/incident_resource_type.go index c0876cf565..c4f3c04a70 100644 --- a/cims/incident_resource_type.go +++ b/cims/incident_resource_type.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -21,7 +25,7 @@ type IncidentResourceType struct { // The label associated with the resource. Label *string `mandatory:"true" json:"label"` - // Unique identifier of the resource. + // A unique identifier for the resource. ResourceTypeKey *string `mandatory:"false" json:"resourceTypeKey"` // The display name of the resource. @@ -32,6 +36,12 @@ type IncidentResourceType struct { // The service category list. ServiceCategoryList []ServiceCategory `mandatory:"false" json:"serviceCategoryList"` + + // The map of services for MOS Taxonomy. + Service map[string]string `mandatory:"false" json:"service"` + + // The service categories list for MOS Taxonomy. + ServiceCategories []ServiceCategories `mandatory:"false" json:"serviceCategories"` } func (m IncidentResourceType) String() string { diff --git a/cims/incident_summary.go b/cims/incident_summary.go index e87c65c815..8c79a57bf8 100644 --- a/cims/incident_summary.go +++ b/cims/incident_summary.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -21,7 +25,7 @@ type IncidentSummary struct { // Unique identifier of the incident. Key *string `mandatory:"true" json:"key"` - // The kind of support ticket, such as a technical support request. + // The kind of support ticket, such as a technical support request or a limit increase request. ProblemType ProblemTypeEnum `mandatory:"true" json:"problemType"` // The OCID of the tenancy. diff --git a/cims/incident_type.go b/cims/incident_type.go index f2076676ec..9616bd2da3 100644 --- a/cims/incident_type.go +++ b/cims/incident_type.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,7 +19,7 @@ import ( "strings" ) -// IncidentType Details about the incident type object. +// IncidentType Details about the incident type associated with the support ticket. type IncidentType struct { // Unique identifier for the incident type. diff --git a/cims/issue_type.go b/cims/issue_type.go index 5e823e0e04..2be9599922 100644 --- a/cims/issue_type.go +++ b/cims/issue_type.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -23,6 +27,9 @@ type IssueType struct { // The label for the issue type. For example, `Instance Performance`. Label *string `mandatory:"false" json:"label"` + + // The URL for the contextual documentation. + Name *string `mandatory:"false" json:"name"` } func (m IssueType) String() string { diff --git a/cims/item.go b/cims/item.go index 3b3f687e93..39c369a76f 100644 --- a/cims/item.go +++ b/cims/item.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -22,7 +26,7 @@ type Item interface { // Unique identifier for the item. GetItemKey() *string - // The display name of the item. + // The display name of the item. Avoid entering confidential information. GetName() *string GetCategory() *Category @@ -72,6 +76,10 @@ func (m *item) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { var err error switch m.Type { + case "account": + mm := AccountItem{} + err = json.Unmarshal(data, &mm) + return mm, err case "limit": mm := LimitItem{} err = json.Unmarshal(data, &mm) diff --git a/cims/lifecycle_details.go b/cims/lifecycle_details.go index 5db4a6a515..66e17f139e 100644 --- a/cims/lifecycle_details.go +++ b/cims/lifecycle_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/lifecycle_state.go b/cims/lifecycle_state.go index 99ea0c3274..6944f7d774 100644 --- a/cims/lifecycle_state.go +++ b/cims/lifecycle_state.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/limit_item.go b/cims/limit_item.go index 54af6c9477..b1cb45e2eb 100644 --- a/cims/limit_item.go +++ b/cims/limit_item.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,13 +20,13 @@ import ( "strings" ) -// LimitItem Reserved for future use. +// LimitItem Details about the LimitItem object. type LimitItem struct { // Unique identifier for the item. ItemKey *string `mandatory:"true" json:"itemKey"` - // The display name of the item. + // The display name of the item. Avoid entering confidential information. Name *string `mandatory:"false" json:"name"` Category *Category `mandatory:"false" json:"category"` @@ -31,13 +35,13 @@ type LimitItem struct { IssueType *IssueType `mandatory:"false" json:"issueType"` - // The currently available limit of the resource. + // The current service limit for the resource. CurrentLimit *int `mandatory:"false" json:"currentLimit"` - // The current usage of the resource. + // The current resource usage. CurrentUsage *int `mandatory:"false" json:"currentUsage"` - // The requested limit for the resource. + // The new service limit being requested for the resource. RequestedLimit *int `mandatory:"false" json:"requestedLimit"` // The status of the request. diff --git a/cims/list_incident_resource_types_request_response.go b/cims/list_incident_resource_types_request_response.go index adb78910cd..f527204100 100644 --- a/cims/list_incident_resource_types_request_response.go +++ b/cims/list_incident_resource_types_request_response.go @@ -24,12 +24,6 @@ type ListIncidentResourceTypesRequest struct { // The OCID of the tenancy. CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - // The Customer Support Identifier associated with the support account. - Csi *string `mandatory:"true" contributesTo:"header" name:"csi"` - - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` - // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` @@ -45,12 +39,21 @@ type ListIncidentResourceTypesRequest struct { // The order to sort the results in. SortOrder ListIncidentResourceTypesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - // The user-friendly name of the incident type. + // The user-friendly name of the support ticket type. Name *string `mandatory:"false" contributesTo:"query" name:"name"` + // The Customer Support Identifier (CSI) associated with the support account. + Csi *string `mandatory:"false" contributesTo:"header" name:"csi"` + + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` + // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` + // The OCID of identity domain. + Domainid *string `mandatory:"false" contributesTo:"header" name:"domainid"` + // Metadata about the request. 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/cims/list_incidents_request_response.go b/cims/list_incidents_request_response.go index f46618cae8..5bc3db0ce1 100644 --- a/cims/list_incidents_request_response.go +++ b/cims/list_incidents_request_response.go @@ -18,14 +18,11 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cims/ListIncidents.go.html to see an example of how to use ListIncidentsRequest. type ListIncidentsRequest struct { - // The Customer Support Identifier associated with the support account. - Csi *string `mandatory:"true" contributesTo:"header" name:"csi"` - // The OCID of the tenancy. CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` + // The Customer Support Identifier (CSI) associated with the support account. + Csi *string `mandatory:"false" contributesTo:"header" name:"csi"` // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` @@ -45,12 +42,27 @@ type ListIncidentsRequest struct { // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` + // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` // The kind of support request. ProblemType *string `mandatory:"false" contributesTo:"query" name:"problemType"` + // Token type that determine which cloud provider the request come from. + Bearertokentype *string `mandatory:"false" contributesTo:"header" name:"bearertokentype"` + + // Token that provided by multi cloud provider, which help to validate the email. + Bearertoken *string `mandatory:"false" contributesTo:"header" name:"bearertoken"` + + // IdToken that provided by multi cloud provider, which help to validate the email. + Idtoken *string `mandatory:"false" contributesTo:"header" name:"idtoken"` + + // The OCID of identity domain. + Domainid *string `mandatory:"false" contributesTo:"header" name:"domainid"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -116,6 +128,12 @@ type ListIncidentsResponse struct { // For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For list pagination. When this header appears in the response, previous pages of results can be queried. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` + + // Returns the age of the incidents in the response in epoch milliseconds. This is used because the incidents might be cached. + AsOfTime *string `presentIn:"header" name:"as-of-time"` } func (response ListIncidentsResponse) String() string { diff --git a/cims/problem_type.go b/cims/problem_type.go index 29f11863b8..ede3b13144 100644 --- a/cims/problem_type.go +++ b/cims/problem_type.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -22,6 +26,7 @@ const ( ProblemTypeLegacyLimit ProblemTypeEnum = "LEGACY_LIMIT" ProblemTypeTech ProblemTypeEnum = "TECH" ProblemTypeAccount ProblemTypeEnum = "ACCOUNT" + ProblemTypeTaxonomy ProblemTypeEnum = "TAXONOMY" ) var mappingProblemTypeEnum = map[string]ProblemTypeEnum{ @@ -29,6 +34,7 @@ var mappingProblemTypeEnum = map[string]ProblemTypeEnum{ "LEGACY_LIMIT": ProblemTypeLegacyLimit, "TECH": ProblemTypeTech, "ACCOUNT": ProblemTypeAccount, + "TAXONOMY": ProblemTypeTaxonomy, } var mappingProblemTypeEnumLowerCase = map[string]ProblemTypeEnum{ @@ -36,6 +42,7 @@ var mappingProblemTypeEnumLowerCase = map[string]ProblemTypeEnum{ "legacy_limit": ProblemTypeLegacyLimit, "tech": ProblemTypeTech, "account": ProblemTypeAccount, + "taxonomy": ProblemTypeTaxonomy, } // GetProblemTypeEnumValues Enumerates the set of values for ProblemTypeEnum @@ -54,6 +61,7 @@ func GetProblemTypeEnumStringValues() []string { "LEGACY_LIMIT", "TECH", "ACCOUNT", + "TAXONOMY", } } diff --git a/cims/region.go b/cims/region.go deleted file mode 100644 index b4c43082ba..0000000000 --- a/cims/region.go +++ /dev/null @@ -1,140 +0,0 @@ -// 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. - -// Support Management API -// -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. -// - -package cims - -import ( - "strings" -) - -// RegionEnum Enum with underlying type: string -type RegionEnum string - -// Set of constants representing the allowable values for RegionEnum -const ( - RegionDev RegionEnum = "DEV" - RegionSea RegionEnum = "SEA" - RegionIntegNext RegionEnum = "INTEG_NEXT" - RegionIntegStable RegionEnum = "INTEG_STABLE" - RegionPhx RegionEnum = "PHX" - RegionIad RegionEnum = "IAD" - RegionFra RegionEnum = "FRA" - RegionEuFrankfurt1 RegionEnum = "EU_FRANKFURT_1" - RegionLhr RegionEnum = "LHR" - RegionYyz RegionEnum = "YYZ" - RegionNrt RegionEnum = "NRT" - RegionIcn RegionEnum = "ICN" - RegionBom RegionEnum = "BOM" - RegionGru RegionEnum = "GRU" - RegionSyd RegionEnum = "SYD" - RegionZrh RegionEnum = "ZRH" - RegionJed RegionEnum = "JED" - RegionAms RegionEnum = "AMS" - RegionKix RegionEnum = "KIX" - RegionMel RegionEnum = "MEL" - RegionYul RegionEnum = "YUL" - RegionHyd RegionEnum = "HYD" - RegionYny RegionEnum = "YNY" -) - -var mappingRegionEnum = map[string]RegionEnum{ - "DEV": RegionDev, - "SEA": RegionSea, - "INTEG_NEXT": RegionIntegNext, - "INTEG_STABLE": RegionIntegStable, - "PHX": RegionPhx, - "IAD": RegionIad, - "FRA": RegionFra, - "EU_FRANKFURT_1": RegionEuFrankfurt1, - "LHR": RegionLhr, - "YYZ": RegionYyz, - "NRT": RegionNrt, - "ICN": RegionIcn, - "BOM": RegionBom, - "GRU": RegionGru, - "SYD": RegionSyd, - "ZRH": RegionZrh, - "JED": RegionJed, - "AMS": RegionAms, - "KIX": RegionKix, - "MEL": RegionMel, - "YUL": RegionYul, - "HYD": RegionHyd, - "YNY": RegionYny, -} - -var mappingRegionEnumLowerCase = map[string]RegionEnum{ - "dev": RegionDev, - "sea": RegionSea, - "integ_next": RegionIntegNext, - "integ_stable": RegionIntegStable, - "phx": RegionPhx, - "iad": RegionIad, - "fra": RegionFra, - "eu_frankfurt_1": RegionEuFrankfurt1, - "lhr": RegionLhr, - "yyz": RegionYyz, - "nrt": RegionNrt, - "icn": RegionIcn, - "bom": RegionBom, - "gru": RegionGru, - "syd": RegionSyd, - "zrh": RegionZrh, - "jed": RegionJed, - "ams": RegionAms, - "kix": RegionKix, - "mel": RegionMel, - "yul": RegionYul, - "hyd": RegionHyd, - "yny": RegionYny, -} - -// GetRegionEnumValues Enumerates the set of values for RegionEnum -func GetRegionEnumValues() []RegionEnum { - values := make([]RegionEnum, 0) - for _, v := range mappingRegionEnum { - values = append(values, v) - } - return values -} - -// GetRegionEnumStringValues Enumerates the set of values in String for RegionEnum -func GetRegionEnumStringValues() []string { - return []string{ - "DEV", - "SEA", - "INTEG_NEXT", - "INTEG_STABLE", - "PHX", - "IAD", - "FRA", - "EU_FRANKFURT_1", - "LHR", - "YYZ", - "NRT", - "ICN", - "BOM", - "GRU", - "SYD", - "ZRH", - "JED", - "AMS", - "KIX", - "MEL", - "YUL", - "HYD", - "YNY", - } -} - -// GetMappingRegionEnum performs case Insensitive comparison on enum value and return the desired enum -func GetMappingRegionEnum(val string) (RegionEnum, bool) { - enum, ok := mappingRegionEnumLowerCase[strings.ToLower(val)] - return enum, ok -} diff --git a/cims/resource.go b/cims/resource.go index e8bed42c75..db2285b386 100644 --- a/cims/resource.go +++ b/cims/resource.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -21,10 +25,7 @@ type Resource struct { Item Item `mandatory:"false" json:"item"` // The list of available Oracle Cloud Infrastructure regions. - Region RegionEnum `mandatory:"false" json:"region,omitempty"` - - // The list of available Oracle Cloud Infrastructure availability domains. - AvailabilityDomain AvailabilityDomainEnum `mandatory:"false" json:"availabilityDomain,omitempty"` + Region *string `mandatory:"false" json:"region"` } func (m Resource) String() string { @@ -37,12 +38,6 @@ func (m Resource) String() string { func (m Resource) ValidateEnumValue() (bool, error) { errMessage := []string{} - if _, ok := GetMappingRegionEnum(string(m.Region)); !ok && m.Region != "" { - errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Region: %s. Supported values are: %s.", m.Region, strings.Join(GetRegionEnumStringValues(), ","))) - } - if _, ok := GetMappingAvailabilityDomainEnum(string(m.AvailabilityDomain)); !ok && m.AvailabilityDomain != "" { - errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AvailabilityDomain: %s. Supported values are: %s.", m.AvailabilityDomain, strings.Join(GetAvailabilityDomainEnumStringValues(), ","))) - } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -52,9 +47,8 @@ func (m Resource) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *Resource) UnmarshalJSON(data []byte) (e error) { model := struct { - Item item `json:"item"` - Region RegionEnum `json:"region"` - AvailabilityDomain AvailabilityDomainEnum `json:"availabilityDomain"` + Item item `json:"item"` + Region *string `json:"region"` }{} e = json.Unmarshal(data, &model) @@ -74,7 +68,5 @@ func (m *Resource) UnmarshalJSON(data []byte) (e error) { m.Region = model.Region - m.AvailabilityDomain = model.AvailabilityDomain - return } diff --git a/cims/scope.go b/cims/scope.go index 191a3abb89..e89ba360e6 100644 --- a/cims/scope.go +++ b/cims/scope.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/service_categories.go b/cims/service_categories.go new file mode 100644 index 0000000000..ee3d813944 --- /dev/null +++ b/cims/service_categories.go @@ -0,0 +1,49 @@ +// 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. + +// Support Management API +// +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// + +package cims + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ServiceCategories List of Service Categories of a Service for MOS Taxonomy. +type ServiceCategories struct { + + // Service Category list. + ServiceCategory map[string]string `mandatory:"false" json:"serviceCategory"` + + // Schema of a Service Category. + Schema *string `mandatory:"false" json:"schema"` + + // Issue type list. + IssueType map[string]string `mandatory:"false" json:"issueType"` +} + +func (m ServiceCategories) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ServiceCategories) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/cims/service_category.go b/cims/service_category.go index 67bcce65e1..c6834cad22 100644 --- a/cims/service_category.go +++ b/cims/service_category.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,7 +19,7 @@ import ( "strings" ) -// ServiceCategory Information about the incident classifier. +// ServiceCategory Information about the support ticket classifier. type ServiceCategory struct { // The unique ID that identifies a classifier. diff --git a/cims/sort_by.go b/cims/sort_by.go index 0c86131f2c..57455b7118 100644 --- a/cims/sort_by.go +++ b/cims/sort_by.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/sort_order.go b/cims/sort_order.go index d4d36e391a..81a50c0503 100644 --- a/cims/sort_order.go +++ b/cims/sort_order.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/status.go b/cims/status.go index 486c40076b..7a473a5961 100644 --- a/cims/status.go +++ b/cims/status.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/sub_category.go b/cims/sub_category.go index 0c0cf4e126..11182615c5 100644 --- a/cims/sub_category.go +++ b/cims/sub_category.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,13 +19,13 @@ import ( "strings" ) -// SubCategory Details about the subcategory associated with the support ticket. +// SubCategory Details about the service subcategory associated with the support ticket. type SubCategory struct { - // Unique identifier for the subcategory. + // Unique identifier for the service subcategory. SubCategoryKey *string `mandatory:"false" json:"subCategoryKey"` - // The name of the subcategory. For example, `Backup Count` or `Custom Image Count`. + // The name of the service subcategory. For example, `Backup Count` or `Custom Image Count`. Name *string `mandatory:"false" json:"name"` } diff --git a/cims/tech_support_item.go b/cims/tech_support_item.go index 0e77ae6a7b..d5cc3b7e2f 100644 --- a/cims/tech_support_item.go +++ b/cims/tech_support_item.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -22,7 +26,7 @@ type TechSupportItem struct { // Unique identifier for the item. ItemKey *string `mandatory:"true" json:"itemKey"` - // The display name of the item. + // The display name of the item. Avoid entering confidential information. Name *string `mandatory:"false" json:"name"` Category *Category `mandatory:"false" json:"category"` diff --git a/cims/tenancy_information.go b/cims/tenancy_information.go index 5783ceaae7..a3f1ebe4ff 100644 --- a/cims/tenancy_information.go +++ b/cims/tenancy_information.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,10 +19,10 @@ import ( "strings" ) -// TenancyInformation Details about the customer's tenancy. +// TenancyInformation Details about the tenancy. type TenancyInformation struct { - // The Customer Support Identifier number associated with the tenancy. + // The Customer Support Identifier (CSI) number associated with the tenancy. CustomerSupportKey *string `mandatory:"true" json:"customerSupportKey"` // The OCID of the tenancy. diff --git a/cims/ticket.go b/cims/ticket.go index 5c3cb0cf2d..5c810deee3 100644 --- a/cims/ticket.go +++ b/cims/ticket.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -79,18 +83,21 @@ const ( TicketSeverityHighest TicketSeverityEnum = "HIGHEST" TicketSeverityHigh TicketSeverityEnum = "HIGH" TicketSeverityMedium TicketSeverityEnum = "MEDIUM" + TicketSeverityLow TicketSeverityEnum = "LOW" ) var mappingTicketSeverityEnum = map[string]TicketSeverityEnum{ "HIGHEST": TicketSeverityHighest, "HIGH": TicketSeverityHigh, "MEDIUM": TicketSeverityMedium, + "LOW": TicketSeverityLow, } var mappingTicketSeverityEnumLowerCase = map[string]TicketSeverityEnum{ "highest": TicketSeverityHighest, "high": TicketSeverityHigh, "medium": TicketSeverityMedium, + "low": TicketSeverityLow, } // GetTicketSeverityEnumValues Enumerates the set of values for TicketSeverityEnum @@ -108,6 +115,7 @@ func GetTicketSeverityEnumStringValues() []string { "HIGHEST", "HIGH", "MEDIUM", + "LOW", } } diff --git a/cims/time_zone.go b/cims/time_zone.go index 9b8dd825c4..9b3212b844 100644 --- a/cims/time_zone.go +++ b/cims/time_zone.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/unit.go b/cims/unit.go index 69cef0b81f..b7976bac85 100644 --- a/cims/unit.go +++ b/cims/unit.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/cims/update_activity_item_details.go b/cims/update_activity_item_details.go index d4d178a2d7..ccfed4b292 100644 --- a/cims/update_activity_item_details.go +++ b/cims/update_activity_item_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,8 +20,7 @@ import ( "strings" ) -// UpdateActivityItemDetails Details for udpating the support ticket activity. -// **Caution:** Avoid using any confidential information when you supply string values using the API. +// UpdateActivityItemDetails Details for updating the support ticket activity. type UpdateActivityItemDetails struct { // Comments updated at the time that the activity occurs. @@ -69,6 +72,7 @@ const ( UpdateActivityItemDetailsActivityTypeProblemDescription UpdateActivityItemDetailsActivityTypeEnum = "PROBLEM_DESCRIPTION" UpdateActivityItemDetailsActivityTypeUpdate UpdateActivityItemDetailsActivityTypeEnum = "UPDATE" UpdateActivityItemDetailsActivityTypeClose UpdateActivityItemDetailsActivityTypeEnum = "CLOSE" + UpdateActivityItemDetailsActivityTypeReopen UpdateActivityItemDetailsActivityTypeEnum = "REOPEN" ) var mappingUpdateActivityItemDetailsActivityTypeEnum = map[string]UpdateActivityItemDetailsActivityTypeEnum{ @@ -76,6 +80,7 @@ var mappingUpdateActivityItemDetailsActivityTypeEnum = map[string]UpdateActivity "PROBLEM_DESCRIPTION": UpdateActivityItemDetailsActivityTypeProblemDescription, "UPDATE": UpdateActivityItemDetailsActivityTypeUpdate, "CLOSE": UpdateActivityItemDetailsActivityTypeClose, + "REOPEN": UpdateActivityItemDetailsActivityTypeReopen, } var mappingUpdateActivityItemDetailsActivityTypeEnumLowerCase = map[string]UpdateActivityItemDetailsActivityTypeEnum{ @@ -83,6 +88,7 @@ var mappingUpdateActivityItemDetailsActivityTypeEnumLowerCase = map[string]Updat "problem_description": UpdateActivityItemDetailsActivityTypeProblemDescription, "update": UpdateActivityItemDetailsActivityTypeUpdate, "close": UpdateActivityItemDetailsActivityTypeClose, + "reopen": UpdateActivityItemDetailsActivityTypeReopen, } // GetUpdateActivityItemDetailsActivityTypeEnumValues Enumerates the set of values for UpdateActivityItemDetailsActivityTypeEnum @@ -101,6 +107,7 @@ func GetUpdateActivityItemDetailsActivityTypeEnumStringValues() []string { "PROBLEM_DESCRIPTION", "UPDATE", "CLOSE", + "REOPEN", } } diff --git a/cims/update_incident.go b/cims/update_incident.go index f59a837f21..b5b47b2615 100644 --- a/cims/update_incident.go +++ b/cims/update_incident.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -18,6 +22,9 @@ import ( // UpdateIncident Details about the support ticket being updated. type UpdateIncident struct { Ticket *UpdateTicketDetails `mandatory:"true" json:"ticket"` + + // The kind of support ticket, such as a technical support request or a limit increase request. + ProblemType ProblemTypeEnum `mandatory:"false" json:"problemType,omitempty"` } func (m UpdateIncident) String() string { @@ -30,6 +37,9 @@ func (m UpdateIncident) String() string { func (m UpdateIncident) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingProblemTypeEnum(string(m.ProblemType)); !ok && m.ProblemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProblemType: %s. Supported values are: %s.", m.ProblemType, strings.Join(GetProblemTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/cims/update_incident_request_response.go b/cims/update_incident_request_response.go index 48a21aba1d..3078ce4b37 100644 --- a/cims/update_incident_request_response.go +++ b/cims/update_incident_request_response.go @@ -21,24 +21,39 @@ type UpdateIncidentRequest struct { // Unique identifier for the support ticket. IncidentKey *string `mandatory:"true" contributesTo:"path" name:"incidentKey"` - // The Customer Support Identifier associated with the support account. - Csi *string `mandatory:"true" contributesTo:"header" name:"csi"` - // Details about the support ticket being updated. UpdateIncidentDetails UpdateIncident `contributesTo:"body"` - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` + // The Customer Support Identifier (CSI) associated with the support account. + Csi *string `mandatory:"false" contributesTo:"header" name:"csi"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // The OCID of the tenancy. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + // 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"` + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` + // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` + // Token type that determine which cloud provider the request come from. + Bearertokentype *string `mandatory:"false" contributesTo:"header" name:"bearertokentype"` + + // Token that provided by multi cloud provider, which help to validate the email. + Bearertoken *string `mandatory:"false" contributesTo:"header" name:"bearertoken"` + + // IdToken that provided by multi cloud provider, which help to validate the email. + Idtoken *string `mandatory:"false" contributesTo:"header" name:"idtoken"` + + // The OCID of identity domain. + Domainid *string `mandatory:"false" contributesTo:"header" name:"domainid"` + // Metadata about the request. 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/cims/update_item_details.go b/cims/update_item_details.go index ff5848b173..698b28bc23 100644 --- a/cims/update_item_details.go +++ b/cims/update_item_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,8 +20,7 @@ import ( "strings" ) -// UpdateItemDetails Details for udpating an item. -// **Caution:** Avoid using any confidential information when you supply string values using the API. +// UpdateItemDetails Details for updating an item. type UpdateItemDetails interface { } diff --git a/cims/update_resource_details.go b/cims/update_resource_details.go index 90ee106939..752f4ae189 100644 --- a/cims/update_resource_details.go +++ b/cims/update_resource_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -17,7 +21,6 @@ import ( ) // UpdateResourceDetails Details about updates to the resource. -// **Caution:** Avoid using any confidential information when you supply string values using the API. type UpdateResourceDetails struct { Item UpdateItemDetails `mandatory:"false" json:"item"` } diff --git a/cims/update_ticket_details.go b/cims/update_ticket_details.go index fa60fd11fd..7752fa57ea 100644 --- a/cims/update_ticket_details.go +++ b/cims/update_ticket_details.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -16,7 +20,6 @@ import ( ) // UpdateTicketDetails Details about the ticket updated. -// **Caution:** Avoid using any confidential information when you supply string values using the API. type UpdateTicketDetails struct { // The list of resources. diff --git a/cims/user.go b/cims/user.go index 2745966a90..17fc34a044 100644 --- a/cims/user.go +++ b/cims/user.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims @@ -15,31 +19,31 @@ import ( "strings" ) -// User Details about the user object. +// User Details about the user. type User struct { - // Unique identifier for the user. + // A unique identifier for the user. Key *string `mandatory:"true" json:"key"` - // First name of the user. + // The user's first name. FirstName *string `mandatory:"false" json:"firstName"` - // Last name of the user. + // The user's last name. LastName *string `mandatory:"false" json:"lastName"` - // Country of the user. + // The country of the user. Country *string `mandatory:"false" json:"country"` - // CSI to be associated to the user. + // The CSI associated with the user. Csi *string `mandatory:"false" json:"csi"` - // Contact number of the user. + // The user's contact phone number. Phone *string `mandatory:"false" json:"phone"` - // Timezone of the user. + // The timezone of the user. Timezone *string `mandatory:"false" json:"timezone"` - // Organization of the user. + // The company that the user belongs to. OrganizationName *string `mandatory:"false" json:"organizationName"` // The OCID of the tenancy. @@ -47,6 +51,9 @@ type User struct { // The email of the contact person. ContactEmail *string `mandatory:"false" json:"contactEmail"` + + // The kind of support ticket, such as a technical support request or a limit increase request. + ProblemType ProblemTypeEnum `mandatory:"false" json:"problemType,omitempty"` } func (m User) String() string { @@ -59,6 +66,9 @@ func (m User) String() string { func (m User) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingProblemTypeEnum(string(m.ProblemType)); !ok && m.ProblemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProblemType: %s. Supported values are: %s.", m.ProblemType, strings.Join(GetProblemTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/cims/validate_user_request_response.go b/cims/validate_user_request_response.go index 67f2f0129d..a5bdbf30c3 100644 --- a/cims/validate_user_request_response.go +++ b/cims/validate_user_request_response.go @@ -18,21 +18,33 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cims/ValidateUser.go.html to see an example of how to use ValidateUserRequest. type ValidateUserRequest struct { - // The Customer Support Identifier number for the support account. - Csi *string `mandatory:"true" contributesTo:"header" name:"csi"` - - // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - Ocid *string `mandatory:"true" contributesTo:"header" name:"ocid"` + // The Customer Support Identifier (CSI) associated with the support account. + Csi *string `mandatory:"false" contributesTo:"header" name:"csi"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // The kind of support request. - ProblemType *string `mandatory:"false" contributesTo:"query" name:"problemType"` + ProblemType ValidateUserProblemTypeEnum `mandatory:"false" contributesTo:"query" name:"problemType" omitEmpty:"true"` + + // User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + Ocid *string `mandatory:"false" contributesTo:"header" name:"ocid"` // The region of the tenancy. Homeregion *string `mandatory:"false" contributesTo:"header" name:"homeregion"` + // Token type that determine which cloud provider the request come from. + Bearertokentype *string `mandatory:"false" contributesTo:"header" name:"bearertokentype"` + + // Token that provided by multi cloud provider, which help to validate the email. + Bearertoken *string `mandatory:"false" contributesTo:"header" name:"bearertoken"` + + // IdToken that provided by multi cloud provider, which help to validate the email. + Idtoken *string `mandatory:"false" contributesTo:"header" name:"idtoken"` + + // The OCID of identity domain. + Domainid *string `mandatory:"false" contributesTo:"header" name:"domainid"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -69,6 +81,9 @@ func (request ValidateUserRequest) RetryPolicy() *common.RetryPolicy { // Not recommended for calling this function directly func (request ValidateUserRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingValidateUserProblemTypeEnum(string(request.ProblemType)); !ok && request.ProblemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProblemType: %s. Supported values are: %s.", request.ProblemType, strings.Join(GetValidateUserProblemTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -96,3 +111,57 @@ func (response ValidateUserResponse) String() string { func (response ValidateUserResponse) HTTPResponse() *http.Response { return response.RawResponse } + +// ValidateUserProblemTypeEnum Enum with underlying type: string +type ValidateUserProblemTypeEnum string + +// Set of constants representing the allowable values for ValidateUserProblemTypeEnum +const ( + ValidateUserProblemTypeLimit ValidateUserProblemTypeEnum = "LIMIT" + ValidateUserProblemTypeLegacyLimit ValidateUserProblemTypeEnum = "LEGACY_LIMIT" + ValidateUserProblemTypeTech ValidateUserProblemTypeEnum = "TECH" + ValidateUserProblemTypeAccount ValidateUserProblemTypeEnum = "ACCOUNT" + ValidateUserProblemTypeTaxonomy ValidateUserProblemTypeEnum = "TAXONOMY" +) + +var mappingValidateUserProblemTypeEnum = map[string]ValidateUserProblemTypeEnum{ + "LIMIT": ValidateUserProblemTypeLimit, + "LEGACY_LIMIT": ValidateUserProblemTypeLegacyLimit, + "TECH": ValidateUserProblemTypeTech, + "ACCOUNT": ValidateUserProblemTypeAccount, + "TAXONOMY": ValidateUserProblemTypeTaxonomy, +} + +var mappingValidateUserProblemTypeEnumLowerCase = map[string]ValidateUserProblemTypeEnum{ + "limit": ValidateUserProblemTypeLimit, + "legacy_limit": ValidateUserProblemTypeLegacyLimit, + "tech": ValidateUserProblemTypeTech, + "account": ValidateUserProblemTypeAccount, + "taxonomy": ValidateUserProblemTypeTaxonomy, +} + +// GetValidateUserProblemTypeEnumValues Enumerates the set of values for ValidateUserProblemTypeEnum +func GetValidateUserProblemTypeEnumValues() []ValidateUserProblemTypeEnum { + values := make([]ValidateUserProblemTypeEnum, 0) + for _, v := range mappingValidateUserProblemTypeEnum { + values = append(values, v) + } + return values +} + +// GetValidateUserProblemTypeEnumStringValues Enumerates the set of values in String for ValidateUserProblemTypeEnum +func GetValidateUserProblemTypeEnumStringValues() []string { + return []string{ + "LIMIT", + "LEGACY_LIMIT", + "TECH", + "ACCOUNT", + "TAXONOMY", + } +} + +// GetMappingValidateUserProblemTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingValidateUserProblemTypeEnum(val string) (ValidateUserProblemTypeEnum, bool) { + enum, ok := mappingValidateUserProblemTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/cims/validation_response.go b/cims/validation_response.go index 80918fa549..362efa05a5 100644 --- a/cims/validation_response.go +++ b/cims/validation_response.go @@ -4,7 +4,11 @@ // Support Management API // -// Use the Support Management API to manage support requests. For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). **Note**: Before you can create service requests with this API, you need to have an Oracle Single Sign On (SSO) account, and you need to register your Customer Support Identifier (CSI) with My Oracle Support. +// Use the Support Management API to manage support requests. +// For more information, see Getting Help and Contacting Support (https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). +// **Note**: Before you can create service requests with this API, +// you need to have an Oracle Single Sign On (SSO) account, +// and you need to register your Customer Support Identifier (CSI) with My Oracle Support. // package cims diff --git a/common/client.go b/common/client.go index c474c102aa..be43f8bbc8 100644 --- a/common/client.go +++ b/common/client.go @@ -336,6 +336,18 @@ func DefaultConfigProvider() ConfigurationProvider { return provider } +// CustomProfileSessionTokenConfigProvider returns the session token config provider of the given profile. +// This will look for the configuration in the given config file path. +func CustomProfileSessionTokenConfigProvider(customConfigPath string, profile string) ConfigurationProvider { + if customConfigPath == "" { + customConfigPath = getDefaultConfigFilePath() + } + + sessionTokenConfigurationProvider, _ := ConfigurationProviderForSessionTokenWithProfile(customConfigPath, profile, "") + Debugf("Configuration provided by: %s", sessionTokenConfigurationProvider) + return sessionTokenConfigurationProvider +} + func getDefaultConfigFilePath() string { homeFolder := getHomeFolder() defaultConfigFile := filepath.Join(homeFolder, defaultConfigDirName, defaultConfigFileName) diff --git a/common/configuration.go b/common/configuration.go index 1748ecff01..4662804549 100644 --- a/common/configuration.go +++ b/common/configuration.go @@ -53,7 +53,9 @@ type ConfigurationProvider interface { var fileMutex = sync.Mutex{} var fileCache = make(map[string][]byte) -func readFile(filename string) ([]byte, error) { +// Reads the file contents from cache if present otherwise reads the file. +// If file to be read is frequently updated/refreshed, please use readFile(filename) as readFileFromCache(filename) might return the old contents from the cache. +func readFileFromCache(filename string) ([]byte, error) { fileMutex.Lock() defer fileMutex.Unlock() val, ok := fileCache[filename] @@ -67,6 +69,14 @@ func readFile(filename string) ([]byte, error) { return val, err } +// Reads the file and returns the contents +func readFile(filename string) ([]byte, error) { + fileMutex.Lock() + defer fileMutex.Unlock() + val, err := os.ReadFile(filename) + return val, err +} + // IsConfigurationProviderValid Tests all parts of the configuration provider do not return an error, this method will // not check AuthType(), since authType() is not required to be there. func IsConfigurationProviderValid(conf ConfigurationProvider) (ok bool, err error) { @@ -181,7 +191,7 @@ func (p environmentConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, } expandedPath := expandPath(value) - pemFileContent, err := readFile(expandedPath) + pemFileContent, err := readFileFromCache(expandedPath) if err != nil { Debugln("Can not read PrivateKey location from environment variable: " + environmentVariable) return @@ -417,7 +427,7 @@ func expandPath(filename string) (expandedPath string) { func openConfigFile(configFilePath string) (data []byte, err error) { expandedPath := expandPath(configFilePath) - data, err = readFile(expandedPath) + data, err = readFileFromCache(expandedPath) if err != nil { err = fmt.Errorf("can not read config file: %s due to: %s", configFilePath, err.Error()) } @@ -549,7 +559,7 @@ func (p fileConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err err } expandedPath := expandPath(filePath) - pemFileContent, err := readFile(expandedPath) + pemFileContent, err := readFileFromCache(expandedPath) if err != nil { err = fileConfigurationProviderError{err: fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error())} return @@ -722,6 +732,88 @@ func getRegionFromEnvVar() (string, error) { return "", fmt.Errorf("did not find OCI_REGION env var") } +type sessionTokenConfigurationProvider struct { + fileConfigurationProvider +} + +func (p sessionTokenConfigurationProvider) UserOCID() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read the configuration due to: %s", err.Error())} + return + } + // In case of session token-based authentication, userOCID will not be present + // need to check if session token path is provided in the configuration + if _, stErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, + "securityTokenPath"); stErr == nil { + err = nil + } + return +} + +func (p sessionTokenConfigurationProvider) KeyID() (keyID string, err error) { + _, err = p.TenancyOCID() + if err != nil { + return + } + + _, err = p.KeyFingerprint() + if err != nil { + return + } + + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read SessionTokenFilePath configuration due to: %s", err.Error())} + return + } + + filePath, pathErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, "securityTokenFilePath") + if pathErr == nil { + rawString, err := getTokenContent(filePath) + if err != nil { + return "", fileConfigurationProviderError{err: err} + } + return "ST$" + rawString, nil + } + err = fileConfigurationProviderError{err: fmt.Errorf("can not read SessionTokenFilePath from configuration file due to: %s", pathErr.Error())} + return +} + +// ConfigurationProviderForSessionToken creates a session token configuration provider from a configuration file +// by reading the "DEFAULT" profile +func ConfigurationProviderForSessionToken(configFilePath, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("config file path can not be empty")} + } + + return sessionTokenConfigurationProvider{ + fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: "DEFAULT", + configMux: sync.Mutex{}}}, nil +} + +// ConfigurationProviderForSessionTokenWithProfile creates a session token configuration provider from a configuration file +// by reading the given profile +func ConfigurationProviderForSessionTokenWithProfile(configFilePath, profile, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("config file path can not be empty")} + } + + return sessionTokenConfigurationProvider{ + fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: profile, + configMux: sync.Mutex{}}}, nil +} + +func (p sessionTokenConfigurationProvider) Refreshable() bool { + return true +} + // RefreshableConfigurationProvider the interface to identity if the config provider is refreshable type RefreshableConfigurationProvider interface { Refreshable() bool diff --git a/common/configuration_test.go b/common/configuration_test.go index 3bde22a1ae..5e797552b4 100644 --- a/common/configuration_test.go +++ b/common/configuration_test.go @@ -5,6 +5,7 @@ package common import ( "fmt" + "io/fs" "io/ioutil" "os" "testing" @@ -606,6 +607,128 @@ region=someregion } } +func TestSessionTokenConfigurationProvider_SecurityToken(t *testing.T) { + dataTpl := `[security_token_based_auth] +fingerprint=somefingerprint +key_file=%s +tenancy=sometenancy +region=someregion +security_token_file=%s +` + + keyFile := writeTempFile(testPrivateKeyConf) + tokenFile := writeTempFile(testSecurityToken) + data := fmt.Sprintf(dataTpl, keyFile, tokenFile) + tmpConfFile := writeTempFile(data) + + defer removeFileFn(tmpConfFile) + defer removeFileFn(tokenFile) + defer removeFileFn(keyFile) + + c, e0 := ConfigurationProviderForSessionTokenWithProfile(tmpConfFile, "security_token_based_auth", "") + assert.NoError(t, e0) + _, e1 := c.KeyID() + assert.NoError(t, e1) + +} + +func TestSessionTokenConfigurationProvider_SecurityTokenMissing(t *testing.T) { + dataTpl := `[security_token_based_auth] +fingerprint=somefingerprint +key_file=%s +tenancy=sometenancy +region=someregion +` + + keyFile := writeTempFile(testPrivateKeyConf) + data := fmt.Sprintf(dataTpl, keyFile) + tmpConfFile := writeTempFile(data) + + defer removeFileFn(tmpConfFile) + defer removeFileFn(keyFile) + + c, e0 := ConfigurationProviderForSessionTokenWithProfile(tmpConfFile, "security_token_based_auth", "") + assert.NoError(t, e0) + _, e1 := c.KeyID() + assert.Error(t, e1) + +} + +func TestSessionTokenConfigurationProvider_SecurityTokenFilePathEmpty(t *testing.T) { + dataTpl := `[security_token_based_auth] +fingerprint=somefingerprint +key_file=%s +tenancy=sometenancy +region=someregion +security_token_file="" +` + + keyFile := writeTempFile(testPrivateKeyConf) + data := fmt.Sprintf(dataTpl, keyFile) + tmpConfFile := writeTempFile(data) + + defer removeFileFn(tmpConfFile) + defer removeFileFn(keyFile) + + c, e0 := ConfigurationProviderForSessionTokenWithProfile(tmpConfFile, "security_token_based_auth", "") + assert.NoError(t, e0) + _, e1 := c.KeyID() + assert.Error(t, e1) +} + +func TestSessionTokenConfigurationProvider_SecurityTokenFileMissing(t *testing.T) { + dataTpl := `[security_token_based_auth] +fingerprint=somefingerprint +key_file=%s +tenancy=sometenancy +region=someregion +security_token_file=%s +` + + keyFile := writeTempFile(testPrivateKeyConf) + data := fmt.Sprintf(dataTpl, keyFile, "sample") + tmpConfFile := writeTempFile(data) + + defer removeFileFn(tmpConfFile) + defer removeFileFn(keyFile) + + c, e0 := ConfigurationProviderForSessionTokenWithProfile(tmpConfFile, "security_token_based_auth", "") + assert.NoError(t, e0) + _, e1 := c.KeyID() + assert.Error(t, e1) +} + +func TestSessionTokenConfigurationProvider_SecurityTokenRefresh(t *testing.T) { + dataTpl := `[security_token_based_auth] +fingerprint=somefingerprint +key_file=%s +tenancy=sometenancy +region=someregion +security_token_file=%s +` + + keyFile := writeTempFile(testPrivateKeyConf) + tokenFile := writeTempFile(testSecurityToken) + data := fmt.Sprintf(dataTpl, keyFile, tokenFile) + tmpConfFile := writeTempFile(data) + + defer removeFileFn(tmpConfFile) + defer removeFileFn(tokenFile) + defer removeFileFn(keyFile) + + c, e0 := ConfigurationProviderForSessionTokenWithProfile(tmpConfFile, "security_token_based_auth", "") + assert.NoError(t, e0) + token, e1 := c.KeyID() + assert.NoError(t, e1) + + os.WriteFile(tokenFile, []byte("testSecurityTokenUpdated"), fs.FileMode(os.O_RDWR)) + + updatedToken, e2 := c.KeyID() + assert.NoError(t, e2) + assert.NotEqual(t, token, updatedToken) + +} + func TestComposingConfigurationProvider_MultipleFiles(t *testing.T) { dataTpl0 := `` dataTpl := `[DEFAULT] diff --git a/common/version.go b/common/version.go index 7d5ac555de..ea1c3fc546 100644 --- a/common/version.go +++ b/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "48" + minor = "49" patch = "0" tag = "" ) diff --git a/containerinstances/list_work_request_errors_request_response.go b/containerinstances/list_work_request_errors_request_response.go index fc64c89837..34e53121f2 100644 --- a/containerinstances/list_work_request_errors_request_response.go +++ b/containerinstances/list_work_request_errors_request_response.go @@ -30,6 +30,12 @@ type ListWorkRequestErrorsRequest struct { // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + // The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + SortBy ListWorkRequestErrorsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestErrorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -66,6 +72,12 @@ func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { // 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")) } @@ -98,3 +110,83 @@ func (response ListWorkRequestErrorsResponse) String() string { 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/containerinstances/list_work_request_logs_request_response.go b/containerinstances/list_work_request_logs_request_response.go index 68d3d0b560..704580f01e 100644 --- a/containerinstances/list_work_request_logs_request_response.go +++ b/containerinstances/list_work_request_logs_request_response.go @@ -30,6 +30,12 @@ type ListWorkRequestLogsRequest struct { // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + // The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + SortBy ListWorkRequestLogsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestLogsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -66,6 +72,12 @@ func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { // 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")) } @@ -98,3 +110,83 @@ func (response ListWorkRequestLogsResponse) String() string { 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/containerinstances/list_work_requests_request_response.go b/containerinstances/list_work_requests_request_response.go index 471ad5bcb1..f1a1862f25 100644 --- a/containerinstances/list_work_requests_request_response.go +++ b/containerinstances/list_work_requests_request_response.go @@ -33,6 +33,19 @@ type ListWorkRequestsRequest struct { // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only resources their lifecycleState matches the given OperationStatus. + Status ListWorkRequestsStatusEnum `mandatory:"false" contributesTo:"query" name:"status" 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"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestsSortOrderEnum `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 @@ -69,6 +82,15 @@ func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { // 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 := 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 _, 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 len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -101,3 +123,141 @@ func (response ListWorkRequestsResponse) String() string { 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" + ListWorkRequestsStatusFailed ListWorkRequestsStatusEnum = "FAILED" + ListWorkRequestsStatusSucceeded ListWorkRequestsStatusEnum = "SUCCEEDED" + ListWorkRequestsStatusCanceling ListWorkRequestsStatusEnum = "CANCELING" + ListWorkRequestsStatusCanceled ListWorkRequestsStatusEnum = "CANCELED" +) + +var mappingListWorkRequestsStatusEnum = map[string]ListWorkRequestsStatusEnum{ + "ACCEPTED": ListWorkRequestsStatusAccepted, + "IN_PROGRESS": ListWorkRequestsStatusInProgress, + "FAILED": ListWorkRequestsStatusFailed, + "SUCCEEDED": ListWorkRequestsStatusSucceeded, + "CANCELING": ListWorkRequestsStatusCanceling, + "CANCELED": ListWorkRequestsStatusCanceled, +} + +var mappingListWorkRequestsStatusEnumLowerCase = map[string]ListWorkRequestsStatusEnum{ + "accepted": ListWorkRequestsStatusAccepted, + "in_progress": ListWorkRequestsStatusInProgress, + "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", + "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 +} + +// 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 +} + +// 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 +} diff --git a/datacatalog/asynchronous_export_glossary_details.go b/datacatalog/asynchronous_export_glossary_details.go new file mode 100644 index 0000000000..a3b92a320a --- /dev/null +++ b/datacatalog/asynchronous_export_glossary_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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AsynchronousExportGlossaryDetails Details needed by the glossary export request. +type AsynchronousExportGlossaryDetails struct { + ObjectStorageTarget *ObjectStorageObjectReference `mandatory:"false" json:"objectStorageTarget"` +} + +func (m AsynchronousExportGlossaryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AsynchronousExportGlossaryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/asynchronous_export_glossary_request_response.go b/datacatalog/asynchronous_export_glossary_request_response.go new file mode 100644 index 0000000000..2edcb9fa25 --- /dev/null +++ b/datacatalog/asynchronous_export_glossary_request_response.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. + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AsynchronousExportGlossaryRequest wrapper for the AsynchronousExportGlossary operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datacatalog/AsynchronousExportGlossary.go.html to see an example of how to use AsynchronousExportGlossaryRequest. +type AsynchronousExportGlossaryRequest struct { + + // Unique catalog identifier. + CatalogId *string `mandatory:"true" contributesTo:"path" name:"catalogId"` + + // Unique glossary key. + GlossaryKey *string `mandatory:"true" contributesTo:"path" name:"glossaryKey"` + + // Details needed by the glossary export request. + AsynchronousExportGlossaryDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AsynchronousExportGlossaryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AsynchronousExportGlossaryRequest) 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 AsynchronousExportGlossaryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AsynchronousExportGlossaryRequest) 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 AsynchronousExportGlossaryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AsynchronousExportGlossaryResponse wrapper for the AsynchronousExportGlossary operation +type AsynchronousExportGlossaryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AsynchronousExportGlossaryResult instance + AsynchronousExportGlossaryResult `presentIn:"body"` + + // For optimistic concurrency control. See ETags for Optimistic Concurrency Control (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven). + 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 AsynchronousExportGlossaryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AsynchronousExportGlossaryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datacatalog/asynchronous_export_glossary_result.go b/datacatalog/asynchronous_export_glossary_result.go new file mode 100644 index 0000000000..3c9d938d0c --- /dev/null +++ b/datacatalog/asynchronous_export_glossary_result.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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AsynchronousExportGlossaryResult Details about the job which performs an export. +type AsynchronousExportGlossaryResult struct { + + // Display name of the export job. + JobDefinitionName *string `mandatory:"false" json:"jobDefinitionName"` + + // Unique key of the export job definition. + JobDefinitionKey *string `mandatory:"false" json:"jobDefinitionKey"` + + // Unique key of the export job. + JobKey *string `mandatory:"false" json:"jobKey"` + + // Unique key of the job execution. + JobExecutionKey *string `mandatory:"false" json:"jobExecutionKey"` + + // Unique key of the object being exported. + SourceKey *string `mandatory:"false" json:"sourceKey"` +} + +func (m AsynchronousExportGlossaryResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AsynchronousExportGlossaryResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/asynchronous_export_request_details.go b/datacatalog/asynchronous_export_request_details.go new file mode 100644 index 0000000000..01ba2344db --- /dev/null +++ b/datacatalog/asynchronous_export_request_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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AsynchronousExportRequestDetails Details for an export request. +type AsynchronousExportRequestDetails struct { + ObjectStorageTarget *ObjectStorageObjectReference `mandatory:"false" json:"objectStorageTarget"` +} + +func (m AsynchronousExportRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AsynchronousExportRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/asynchronous_export_result.go b/datacatalog/asynchronous_export_result.go new file mode 100644 index 0000000000..f4f9d8b9da --- /dev/null +++ b/datacatalog/asynchronous_export_result.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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AsynchronousExportResult Details about the job which performs an export. +type AsynchronousExportResult struct { + + // Display name of the export job. + JobDefinitionName *string `mandatory:"false" json:"jobDefinitionName"` + + // Unique key of the export job definition. + JobDefinitionKey *string `mandatory:"false" json:"jobDefinitionKey"` + + // Unique key of the export job. + JobKey *string `mandatory:"false" json:"jobKey"` + + // Unique key of the job execution. + JobExecutionKey *string `mandatory:"false" json:"jobExecutionKey"` + + // Unique key of the object being exported. + SourceKey *string `mandatory:"false" json:"sourceKey"` +} + +func (m AsynchronousExportResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AsynchronousExportResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/attribute.go b/datacatalog/attribute.go index ebfd1a737f..19dfe8eff6 100644 --- a/datacatalog/attribute.go +++ b/datacatalog/attribute.go @@ -39,6 +39,10 @@ type Attribute struct { // State of the attribute. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // The date and time the attribute was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2019-03-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/datacatalog/attribute_summary.go b/datacatalog/attribute_summary.go index 03f2f02e37..208f68173b 100644 --- a/datacatalog/attribute_summary.go +++ b/datacatalog/attribute_summary.go @@ -59,6 +59,10 @@ type AttributeSummary struct { // State of the attribute. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // The date and time the attribute was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2019-03-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/datacatalog/create_job_definition_details.go b/datacatalog/create_job_definition_details.go index 3f27a0f5bb..70dcc49a9a 100644 --- a/datacatalog/create_job_definition_details.go +++ b/datacatalog/create_job_definition_details.go @@ -37,6 +37,9 @@ type CreateJobDefinitionDetails struct { // The key of the data asset for which the job is defined. DataAssetKey *string `mandatory:"false" json:"dataAssetKey"` + // Unique key of the glossary to which this job applies. + GlossaryKey *string `mandatory:"false" json:"glossaryKey"` + // The key of the connection resource to be used for the job. ConnectionKey *string `mandatory:"false" json:"connectionKey"` diff --git a/datacatalog/create_job_details.go b/datacatalog/create_job_details.go index 17d2742ef9..0f8076d5ac 100644 --- a/datacatalog/create_job_details.go +++ b/datacatalog/create_job_details.go @@ -31,6 +31,7 @@ type CreateJobDetails struct { // Interval on which the job will be run. Value is specified as a cron-supported time specification "nickname". // The following subset of those is supported: @monthly, @weekly, @daily, @hourly. + // For metastore sync, an additional option @default is supported, which will schedule jobs at a more granular frequency. ScheduleCronExpression *string `mandatory:"false" json:"scheduleCronExpression"` // Date that the schedule should be operational. An RFC3339 (https://tools.ietf.org/html/rfc3339) formatted datetime string. diff --git a/datacatalog/data_asset.go b/datacatalog/data_asset.go index b0a7306720..172c845c83 100644 --- a/datacatalog/data_asset.go +++ b/datacatalog/data_asset.go @@ -43,6 +43,10 @@ type DataAsset struct { // The current state of the data asset. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // The date and time the data asset was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2019-03-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/datacatalog/data_asset_summary.go b/datacatalog/data_asset_summary.go index 2ddf27c2c8..677f917000 100644 --- a/datacatalog/data_asset_summary.go +++ b/datacatalog/data_asset_summary.go @@ -49,6 +49,10 @@ type DataAssetSummary struct { // State of the data asset. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` } func (m DataAssetSummary) String() string { diff --git a/datacatalog/datacatalog_client.go b/datacatalog/datacatalog_client.go index edb7aba934..111ab6e979 100644 --- a/datacatalog/datacatalog_client.go +++ b/datacatalog/datacatalog_client.go @@ -216,6 +216,68 @@ func (client DataCatalogClient) associateCustomProperty(ctx context.Context, req return response, err } +// AsynchronousExportGlossary Exports the contents of a glossary in Excel format. Returns details about the job which actually performs the export. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datacatalog/AsynchronousExportGlossary.go.html to see an example of how to use AsynchronousExportGlossary API. +func (client DataCatalogClient) AsynchronousExportGlossary(ctx context.Context, request AsynchronousExportGlossaryRequest) (response AsynchronousExportGlossaryResponse, 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.asynchronousExportGlossary, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AsynchronousExportGlossaryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AsynchronousExportGlossaryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AsynchronousExportGlossaryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AsynchronousExportGlossaryResponse") + } + return +} + +// asynchronousExportGlossary implements the OCIOperation interface (enables retrying operations) +func (client DataCatalogClient) asynchronousExportGlossary(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/catalogs/{catalogId}/glossaries/{glossaryKey}/actions/asynchronousExport", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response AsynchronousExportGlossaryResponse + 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/data-catalog/20190325/Glossary/AsynchronousExportGlossary" + err = common.PostProcessServiceError(err, "DataCatalog", "AsynchronousExportGlossary", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // AttachCatalogPrivateEndpoint Attaches a private reverse connection endpoint resource to a data catalog resource. When provided, 'If-Match' is checked against 'ETag' values of the resource. // // See also @@ -3136,6 +3198,64 @@ func (client DataCatalogClient) exportGlossary(ctx context.Context, request comm return response, err } +// FetchEntityLineage Returns lineage for a given entity object. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datacatalog/FetchEntityLineage.go.html to see an example of how to use FetchEntityLineage API. +// A default retry strategy applies to this operation FetchEntityLineage() +func (client DataCatalogClient) FetchEntityLineage(ctx context.Context, request FetchEntityLineageRequest) (response FetchEntityLineageResponse, 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.fetchEntityLineage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = FetchEntityLineageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = FetchEntityLineageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(FetchEntityLineageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into FetchEntityLineageResponse") + } + return +} + +// fetchEntityLineage implements the OCIOperation interface (enables retrying operations) +func (client DataCatalogClient) fetchEntityLineage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/catalogs/{catalogId}/dataAssets/{dataAssetKey}/entities/{entityKey}/actions/fetchLineage", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response FetchEntityLineageResponse + 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/data-catalog/20190325/Entity/FetchEntityLineage" + err = common.PostProcessServiceError(err, "DataCatalog", "FetchEntityLineage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetAttribute Gets a specific entity attribute by key. // // See also diff --git a/datacatalog/entity.go b/datacatalog/entity.go index 0924946bc4..33c3386fe3 100644 --- a/datacatalog/entity.go +++ b/datacatalog/entity.go @@ -50,6 +50,10 @@ type Entity struct { // The current state of the data entity. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Unique external key of this object in the source system. ExternalKey *string `mandatory:"false" json:"externalKey"` diff --git a/datacatalog/entity_lineage.go b/datacatalog/entity_lineage.go new file mode 100644 index 0000000000..24232399af --- /dev/null +++ b/datacatalog/entity_lineage.go @@ -0,0 +1,58 @@ +// 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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EntityLineage Lineage for a data entity. +type EntityLineage struct { + + // Object level at which the lineage is returned. + Level *int `mandatory:"true" json:"level"` + + // Direction of the lineage returned. + Direction LineageDirectionEnum `mandatory:"true" json:"direction"` + + // Set of objects that are involved in the lineage. + Objects []LineageObject `mandatory:"false" json:"objects"` + + // Set of relationships between the objects in the 'objects' set. + Relationships []LineageRelationship `mandatory:"false" json:"relationships"` + + // A map of maps that contains additional information in explanation of the lineage returned. The map keys are + // categories of information and the values are maps of annotation names to their corresponding values. + // Every annotation is contained inside a category. + // Example: `{"annotations": { "category": { "key": "value"}}}` + Annotations map[string]map[string]string `mandatory:"false" json:"annotations"` +} + +func (m EntityLineage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EntityLineage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLineageDirectionEnum(string(m.Direction)); !ok && m.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", m.Direction, strings.Join(GetLineageDirectionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/entity_summary.go b/datacatalog/entity_summary.go index 1bd309ff03..1701e2258e 100644 --- a/datacatalog/entity_summary.go +++ b/datacatalog/entity_summary.go @@ -84,6 +84,10 @@ type EntitySummary struct { // State of the data entity. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // A map of maps that contains the properties which are specific to the entity type. Each entity type // definition defines it's set of required and optional properties. The map keys are category names and the // values are maps of property name to property value. Every property is contained inside of a category. Most diff --git a/datacatalog/faceted_search_date_filter_request.go b/datacatalog/faceted_search_date_filter_request.go index f52299252b..142e0aaf0c 100644 --- a/datacatalog/faceted_search_date_filter_request.go +++ b/datacatalog/faceted_search_date_filter_request.go @@ -19,7 +19,7 @@ import ( // FacetedSearchDateFilterRequest Object with date filter criteria type FacetedSearchDateFilterRequest struct { - // Date field name that needs to be filtered by. + // Date field name that needs to be filtered by. Acceptable fields include TimeCreated and TimeUpdated. FieldName *string `mandatory:"false" json:"fieldName"` // The date and time the request was created, as described in diff --git a/datacatalog/faceted_search_string_filter_request.go b/datacatalog/faceted_search_string_filter_request.go index 0b47a80657..2f1cec82af 100644 --- a/datacatalog/faceted_search_string_filter_request.go +++ b/datacatalog/faceted_search_string_filter_request.go @@ -19,10 +19,13 @@ import ( // FacetedSearchStringFilterRequest Object with string filter criteria type FacetedSearchStringFilterRequest struct { - // String/boolean/numerical field name that needs to filtered with + // String/boolean/numerical field name that needs to be filtered by. + // Acceptable field names: CatalogType, AttributeType, FolderType, DataAssetType, CreatedBy, UpdatedBy, Term, Tag, DataAssetName, LifeCycleState. Field *string `mandatory:"false" json:"field"` // Array of values that the search results needs to be filtered by. + // Acceptable values for field 'CatalogType': DataAsset, Folder, DataEntity, Attribute, Term, Category, Glossary, Pattern, Job, Schedule, CustomProperty. + // For other fields, acceptable values can be derived by inspecting the data object. Values []string `mandatory:"false" json:"values"` } diff --git a/datacatalog/fetch_entity_lineage_details.go b/datacatalog/fetch_entity_lineage_details.go new file mode 100644 index 0000000000..cc96f1234f --- /dev/null +++ b/datacatalog/fetch_entity_lineage_details.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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FetchEntityLineageDetails The information needed to obtain desired lineage. +type FetchEntityLineageDetails struct { + + // Object level at which the lineage is returned. + Level *int `mandatory:"false" json:"level"` + + // Direction of the lineage returned. + Direction LineageDirectionEnum `mandatory:"false" json:"direction,omitempty"` + + // Intra-lineages are drill down lineages. This field indicates whether all intra-lineages need to be + // expanded inline in the lineage returned. + IsIntraLineage *bool `mandatory:"false" json:"isIntraLineage"` + + // Unique object key for which intra-lineage needs to be fetched. Only drill-down lineage corresponding + // to the object whose object key is passed is returned. + IntraLineageObjectKey *string `mandatory:"false" json:"intraLineageObjectKey"` +} + +func (m FetchEntityLineageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FetchEntityLineageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLineageDirectionEnum(string(m.Direction)); !ok && m.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", m.Direction, strings.Join(GetLineageDirectionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/fetch_entity_lineage_request_response.go b/datacatalog/fetch_entity_lineage_request_response.go new file mode 100644 index 0000000000..a0d789d5bc --- /dev/null +++ b/datacatalog/fetch_entity_lineage_request_response.go @@ -0,0 +1,115 @@ +// 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 datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// FetchEntityLineageRequest wrapper for the FetchEntityLineage operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datacatalog/FetchEntityLineage.go.html to see an example of how to use FetchEntityLineageRequest. +type FetchEntityLineageRequest struct { + + // Unique catalog identifier. + CatalogId *string `mandatory:"true" contributesTo:"path" name:"catalogId"` + + // Unique data asset key. + DataAssetKey *string `mandatory:"true" contributesTo:"path" name:"dataAssetKey"` + + // Unique entity key. + EntityKey *string `mandatory:"true" contributesTo:"path" name:"entityKey"` + + // The information needed to obtain desired lineage. + FetchEntityLineageDetails `contributesTo:"body"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // 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 FetchEntityLineageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request FetchEntityLineageRequest) 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 FetchEntityLineageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request FetchEntityLineageRequest) 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 FetchEntityLineageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FetchEntityLineageResponse wrapper for the FetchEntityLineage operation +type FetchEntityLineageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of EntityLineage instances + EntityLineage `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"` + + // Retrieves the next page of results. When this header appears in the response, additional pages of results remain. 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 FetchEntityLineageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response FetchEntityLineageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datacatalog/folder.go b/datacatalog/folder.go index a17fca5d3b..2ed55b4f5a 100644 --- a/datacatalog/folder.go +++ b/datacatalog/folder.go @@ -85,6 +85,10 @@ type Folder struct { // The current state of the folder. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Status of the object as updated by the harvest process. HarvestStatus HarvestStatusEnum `mandatory:"false" json:"harvestStatus,omitempty"` diff --git a/datacatalog/folder_summary.go b/datacatalog/folder_summary.go index c715417341..d94b6b599b 100644 --- a/datacatalog/folder_summary.go +++ b/datacatalog/folder_summary.go @@ -69,6 +69,10 @@ type FolderSummary struct { // State of the folder. LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // A message describing the current state in more detail. An object not in ACTIVE state may have functional limitations, + // see service documentation for details. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` } func (m FolderSummary) String() string { diff --git a/datacatalog/job.go b/datacatalog/job.go index e7a8b8a3a5..20b679e6a0 100644 --- a/datacatalog/job.go +++ b/datacatalog/job.go @@ -47,6 +47,7 @@ type Job struct { // Interval on which the job will be run. Value is specified as a cron-supported time specification "nickname". // The following subset of those is supported: @monthly, @weekly, @daily, @hourly. + // For metastore sync, an additional option @default is supported, which will schedule jobs at a more granular frequency. ScheduleCronExpression *string `mandatory:"false" json:"scheduleCronExpression"` // Date that the schedule should be operational. An RFC3339 (https://tools.ietf.org/html/rfc3339) formatted datetime string. @@ -87,6 +88,9 @@ type Job struct { // Unique key of the data asset to which this job applies, if the job involves a data asset. DataAssetKey *string `mandatory:"false" json:"dataAssetKey"` + // Unique key of the glossary to which this job applies. + GlossaryKey *string `mandatory:"false" json:"glossaryKey"` + // Error code returned from the latest job execution for this job. Useful when the latest Job execution is in FAILED state. ErrorCode *string `mandatory:"false" json:"errorCode"` diff --git a/datacatalog/job_definition.go b/datacatalog/job_definition.go index 55d7e632eb..df9efe76da 100644 --- a/datacatalog/job_definition.go +++ b/datacatalog/job_definition.go @@ -40,6 +40,9 @@ type JobDefinition struct { // The key of the data asset for which the job is defined. DataAssetKey *string `mandatory:"false" json:"dataAssetKey"` + // Unique key of the glossary to which this job applies. + GlossaryKey *string `mandatory:"false" json:"glossaryKey"` + // Detailed description of the job definition. Description *string `mandatory:"false" json:"description"` diff --git a/datacatalog/job_definition_summary.go b/datacatalog/job_definition_summary.go index 5f1c16042c..68582ef228 100644 --- a/datacatalog/job_definition_summary.go +++ b/datacatalog/job_definition_summary.go @@ -68,6 +68,9 @@ type JobDefinitionSummary struct { // Unique key of the data asset to which this job applies, if the job involves a data asset. DataAssetKey *string `mandatory:"false" json:"dataAssetKey"` + + // Unique key of the glossary to which this job applies, if the job involves a glossary. + GlossaryKey *string `mandatory:"false" json:"glossaryKey"` } func (m JobDefinitionSummary) String() string { diff --git a/datacatalog/job_summary.go b/datacatalog/job_summary.go index d96e7a76c9..76ece5ca7c 100644 --- a/datacatalog/job_summary.go +++ b/datacatalog/job_summary.go @@ -62,6 +62,7 @@ type JobSummary struct { // Interval on which the job will be run. Value is specified as a cron-supported time specification "nickname". // The following subset of those is supported: @monthly, @weekly, @daily, @hourly. + // For metastore sync, an additional option @default is supported, which will schedule jobs at a more granular frequency. ScheduleCronExpression *string `mandatory:"false" json:"scheduleCronExpression"` // Date that the schedule should be operational. An RFC3339 (https://tools.ietf.org/html/rfc3339) formatted datetime string. @@ -80,6 +81,9 @@ type JobSummary struct { // Unique key of the data asset to which this job applies, if the job involves a data asset. DataAssetKey *string `mandatory:"false" json:"dataAssetKey"` + // Unique key of the glossary to which this job applies. + GlossaryKey *string `mandatory:"false" json:"glossaryKey"` + // Error code returned from the latest job execution for this job. Useful when the latest Job execution is in FAILED state. ErrorCode *string `mandatory:"false" json:"errorCode"` diff --git a/datacatalog/job_type.go b/datacatalog/job_type.go index 9a523ae66c..3b8bc1580b 100644 --- a/datacatalog/job_type.go +++ b/datacatalog/job_type.go @@ -36,6 +36,8 @@ const ( JobTypeScheduledExecutionInstance JobTypeEnum = "SCHEDULED_EXECUTION_INSTANCE" JobTypeAsyncDelete JobTypeEnum = "ASYNC_DELETE" JobTypeImportDataAsset JobTypeEnum = "IMPORT_DATA_ASSET" + JobTypeCreateScanProxy JobTypeEnum = "CREATE_SCAN_PROXY" + JobTypeAsyncExportGlossary JobTypeEnum = "ASYNC_EXPORT_GLOSSARY" ) var mappingJobTypeEnum = map[string]JobTypeEnum{ @@ -56,6 +58,8 @@ var mappingJobTypeEnum = map[string]JobTypeEnum{ "SCHEDULED_EXECUTION_INSTANCE": JobTypeScheduledExecutionInstance, "ASYNC_DELETE": JobTypeAsyncDelete, "IMPORT_DATA_ASSET": JobTypeImportDataAsset, + "CREATE_SCAN_PROXY": JobTypeCreateScanProxy, + "ASYNC_EXPORT_GLOSSARY": JobTypeAsyncExportGlossary, } var mappingJobTypeEnumLowerCase = map[string]JobTypeEnum{ @@ -76,6 +80,8 @@ var mappingJobTypeEnumLowerCase = map[string]JobTypeEnum{ "scheduled_execution_instance": JobTypeScheduledExecutionInstance, "async_delete": JobTypeAsyncDelete, "import_data_asset": JobTypeImportDataAsset, + "create_scan_proxy": JobTypeCreateScanProxy, + "async_export_glossary": JobTypeAsyncExportGlossary, } // GetJobTypeEnumValues Enumerates the set of values for JobTypeEnum @@ -107,6 +113,8 @@ func GetJobTypeEnumStringValues() []string { "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET", + "CREATE_SCAN_PROXY", + "ASYNC_EXPORT_GLOSSARY", } } diff --git a/datacatalog/lineage_direction.go b/datacatalog/lineage_direction.go new file mode 100644 index 0000000000..37d4dc33fa --- /dev/null +++ b/datacatalog/lineage_direction.go @@ -0,0 +1,61 @@ +// 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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "strings" +) + +// LineageDirectionEnum Enum with underlying type: string +type LineageDirectionEnum string + +// Set of constants representing the allowable values for LineageDirectionEnum +const ( + LineageDirectionUpstream LineageDirectionEnum = "UPSTREAM" + LineageDirectionBoth LineageDirectionEnum = "BOTH" + LineageDirectionDownstream LineageDirectionEnum = "DOWNSTREAM" +) + +var mappingLineageDirectionEnum = map[string]LineageDirectionEnum{ + "UPSTREAM": LineageDirectionUpstream, + "BOTH": LineageDirectionBoth, + "DOWNSTREAM": LineageDirectionDownstream, +} + +var mappingLineageDirectionEnumLowerCase = map[string]LineageDirectionEnum{ + "upstream": LineageDirectionUpstream, + "both": LineageDirectionBoth, + "downstream": LineageDirectionDownstream, +} + +// GetLineageDirectionEnumValues Enumerates the set of values for LineageDirectionEnum +func GetLineageDirectionEnumValues() []LineageDirectionEnum { + values := make([]LineageDirectionEnum, 0) + for _, v := range mappingLineageDirectionEnum { + values = append(values, v) + } + return values +} + +// GetLineageDirectionEnumStringValues Enumerates the set of values in String for LineageDirectionEnum +func GetLineageDirectionEnumStringValues() []string { + return []string{ + "UPSTREAM", + "BOTH", + "DOWNSTREAM", + } +} + +// GetMappingLineageDirectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLineageDirectionEnum(val string) (LineageDirectionEnum, bool) { + enum, ok := mappingLineageDirectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datacatalog/lineage_object.go b/datacatalog/lineage_object.go new file mode 100644 index 0000000000..bfe1a5978c --- /dev/null +++ b/datacatalog/lineage_object.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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LineageObject Object describing an individual element of object lineage. +type LineageObject struct { + + // Key of the object, such as an entity, about which this lineage applies. + ObjectKey *string `mandatory:"false" json:"objectKey"` + + // Display name of the object. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Detailed description of the object. + Description *string `mandatory:"false" json:"description"` + + // Indicates if intra-lineage is available for this given object. If yes, drill-down can be requested for + // this object. + IsIntraLineageAvailable *bool `mandatory:"false" json:"isIntraLineageAvailable"` + + // Key of the parent object for this object. + ParentKey *string `mandatory:"false" json:"parentKey"` + + // Full path of the parent object. + ParentPath *string `mandatory:"false" json:"parentPath"` + + // The time that this object was created. An RFC3339 (https://tools.ietf.org/html/rfc3339) formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time that this object was updated. An RFC3339 (https://tools.ietf.org/html/rfc3339) formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Type name of the object. Type keys can be found via the '/types' endpoint. + TypeName *string `mandatory:"false" json:"typeName"` + + // Type key of the object. Type keys can be found via the '/types' endpoint. + TypeKey *string `mandatory:"false" json:"typeKey"` + + // A map of maps that contains the properties which are specific to the entity type. Each entity type + // definition defines it's set of required and optional properties. The map keys are category names and the + // values are maps of property name to property value. Every property is contained inside of a category. Most + // data entities have required properties within the "default" category. + // Example: `{"properties": { "default": { "key1": "value1"}}}` + Properties map[string]map[string]string `mandatory:"false" json:"properties"` +} + +func (m LineageObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LineageObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/lineage_relationship.go b/datacatalog/lineage_relationship.go new file mode 100644 index 0000000000..60f723d683 --- /dev/null +++ b/datacatalog/lineage_relationship.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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LineageRelationship Declares how two elements of object lineage are related. +type LineageRelationship struct { + + // Object key of source lineage element. + FromObjectKey *string `mandatory:"false" json:"fromObjectKey"` + + // Object key of target lineage element. + ToObjectKey *string `mandatory:"false" json:"toObjectKey"` + + // Type of the relationship. + RelationshipType *string `mandatory:"false" json:"relationshipType"` +} + +func (m LineageRelationship) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LineageRelationship) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/list_attributes_request_response.go b/datacatalog/list_attributes_request_response.go index 6a46ee382c..d142ef5632 100644 --- a/datacatalog/list_attributes_request_response.go +++ b/datacatalog/list_attributes_request_response.go @@ -88,7 +88,8 @@ type ListAttributesRequest struct { // Specifies the fields to return in an entity attribute summary response. Fields []ListAttributesFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"multi"` - // The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. Default order for POSITION is ascending. If no value is specified POSITION is default. + // The field to sort by. Only one sort order may be provided. DISPLAYORBUSINESSNAME considers businessName of a given object if set, else its displayName is used. + // Default sort order for TIMECREATED is descending and default sort order for DISPLAYNAME, POSITION and DISPLAYORBUSINESSNAME is ascending. If no order is specified, POSITION is the default. SortBy ListAttributesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` // The sort order to use, either 'asc' or 'desc'. @@ -379,21 +380,24 @@ type ListAttributesSortByEnum string // Set of constants representing the allowable values for ListAttributesSortByEnum const ( - ListAttributesSortByTimecreated ListAttributesSortByEnum = "TIMECREATED" - ListAttributesSortByDisplayname ListAttributesSortByEnum = "DISPLAYNAME" - ListAttributesSortByPosition ListAttributesSortByEnum = "POSITION" + ListAttributesSortByTimecreated ListAttributesSortByEnum = "TIMECREATED" + ListAttributesSortByDisplayname ListAttributesSortByEnum = "DISPLAYNAME" + ListAttributesSortByPosition ListAttributesSortByEnum = "POSITION" + ListAttributesSortByDisplayorbusinessname ListAttributesSortByEnum = "DISPLAYORBUSINESSNAME" ) var mappingListAttributesSortByEnum = map[string]ListAttributesSortByEnum{ - "TIMECREATED": ListAttributesSortByTimecreated, - "DISPLAYNAME": ListAttributesSortByDisplayname, - "POSITION": ListAttributesSortByPosition, + "TIMECREATED": ListAttributesSortByTimecreated, + "DISPLAYNAME": ListAttributesSortByDisplayname, + "POSITION": ListAttributesSortByPosition, + "DISPLAYORBUSINESSNAME": ListAttributesSortByDisplayorbusinessname, } var mappingListAttributesSortByEnumLowerCase = map[string]ListAttributesSortByEnum{ - "timecreated": ListAttributesSortByTimecreated, - "displayname": ListAttributesSortByDisplayname, - "position": ListAttributesSortByPosition, + "timecreated": ListAttributesSortByTimecreated, + "displayname": ListAttributesSortByDisplayname, + "position": ListAttributesSortByPosition, + "displayorbusinessname": ListAttributesSortByDisplayorbusinessname, } // GetListAttributesSortByEnumValues Enumerates the set of values for ListAttributesSortByEnum @@ -411,6 +415,7 @@ func GetListAttributesSortByEnumStringValues() []string { "TIMECREATED", "DISPLAYNAME", "POSITION", + "DISPLAYORBUSINESSNAME", } } diff --git a/datacatalog/list_entities_request_response.go b/datacatalog/list_entities_request_response.go index c49279a878..119495292d 100644 --- a/datacatalog/list_entities_request_response.go +++ b/datacatalog/list_entities_request_response.go @@ -91,7 +91,8 @@ type ListEntitiesRequest struct { // Specifies the fields to return in an entity summary response. Fields []ListEntitiesFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"multi"` - // The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. + // The field to sort by. Only one sort order may be provided. DISPLAYORBUSINESSNAME considers businessName of a given object if set, else its displayName is used. + // Default sort order for TIMECREATED is descending and default sort order for DISPLAYNAME and DISPLAYORBUSINESSNAME is ascending. If no order is specified, TIMECREATED is the default. SortBy ListEntitiesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` // The sort order to use, either 'asc' or 'desc'. @@ -399,18 +400,21 @@ type ListEntitiesSortByEnum string // Set of constants representing the allowable values for ListEntitiesSortByEnum const ( - ListEntitiesSortByTimecreated ListEntitiesSortByEnum = "TIMECREATED" - ListEntitiesSortByDisplayname ListEntitiesSortByEnum = "DISPLAYNAME" + ListEntitiesSortByTimecreated ListEntitiesSortByEnum = "TIMECREATED" + ListEntitiesSortByDisplayname ListEntitiesSortByEnum = "DISPLAYNAME" + ListEntitiesSortByDisplayorbusinessname ListEntitiesSortByEnum = "DISPLAYORBUSINESSNAME" ) var mappingListEntitiesSortByEnum = map[string]ListEntitiesSortByEnum{ - "TIMECREATED": ListEntitiesSortByTimecreated, - "DISPLAYNAME": ListEntitiesSortByDisplayname, + "TIMECREATED": ListEntitiesSortByTimecreated, + "DISPLAYNAME": ListEntitiesSortByDisplayname, + "DISPLAYORBUSINESSNAME": ListEntitiesSortByDisplayorbusinessname, } var mappingListEntitiesSortByEnumLowerCase = map[string]ListEntitiesSortByEnum{ - "timecreated": ListEntitiesSortByTimecreated, - "displayname": ListEntitiesSortByDisplayname, + "timecreated": ListEntitiesSortByTimecreated, + "displayname": ListEntitiesSortByDisplayname, + "displayorbusinessname": ListEntitiesSortByDisplayorbusinessname, } // GetListEntitiesSortByEnumValues Enumerates the set of values for ListEntitiesSortByEnum @@ -427,6 +431,7 @@ func GetListEntitiesSortByEnumStringValues() []string { return []string{ "TIMECREATED", "DISPLAYNAME", + "DISPLAYORBUSINESSNAME", } } diff --git a/datacatalog/list_folders_request_response.go b/datacatalog/list_folders_request_response.go index 8f1fcc93fd..5003953cbf 100644 --- a/datacatalog/list_folders_request_response.go +++ b/datacatalog/list_folders_request_response.go @@ -73,7 +73,11 @@ type ListFoldersRequest struct { // Specifies the fields to return in a folder summary response. Fields []ListFoldersFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"multi"` - // The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. + // The key of the object type. + TypeKey *string `mandatory:"false" contributesTo:"query" name:"typeKey"` + + // The field to sort by. Only one sort order may be provided. DISPLAYORBUSINESSNAME considers businessName of a given object if set, else its displayName is used. + // Default sort order for TIMECREATED is descending and default sort order for DISPLAYNAME and DISPLAYORBUSINESSNAME is ascending. If no order is specified, TIMECREATED is the default. SortBy ListFoldersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` // The sort order to use, either 'asc' or 'desc'. @@ -373,18 +377,21 @@ type ListFoldersSortByEnum string // Set of constants representing the allowable values for ListFoldersSortByEnum const ( - ListFoldersSortByTimecreated ListFoldersSortByEnum = "TIMECREATED" - ListFoldersSortByDisplayname ListFoldersSortByEnum = "DISPLAYNAME" + ListFoldersSortByTimecreated ListFoldersSortByEnum = "TIMECREATED" + ListFoldersSortByDisplayname ListFoldersSortByEnum = "DISPLAYNAME" + ListFoldersSortByDisplayorbusinessname ListFoldersSortByEnum = "DISPLAYORBUSINESSNAME" ) var mappingListFoldersSortByEnum = map[string]ListFoldersSortByEnum{ - "TIMECREATED": ListFoldersSortByTimecreated, - "DISPLAYNAME": ListFoldersSortByDisplayname, + "TIMECREATED": ListFoldersSortByTimecreated, + "DISPLAYNAME": ListFoldersSortByDisplayname, + "DISPLAYORBUSINESSNAME": ListFoldersSortByDisplayorbusinessname, } var mappingListFoldersSortByEnumLowerCase = map[string]ListFoldersSortByEnum{ - "timecreated": ListFoldersSortByTimecreated, - "displayname": ListFoldersSortByDisplayname, + "timecreated": ListFoldersSortByTimecreated, + "displayname": ListFoldersSortByDisplayname, + "displayorbusinessname": ListFoldersSortByDisplayorbusinessname, } // GetListFoldersSortByEnumValues Enumerates the set of values for ListFoldersSortByEnum @@ -401,6 +408,7 @@ func GetListFoldersSortByEnumStringValues() []string { return []string{ "TIMECREATED", "DISPLAYNAME", + "DISPLAYORBUSINESSNAME", } } diff --git a/datacatalog/list_job_definitions_request_response.go b/datacatalog/list_job_definitions_request_response.go index 537a8323ab..556dea0e72 100644 --- a/datacatalog/list_job_definitions_request_response.go +++ b/datacatalog/list_job_definitions_request_response.go @@ -44,6 +44,9 @@ type ListJobDefinitionsRequest struct { // Unique data asset key. DataAssetKey *string `mandatory:"false" contributesTo:"query" name:"dataAssetKey"` + // Unique glossary key. + GlossaryKey *string `mandatory:"false" contributesTo:"query" name:"glossaryKey"` + // Unique connection key. ConnectionKey *string `mandatory:"false" contributesTo:"query" name:"connectionKey"` @@ -319,6 +322,8 @@ const ( ListJobDefinitionsJobTypeScheduledExecutionInstance ListJobDefinitionsJobTypeEnum = "SCHEDULED_EXECUTION_INSTANCE" ListJobDefinitionsJobTypeAsyncDelete ListJobDefinitionsJobTypeEnum = "ASYNC_DELETE" ListJobDefinitionsJobTypeImportDataAsset ListJobDefinitionsJobTypeEnum = "IMPORT_DATA_ASSET" + ListJobDefinitionsJobTypeCreateScanProxy ListJobDefinitionsJobTypeEnum = "CREATE_SCAN_PROXY" + ListJobDefinitionsJobTypeAsyncExportGlossary ListJobDefinitionsJobTypeEnum = "ASYNC_EXPORT_GLOSSARY" ) var mappingListJobDefinitionsJobTypeEnum = map[string]ListJobDefinitionsJobTypeEnum{ @@ -339,6 +344,8 @@ var mappingListJobDefinitionsJobTypeEnum = map[string]ListJobDefinitionsJobTypeE "SCHEDULED_EXECUTION_INSTANCE": ListJobDefinitionsJobTypeScheduledExecutionInstance, "ASYNC_DELETE": ListJobDefinitionsJobTypeAsyncDelete, "IMPORT_DATA_ASSET": ListJobDefinitionsJobTypeImportDataAsset, + "CREATE_SCAN_PROXY": ListJobDefinitionsJobTypeCreateScanProxy, + "ASYNC_EXPORT_GLOSSARY": ListJobDefinitionsJobTypeAsyncExportGlossary, } var mappingListJobDefinitionsJobTypeEnumLowerCase = map[string]ListJobDefinitionsJobTypeEnum{ @@ -359,6 +366,8 @@ var mappingListJobDefinitionsJobTypeEnumLowerCase = map[string]ListJobDefinition "scheduled_execution_instance": ListJobDefinitionsJobTypeScheduledExecutionInstance, "async_delete": ListJobDefinitionsJobTypeAsyncDelete, "import_data_asset": ListJobDefinitionsJobTypeImportDataAsset, + "create_scan_proxy": ListJobDefinitionsJobTypeCreateScanProxy, + "async_export_glossary": ListJobDefinitionsJobTypeAsyncExportGlossary, } // GetListJobDefinitionsJobTypeEnumValues Enumerates the set of values for ListJobDefinitionsJobTypeEnum @@ -390,6 +399,8 @@ func GetListJobDefinitionsJobTypeEnumStringValues() []string { "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET", + "CREATE_SCAN_PROXY", + "ASYNC_EXPORT_GLOSSARY", } } diff --git a/datacatalog/list_job_executions_request_response.go b/datacatalog/list_job_executions_request_response.go index e56e8e87f0..ebd7a2504b 100644 --- a/datacatalog/list_job_executions_request_response.go +++ b/datacatalog/list_job_executions_request_response.go @@ -262,6 +262,8 @@ const ( ListJobExecutionsJobTypeScheduledExecutionInstance ListJobExecutionsJobTypeEnum = "SCHEDULED_EXECUTION_INSTANCE" ListJobExecutionsJobTypeAsyncDelete ListJobExecutionsJobTypeEnum = "ASYNC_DELETE" ListJobExecutionsJobTypeImportDataAsset ListJobExecutionsJobTypeEnum = "IMPORT_DATA_ASSET" + ListJobExecutionsJobTypeCreateScanProxy ListJobExecutionsJobTypeEnum = "CREATE_SCAN_PROXY" + ListJobExecutionsJobTypeAsyncExportGlossary ListJobExecutionsJobTypeEnum = "ASYNC_EXPORT_GLOSSARY" ) var mappingListJobExecutionsJobTypeEnum = map[string]ListJobExecutionsJobTypeEnum{ @@ -282,6 +284,8 @@ var mappingListJobExecutionsJobTypeEnum = map[string]ListJobExecutionsJobTypeEnu "SCHEDULED_EXECUTION_INSTANCE": ListJobExecutionsJobTypeScheduledExecutionInstance, "ASYNC_DELETE": ListJobExecutionsJobTypeAsyncDelete, "IMPORT_DATA_ASSET": ListJobExecutionsJobTypeImportDataAsset, + "CREATE_SCAN_PROXY": ListJobExecutionsJobTypeCreateScanProxy, + "ASYNC_EXPORT_GLOSSARY": ListJobExecutionsJobTypeAsyncExportGlossary, } var mappingListJobExecutionsJobTypeEnumLowerCase = map[string]ListJobExecutionsJobTypeEnum{ @@ -302,6 +306,8 @@ var mappingListJobExecutionsJobTypeEnumLowerCase = map[string]ListJobExecutionsJ "scheduled_execution_instance": ListJobExecutionsJobTypeScheduledExecutionInstance, "async_delete": ListJobExecutionsJobTypeAsyncDelete, "import_data_asset": ListJobExecutionsJobTypeImportDataAsset, + "create_scan_proxy": ListJobExecutionsJobTypeCreateScanProxy, + "async_export_glossary": ListJobExecutionsJobTypeAsyncExportGlossary, } // GetListJobExecutionsJobTypeEnumValues Enumerates the set of values for ListJobExecutionsJobTypeEnum @@ -333,6 +339,8 @@ func GetListJobExecutionsJobTypeEnumStringValues() []string { "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET", + "CREATE_SCAN_PROXY", + "ASYNC_EXPORT_GLOSSARY", } } diff --git a/datacatalog/list_jobs_request_response.go b/datacatalog/list_jobs_request_response.go index a2b0f4ad26..50d91dba96 100644 --- a/datacatalog/list_jobs_request_response.go +++ b/datacatalog/list_jobs_request_response.go @@ -53,8 +53,12 @@ type ListJobsRequest struct { // Unique data asset key. DataAssetKey *string `mandatory:"false" contributesTo:"query" name:"dataAssetKey"` + // Unique glossary key. + GlossaryKey *string `mandatory:"false" contributesTo:"query" name:"glossaryKey"` + // Interval on which the job will be run. Value is specified as a cron-supported time specification "nickname". // The following subset of those is supported: @monthly, @weekly, @daily, @hourly. + // For metastore sync, an additional option @default is supported, which will schedule jobs at a more granular frequency. ScheduleCronExpression *string `mandatory:"false" contributesTo:"query" name:"scheduleCronExpression"` // Date that the schedule should be operational. An RFC3339 (https://tools.ietf.org/html/rfc3339) formatted datetime string. @@ -251,6 +255,8 @@ const ( ListJobsJobTypeScheduledExecutionInstance ListJobsJobTypeEnum = "SCHEDULED_EXECUTION_INSTANCE" ListJobsJobTypeAsyncDelete ListJobsJobTypeEnum = "ASYNC_DELETE" ListJobsJobTypeImportDataAsset ListJobsJobTypeEnum = "IMPORT_DATA_ASSET" + ListJobsJobTypeCreateScanProxy ListJobsJobTypeEnum = "CREATE_SCAN_PROXY" + ListJobsJobTypeAsyncExportGlossary ListJobsJobTypeEnum = "ASYNC_EXPORT_GLOSSARY" ) var mappingListJobsJobTypeEnum = map[string]ListJobsJobTypeEnum{ @@ -271,6 +277,8 @@ var mappingListJobsJobTypeEnum = map[string]ListJobsJobTypeEnum{ "SCHEDULED_EXECUTION_INSTANCE": ListJobsJobTypeScheduledExecutionInstance, "ASYNC_DELETE": ListJobsJobTypeAsyncDelete, "IMPORT_DATA_ASSET": ListJobsJobTypeImportDataAsset, + "CREATE_SCAN_PROXY": ListJobsJobTypeCreateScanProxy, + "ASYNC_EXPORT_GLOSSARY": ListJobsJobTypeAsyncExportGlossary, } var mappingListJobsJobTypeEnumLowerCase = map[string]ListJobsJobTypeEnum{ @@ -291,6 +299,8 @@ var mappingListJobsJobTypeEnumLowerCase = map[string]ListJobsJobTypeEnum{ "scheduled_execution_instance": ListJobsJobTypeScheduledExecutionInstance, "async_delete": ListJobsJobTypeAsyncDelete, "import_data_asset": ListJobsJobTypeImportDataAsset, + "create_scan_proxy": ListJobsJobTypeCreateScanProxy, + "async_export_glossary": ListJobsJobTypeAsyncExportGlossary, } // GetListJobsJobTypeEnumValues Enumerates the set of values for ListJobsJobTypeEnum @@ -322,6 +332,8 @@ func GetListJobsJobTypeEnumStringValues() []string { "SCHEDULED_EXECUTION_INSTANCE", "ASYNC_DELETE", "IMPORT_DATA_ASSET", + "CREATE_SCAN_PROXY", + "ASYNC_EXPORT_GLOSSARY", } } diff --git a/datacatalog/object_lineage.go b/datacatalog/object_lineage.go new file mode 100644 index 0000000000..bca2957372 --- /dev/null +++ b/datacatalog/object_lineage.go @@ -0,0 +1,58 @@ +// 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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectLineage Lineage for an object. +type ObjectLineage struct { + + // Object level at which the lineage is returned. + Level *int `mandatory:"true" json:"level"` + + // Direction of the lineage returned. + Direction LineageDirectionEnum `mandatory:"true" json:"direction"` + + // Set of objects that are involved in the lineage. + Objects []LineageObject `mandatory:"false" json:"objects"` + + // Set of relationships between the objects in the 'objects' set. + Relationships []LineageRelationship `mandatory:"false" json:"relationships"` + + // A map of maps that contains additional information in explanation of the lineage returned. The map keys are + // categories of information and the values are maps of annotation names to their corresponding values. + // Every annotation is contained inside a category. + // Example: `{"annotations": { "category": { "key": "value"}}}` + Annotations map[string]map[string]string `mandatory:"false" json:"annotations"` +} + +func (m ObjectLineage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectLineage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLineageDirectionEnum(string(m.Direction)); !ok && m.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", m.Direction, strings.Join(GetLineageDirectionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/object_lineage_request_details.go b/datacatalog/object_lineage_request_details.go new file mode 100644 index 0000000000..e3388bab8f --- /dev/null +++ b/datacatalog/object_lineage_request_details.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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectLineageRequestDetails Details needed by a lineage fetch request. +type ObjectLineageRequestDetails struct { + + // Object level at which the lineage is returned. + Level *int `mandatory:"false" json:"level"` + + // Direction of the lineage returned. + Direction LineageDirectionEnum `mandatory:"false" json:"direction,omitempty"` + + // Intra-lineages are drill down lineages. This field indicates whether all intra-lineages need to be + // expanded inline in the lineage returned. + IsIntraLineage *bool `mandatory:"false" json:"isIntraLineage"` + + // Unique object key for which intra-lineage needs to be fetched. Only drill-down lineage corresponding + // to the object whose object key is passed is returned. + IntraLineageObjectKey *string `mandatory:"false" json:"intraLineageObjectKey"` +} + +func (m ObjectLineageRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectLineageRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLineageDirectionEnum(string(m.Direction)); !ok && m.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", m.Direction, strings.Join(GetLineageDirectionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/object_storage_object_reference.go b/datacatalog/object_storage_object_reference.go new file mode 100644 index 0000000000..f13929c62a --- /dev/null +++ b/datacatalog/object_storage_object_reference.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. + +// Data Catalog API +// +// Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata. +// For more information, see Data Catalog (https://docs.oracle.com/iaas/data-catalog/home.htm). +// + +package datacatalog + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectStorageObjectReference A reference to an Object Storage object. +type ObjectStorageObjectReference struct { + + // Object Storage namespace. + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // Object Storage bucket name. + BucketName *string `mandatory:"true" json:"bucketName"` + + // Object Storage object name. + ObjectName *string `mandatory:"true" json:"objectName"` +} + +func (m ObjectStorageObjectReference) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectStorageObjectReference) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datacatalog/update_job_definition_details.go b/datacatalog/update_job_definition_details.go index d711282d17..23d1cb4537 100644 --- a/datacatalog/update_job_definition_details.go +++ b/datacatalog/update_job_definition_details.go @@ -29,6 +29,9 @@ type UpdateJobDefinitionDetails struct { // The key of the data asset for which the job is defined. DataAssetKey *string `mandatory:"false" json:"dataAssetKey"` + // Unique key of the glossary to which this job applies. + GlossaryKey *string `mandatory:"false" json:"glossaryKey"` + // Detailed description of the job definition. Description *string `mandatory:"false" json:"description"` diff --git a/datacatalog/update_job_details.go b/datacatalog/update_job_details.go index 5bf4a370f3..3a7e0c0d7b 100644 --- a/datacatalog/update_job_details.go +++ b/datacatalog/update_job_details.go @@ -28,6 +28,7 @@ type UpdateJobDetails struct { // Interval on which the job will be run. Value is specified as a cron-supported time specification "nickname". // The following subset of those is supported: @monthly, @weekly, @daily, @hourly. + // For metastore sync, an additional option @default is supported, which will schedule jobs at a more granular frequency. ScheduleCronExpression *string `mandatory:"false" json:"scheduleCronExpression"` // Date that the schedule should be operational. An RFC3339 (https://tools.ietf.org/html/rfc3339) formatted datetime string. diff --git a/queue/action_type.go b/queue/action_type.go index d681c3c385..545585ee9b 100644 --- a/queue/action_type.go +++ b/queue/action_type.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/change_queue_compartment_details.go b/queue/change_queue_compartment_details.go index 19e4955c79..0b4e2919ca 100644 --- a/queue/change_queue_compartment_details.go +++ b/queue/change_queue_compartment_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/change_queue_compartment_request_response.go b/queue/change_queue_compartment_request_response.go index 9560519477..fd11688713 100644 --- a/queue/change_queue_compartment_request_response.go +++ b/queue/change_queue_compartment_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ChangeQueueCompartment.go.html to see an example of how to use ChangeQueueCompartmentRequest. type ChangeQueueCompartmentRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // The information to be updated. @@ -31,7 +31,7 @@ type ChangeQueueCompartmentRequest struct { // provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/channel_collection.go b/queue/channel_collection.go new file mode 100644 index 0000000000..5da77a6e36 --- /dev/null +++ b/queue/channel_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. + +// Queue API +// +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChannelCollection List of IDs of non-empty channels. +type ChannelCollection struct { + + // The approximate list of IDs of non-empty channels. + Items []string `mandatory:"true" json:"items"` +} + +func (m ChannelCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChannelCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/create_queue_details.go b/queue/create_queue_details.go index 3600ab85de..f8c305bbcc 100644 --- a/queue/create_queue_details.go +++ b/queue/create_queue_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -15,28 +15,31 @@ import ( "strings" ) -// CreateQueueDetails The information about new Queue. +// CreateQueueDetails The information about a new queue. type CreateQueueDetails struct { - // Queue Identifier + // The user-friendly name of the queue. DisplayName *string `mandatory:"true" json:"displayName"` - // Compartment Identifier + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the queue. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The retention period of the messages in the queue, in seconds. + // The retention period of messages in the queue, in seconds. RetentionInSeconds *int `mandatory:"false" json:"retentionInSeconds"` - // The default visibility of the messages consumed from the queue. + // The default visibility timeout of the messages consumed from the queue, in seconds. VisibilityInSeconds *int `mandatory:"false" json:"visibilityInSeconds"` // The default polling timeout of the messages in the queue, in seconds. TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` + // The percentage of allocated queue resources that can be consumed by a single channel. For example, if a queue has a storage limit of 2Gb, and a single channel consumption limit is 0.1 (10%), that means data size of a single channel can't exceed 200Mb. Consumption limit of 100% (default) means that a single channel can consume up-to all allocated queue's resources. + ChannelConsumptionLimit *int `mandatory:"false" json:"channelConsumptionLimit"` + // The number of times a message can be delivered to a consumer before being moved to the dead letter queue. A value of 0 indicates that the DLQ is not used. DeadLetterQueueDeliveryCount *int `mandatory:"false" json:"deadLetterQueueDeliveryCount"` - // Id of the custom master encryption key which will be used to encrypt messages content + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the custom encryption key to be used to encrypt messages content. CustomEncryptionKeyId *string `mandatory:"false" json:"customEncryptionKeyId"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/queue/create_queue_request_response.go b/queue/create_queue_request_response.go index d52b2a9968..ef5549332f 100644 --- a/queue/create_queue_request_response.go +++ b/queue/create_queue_request_response.go @@ -28,7 +28,7 @@ type CreateQueueRequest struct { // might be rejected. OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/delete_message_request_response.go b/queue/delete_message_request_response.go index 5f4e75280e..10b4ea0839 100644 --- a/queue/delete_message_request_response.go +++ b/queue/delete_message_request_response.go @@ -18,13 +18,13 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteMessage.go.html to see an example of how to use DeleteMessageRequest. type DeleteMessageRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // The receipt of the message retrieved from a GetMessages call. MessageReceipt *string `mandatory:"true" contributesTo:"path" name:"messageReceipt"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/delete_messages_details.go b/queue/delete_messages_details.go index 047e92e8b2..e40f3ec0b1 100644 --- a/queue/delete_messages_details.go +++ b/queue/delete_messages_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/delete_messages_details_entry.go b/queue/delete_messages_details_entry.go index 06aec7782e..e6dc58070f 100644 --- a/queue/delete_messages_details_entry.go +++ b/queue/delete_messages_details_entry.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -18,7 +18,7 @@ import ( // DeleteMessagesDetailsEntry Object that represents a message to delete from a queue. type DeleteMessagesDetailsEntry struct { - // The receipt of the message to delete + // The receipt of the message to delete. Receipt *string `mandatory:"true" json:"receipt"` } diff --git a/queue/delete_messages_request_response.go b/queue/delete_messages_request_response.go index ecd26acfc2..fdce0b3f1b 100644 --- a/queue/delete_messages_request_response.go +++ b/queue/delete_messages_request_response.go @@ -18,13 +18,13 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteMessages.go.html to see an example of how to use DeleteMessagesRequest. type DeleteMessagesRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // Details for the messages to delete. DeleteMessagesDetails `contributesTo:"body"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/delete_messages_result.go b/queue/delete_messages_result.go index 1b7fefce4c..019ce2ff08 100644 --- a/queue/delete_messages_result.go +++ b/queue/delete_messages_result.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/delete_messages_result_entry.go b/queue/delete_messages_result_entry.go index 748f26f44d..d92b92c111 100644 --- a/queue/delete_messages_result_entry.go +++ b/queue/delete_messages_result_entry.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/delete_queue_request_response.go b/queue/delete_queue_request_response.go index 5f73bf35b8..db1eddb1bb 100644 --- a/queue/delete_queue_request_response.go +++ b/queue/delete_queue_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteQueue.go.html to see an example of how to use DeleteQueueRequest. type DeleteQueueRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // For optimistic concurrency control. In the PUT or DELETE call @@ -28,7 +28,7 @@ type DeleteQueueRequest struct { // provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/get_message.go b/queue/get_message.go index 72e816210e..634f2ab1e7 100644 --- a/queue/get_message.go +++ b/queue/get_message.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -18,24 +18,28 @@ import ( // GetMessage A message consumed from a queue. type GetMessage struct { - // The id of the message - this is only used for tracing and debugging purposes and isn't used as a parameter in any request. + // The ID of the message. This ID is only used for tracing and debugging purposes and isn't used as a parameter in any request. Id *int64 `mandatory:"true" json:"id"` - // The content of the message + // The content of the message. Content *string `mandatory:"true" json:"content"` // A receipt is a base64urlencode opaque token, uniquely representing a message. // The receipt can be used to delete a message or update its visibility. Receipt *string `mandatory:"true" json:"receipt"` - // The number of time the message has been delivered to a consumer. + // The number of times that the message has been delivered to a consumer. DeliveryCount *int `mandatory:"true" json:"deliveryCount"` - // The time after which the message will be visible to other consumers. An RFC3339 formatted datetime string + // The time after which the message will be visible to other consumers, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` VisibleAfter *common.SDKTime `mandatory:"true" json:"visibleAfter"` - // The time after which the message will be automatically deleted. An RFC3339 formatted datetime string + // The time after which the message will be automatically deleted, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` ExpireAfter *common.SDKTime `mandatory:"true" json:"expireAfter"` + + Metadata *MessageMetadata `mandatory:"false" json:"metadata"` } func (m GetMessage) String() string { diff --git a/queue/get_messages.go b/queue/get_messages.go index bbf17b54d4..570f88f37e 100644 --- a/queue/get_messages.go +++ b/queue/get_messages.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/get_messages_request_response.go b/queue/get_messages_request_response.go index a85662f1eb..2aac5716eb 100644 --- a/queue/get_messages_request_response.go +++ b/queue/get_messages_request_response.go @@ -18,28 +18,29 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetMessages.go.html to see an example of how to use GetMessagesRequest. type GetMessagesRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` - // If the visibilityInSeconds parameter is set, messages will be hidden for visibilityInSeconds seconds and won't be consumable by other consumers during that time. - // If it isn't set it defaults to the value set at the queue level. The minimum is 0 and the maximum is 43,200 (12 hours). - // Using a visibilityInSeconds of 0, effectively acts as a peek functionality. - // Messages retrieved that way, aren't meant to be deleted because they will most likely be delivered to another consumer as their visibility won't change, but will still increase the delivery count by one. + // If the `visibilityInSeconds` parameter is set, messages will be hidden for `visibilityInSeconds` seconds and won't be consumable by other consumers during that time. + // If it isn't set it defaults to the value set at the queue level. + // Using a `visibilityInSeconds` value of 0 effectively acts as a peek functionality. + // Messages retrieved that way aren't meant to be deleted because they will most likely be delivered to another consumer as their visibility won't change, but will still increase the delivery count by one. VisibilityInSeconds *int `mandatory:"false" contributesTo:"query" name:"visibilityInSeconds"` - // If the timeoutInSeconds parameter isn't set or set to a value greater than zero, the request is using the long-polling mode and will only return when a message is available for consumption (it does not wait for limit messages but still only returns at-most limit messages) or after timeoutInSeconds seconds (in which case it will return an empty response) whichever comes first. - // If the parameter is set to zero, the request is using the short-polling mode and immediately returns whether messages have been retrieved or not. + // If the `timeoutInSeconds parameter` isn't set or it is set to a value greater than 0, the request is using the long-polling mode and will only return when a message is available for consumption (it does not wait for limit messages but still only returns at-most limit messages) or after `timeoutInSeconds` seconds (in which case it will return an empty response), whichever comes first. + // If the parameter is set to 0, the request is using the short-polling mode and immediately returns whether messages have been retrieved or not. // In same rare-cases a long-polling request could be interrupted (returned with empty response) before the end of the timeout. - // The minimum is 0 (long polling disabled), the maximum is 30 seconds and default is 30 seconds. TimeoutInSeconds *int `mandatory:"false" contributesTo:"query" name:"timeoutInSeconds"` // The limit parameter controls how many messages is returned at-most. - // The default is 1, the minimum is 1 and the maximum is 32. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Optional parameter to filter the channels. + ChannelFilter *string `mandatory:"false" contributesTo:"query" name:"channelFilter"` + // Metadata about the request. 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/queue/get_queue_request_response.go b/queue/get_queue_request_response.go index 13715a2213..9839527d85 100644 --- a/queue/get_queue_request_response.go +++ b/queue/get_queue_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetQueue.go.html to see an example of how to use GetQueueRequest. type GetQueueRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/get_stats_request_response.go b/queue/get_stats_request_response.go index 98be285af0..3591d3a581 100644 --- a/queue/get_stats_request_response.go +++ b/queue/get_stats_request_response.go @@ -18,12 +18,15 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetStats.go.html to see an example of how to use GetStatsRequest. type GetStatsRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Id to specify channel. + ChannelId *string `mandatory:"false" contributesTo:"query" name:"channelId"` + // Metadata about the request. 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/queue/get_work_request_request_response.go b/queue/get_work_request_request_response.go index eaf278840f..1195062bf1 100644 --- a/queue/get_work_request_request_response.go +++ b/queue/get_work_request_request_response.go @@ -21,7 +21,7 @@ type GetWorkRequestRequest struct { // The ID of the asynchronous request. WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/list_channels_request_response.go b/queue/list_channels_request_response.go new file mode 100644 index 0000000000..0346f2abd0 --- /dev/null +++ b/queue/list_channels_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 queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListChannelsRequest wrapper for the ListChannels operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListChannels.go.html to see an example of how to use ListChannelsRequest. +type ListChannelsRequest struct { + + // The unique queue identifier. + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Optional parameter to filter the channels. + ChannelFilter *string `mandatory:"false" contributesTo:"query" name:"channelFilter"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListChannelsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListChannelsRequest) 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 ListChannelsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListChannelsRequest) 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 ListChannelsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListChannelsResponse wrapper for the ListChannels operation +type ListChannelsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ChannelCollection instances + ChannelCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListChannelsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListChannelsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/list_queues_request_response.go b/queue/list_queues_request_response.go index d471885f2b..365981aae4 100644 --- a/queue/list_queues_request_response.go +++ b/queue/list_queues_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListQueues.go.html to see an example of how to use ListQueuesRequest. type ListQueuesRequest struct { - // The ID of the compartment in which to list resources. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` // A filter to return only resources their lifecycleState matches the given lifecycleState. @@ -27,13 +27,13 @@ type ListQueuesRequest struct { // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // unique Queue identifier + // The unique queue identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` - // The maximum number of items to return. + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` - // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + // For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Page *string `mandatory:"false" contributesTo:"query" name:"page"` // The sort order to use, either 'asc' or 'desc'. @@ -42,7 +42,7 @@ type ListQueuesRequest struct { // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. SortBy ListQueuesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/list_work_request_errors_request_response.go b/queue/list_work_request_errors_request_response.go index fe38daf95e..a4a24c6aa2 100644 --- a/queue/list_work_request_errors_request_response.go +++ b/queue/list_work_request_errors_request_response.go @@ -21,13 +21,13 @@ type ListWorkRequestErrorsRequest struct { // The ID of the asynchronous request. WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + // For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Page *string `mandatory:"false" contributesTo:"query" name:"page"` - // The maximum number of items to return. + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/list_work_request_logs_request_response.go b/queue/list_work_request_logs_request_response.go index 9db78dd6ee..041cf5b8eb 100644 --- a/queue/list_work_request_logs_request_response.go +++ b/queue/list_work_request_logs_request_response.go @@ -21,13 +21,13 @@ type ListWorkRequestLogsRequest struct { // The ID of the asynchronous request. WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + // For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Page *string `mandatory:"false" contributesTo:"query" name:"page"` - // The maximum number of items to return. + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/list_work_requests_request_response.go b/queue/list_work_requests_request_response.go index de72d9ded5..afb3d81543 100644 --- a/queue/list_work_requests_request_response.go +++ b/queue/list_work_requests_request_response.go @@ -18,19 +18,19 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. type ListWorkRequestsRequest struct { - // The ID of the compartment in which to list resources. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` // The ID of the asynchronous work request. WorkRequestId *string `mandatory:"false" contributesTo:"query" name:"workRequestId"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + // For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Page *string `mandatory:"false" contributesTo:"query" name:"page"` - // The maximum number of items to return. + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/message_metadata.go b/queue/message_metadata.go new file mode 100644 index 0000000000..cc985fd23b --- /dev/null +++ b/queue/message_metadata.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. + +// Queue API +// +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MessageMetadata Object that represents metadata for message. +type MessageMetadata struct { + + // The channel ID which specifies the channel to publish or retrieve messages. + ChannelId *string `mandatory:"true" json:"channelId"` + + // Additional message properties + CustomProperties map[string]string `mandatory:"false" json:"customProperties"` +} + +func (m MessageMetadata) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MessageMetadata) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/operation_status.go b/queue/operation_status.go index 38d48ec1ee..5937ebd747 100644 --- a/queue/operation_status.go +++ b/queue/operation_status.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/operation_type.go b/queue/operation_type.go index 920fbba7b6..75dd05b6c3 100644 --- a/queue/operation_type.go +++ b/queue/operation_type.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/purge_queue_details.go b/queue/purge_queue_details.go index 194362e271..d3f0db6482 100644 --- a/queue/purge_queue_details.go +++ b/queue/purge_queue_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -19,10 +19,15 @@ import ( type PurgeQueueDetails struct { // Type of the purge to perform: - // - NORMAL - purge only normal queue - // - DLQ - purge only DLQ - // - BOTH - purge both normal queue and DLQ + // - NORMAL - purge only the normal queue + // - DLQ - purge only the dead letter queue + // - BOTH - purge both the normal queue and the dead letter queue PurgeType PurgeQueueDetailsPurgeTypeEnum `mandatory:"true" json:"purgeType"` + + // Optional parameter to specify the destination of purge operation. + // If the channel ID is specified, the purge operation will delete all the messages in the specific channels. + // If the channel ID is not specified, the purge operation will delete all the messages in the queue and in the child channels. + ChannelIds []string `mandatory:"false" json:"channelIds"` } func (m PurgeQueueDetails) String() string { diff --git a/queue/purge_queue_request_response.go b/queue/purge_queue_request_response.go index f9a3cb002d..359d2cc57d 100644 --- a/queue/purge_queue_request_response.go +++ b/queue/purge_queue_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/PurgeQueue.go.html to see an example of how to use PurgeQueueRequest. type PurgeQueueRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // The information to be updated. @@ -31,7 +31,7 @@ type PurgeQueueRequest struct { // provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/put_message.go b/queue/put_message.go index c18b5f9401..97379f7d09 100644 --- a/queue/put_message.go +++ b/queue/put_message.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -15,11 +15,15 @@ import ( "strings" ) -// PutMessage A message that has been published in a queue. +// PutMessage A message that has been published to a queue. type PutMessage struct { - // The id of the message + // The ID of the message. Id *int64 `mandatory:"true" json:"id"` + + // The time after which the message will be automatically deleted, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` + ExpireAfter *common.SDKTime `mandatory:"false" json:"expireAfter"` } func (m PutMessage) String() string { diff --git a/queue/put_messages.go b/queue/put_messages.go index b6a6e34c95..802a23eb29 100644 --- a/queue/put_messages.go +++ b/queue/put_messages.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -15,10 +15,10 @@ import ( "strings" ) -// PutMessages A list of the messages published in a queue. +// PutMessages A list of the messages published to a queue. type PutMessages struct { - // The messages that have been published in a queue. + // The messages that have been published to a queue. Messages []PutMessage `mandatory:"true" json:"messages"` } diff --git a/queue/put_messages_details.go b/queue/put_messages_details.go index b0f6f746f3..399cc7909e 100644 --- a/queue/put_messages_details.go +++ b/queue/put_messages_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/put_messages_details_entry.go b/queue/put_messages_details_entry.go index 00d77d7f72..f04460a5ac 100644 --- a/queue/put_messages_details_entry.go +++ b/queue/put_messages_details_entry.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -20,6 +20,8 @@ type PutMessagesDetailsEntry struct { // The content of the message Content *string `mandatory:"true" json:"content"` + + Metadata *MessageMetadata `mandatory:"false" json:"metadata"` } func (m PutMessagesDetailsEntry) String() string { diff --git a/queue/put_messages_request_response.go b/queue/put_messages_request_response.go index da2f290d82..82e74e1e4e 100644 --- a/queue/put_messages_request_response.go +++ b/queue/put_messages_request_response.go @@ -18,13 +18,13 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/PutMessages.go.html to see an example of how to use PutMessagesRequest. type PutMessagesRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // Details for the messages to publish. PutMessagesDetails `contributesTo:"body"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/queue.go b/queue/queue.go index 45e43ab335..fdb402d011 100644 --- a/queue/queue.go +++ b/queue/queue.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -15,22 +15,24 @@ import ( "strings" ) -// Queue Description of Queue. +// Queue A detailed representation of a queue and its configuration. type Queue struct { - // Unique identifier that is immutable on creation + // A unique identifier for the queue that is immutable on creation. Id *string `mandatory:"true" json:"id"` - // Compartment Identifier + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the queue. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The time the the Queue was created. An RFC3339 formatted datetime string + // The time that the queue was created, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // The time the Queue was updated. An RFC3339 formatted datetime string + // The time that the queue was updated, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - // The current state of the Queue. + // The current state of the queue. LifecycleState QueueLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` // The endpoint to use to consume or publish messages in the queue. @@ -39,7 +41,7 @@ type Queue struct { // The retention period of the messages in the queue, in seconds. RetentionInSeconds *int `mandatory:"true" json:"retentionInSeconds"` - // The default visibility of the messages consumed from the queue. + // The default visibility timeout of the messages consumed from the queue, in seconds. VisibilityInSeconds *int `mandatory:"true" json:"visibilityInSeconds"` // The default polling timeout of the messages in the queue, in seconds. @@ -48,13 +50,13 @@ type Queue struct { // The number of times a message can be delivered to a consumer before being moved to the dead letter queue. A value of 0 indicates that the DLQ is not used. DeadLetterQueueDeliveryCount *int `mandatory:"true" json:"deadLetterQueueDeliveryCount"` - // Queue Identifier, can be renamed + // A user-friendly name for the queue. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` - // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + // Any additional details about the current state of the queue. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Id of the custom master encryption key which will be used to encrypt messages content + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the custom encryption key to be used to encrypt messages content. CustomEncryptionKeyId *string `mandatory:"false" json:"customEncryptionKeyId"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. @@ -68,6 +70,9 @@ type Queue struct { // Usage of system tag keys. These predefined keys are scoped to namespaces. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The percentage of allocated queue resources that can be consumed by a single channel. For example, if a queue has a storage limit of 2Gb, and a single channel consumption limit is 0.1 (10%), that means data size of a single channel can't exceed 200Mb. Consumption limit of 100% (default) means that a single channel can consume up-to all allocated queue's resources. + ChannelConsumptionLimit *int `mandatory:"false" json:"channelConsumptionLimit"` } func (m Queue) String() string { diff --git a/queue/queue_client.go b/queue/queue_client.go index e95dd48009..da2980a79d 100644 --- a/queue/queue_client.go +++ b/queue/queue_client.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -91,7 +91,9 @@ func (client *QueueClient) ConfigurationProvider() *common.ConfigurationProvider return client.config } -// DeleteMessage Deletes from the queue the message represented by the receipt. +// DeleteMessage Deletes the message represented by the receipt from the queue. +// You must use the messages endpoint (https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint) to delete messages. +// The messages endpoint may be different for different queues. Use GetQueue to find the queue's `messagesEndpoint`. // // See also // @@ -150,6 +152,8 @@ func (client QueueClient) deleteMessage(ctx context.Context, request common.OCIR } // DeleteMessages Deletes multiple messages from the queue. +// You must use the messages endpoint (https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint) to delete messages. +// The messages endpoint may be different for different queues. Use GetQueue to find the queue's `messagesEndpoint`. // // See also // @@ -207,7 +211,12 @@ func (client QueueClient) deleteMessages(ctx context.Context, request common.OCI return response, err } -// GetMessages Consumes message from the queue. +// GetMessages Consumes messages from the queue. +// You must use the messages endpoint (https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint) to consume messages. +// The messages endpoint may be different for different queues. Use GetQueue to find the queue's `messagesEndpoint`. +// GetMessages accepts optional channelFilter query parameter that can filter source channels of the messages. +// When channelFilter is present, service will return available messages from the channel which ID exactly matched the filter. +// When filter is not specified, messages will be returned from a random non-empty channel within a queue. // // See also // @@ -265,6 +274,8 @@ func (client QueueClient) getMessages(ctx context.Context, request common.OCIReq } // GetStats Gets the statistics for the queue and its dead letter queue. +// You must use the messages endpoint (https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint) to get a queue's statistics. +// The messages endpoint may be different for different queues. Use GetQueue to find the queue's `messagesEndpoint`. // // See also // @@ -322,7 +333,70 @@ func (client QueueClient) getStats(ctx context.Context, request common.OCIReques return response, err } -// PutMessages Puts messages in the queue +// ListChannels Gets the list of IDs of non-empty channels. +// It will return an approximate list of IDs of non-empty channels. That information is based on the queue level statistics. +// API supports optional channelFilter parameter which will filter the returned results according to the specified filter. +// List of channel IDs is approximate, because statistics is refreshed once per-second, and that list represents a snapshot of the past information. API is paginated. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListChannels.go.html to see an example of how to use ListChannels API. +// A default retry strategy applies to this operation ListChannels() +func (client QueueClient) ListChannels(ctx context.Context, request ListChannelsRequest) (response ListChannelsResponse, 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.listChannels, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListChannelsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListChannelsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListChannelsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListChannelsResponse") + } + return +} + +// listChannels implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) listChannels(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/queues/{queueId}/channels", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListChannelsResponse + 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/queue/20210201/ChannelCollection/ListChannels" + err = common.PostProcessServiceError(err, "Queue", "ListChannels", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PutMessages Puts messages into the queue. +// You must use the messages endpoint (https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint) to produce messages. +// The messages endpoint may be different for different queues. Use GetQueue to find the queue's `messagesEndpoint`. // // See also // @@ -380,6 +454,8 @@ func (client QueueClient) putMessages(ctx context.Context, request common.OCIReq } // UpdateMessage Updates the visibility of the message represented by the receipt. +// You must use the messages endpoint (https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint) to update messages. +// The messages endpoint may be different for different queues. Use GetQueue to find the queue's `messagesEndpoint`. // // See also // @@ -438,6 +514,8 @@ func (client QueueClient) updateMessage(ctx context.Context, request common.OCIR } // UpdateMessages Updates multiple messages in the queue. +// You must use the messages endpoint (https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint) to update messages. +// The messages endpoint may be different for different queues. Use GetQueue to find the queue's `messagesEndpoint`. // // See also // diff --git a/queue/queue_collection.go b/queue/queue_collection.go index a1ed0130e3..aa2d35ec4b 100644 --- a/queue/queue_collection.go +++ b/queue/queue_collection.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/queue_queueadmin_client.go b/queue/queue_queueadmin_client.go index 5c8681b4f7..88a048bb13 100644 --- a/queue/queue_queueadmin_client.go +++ b/queue/queue_queueadmin_client.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -91,7 +91,7 @@ func (client *QueueAdminClient) ConfigurationProvider() *common.ConfigurationPro return client.config } -// ChangeQueueCompartment Moves a Queue resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. +// ChangeQueueCompartment Moves a queue from one compartment to another. When provided, If-Match is checked against ETag values of the resource. // // See also // @@ -149,7 +149,7 @@ func (client QueueAdminClient) changeQueueCompartment(ctx context.Context, reque return response, err } -// CreateQueue Creates a new Queue. +// CreateQueue Creates a new queue. // // See also // @@ -212,7 +212,7 @@ func (client QueueAdminClient) createQueue(ctx context.Context, request common.O return response, err } -// DeleteQueue Deletes a Queue resource by identifier +// DeleteQueue Deletes a queue resource by identifier. // // See also // @@ -270,7 +270,7 @@ func (client QueueAdminClient) deleteQueue(ctx context.Context, request common.O return response, err } -// GetQueue Gets a Queue by identifier +// GetQueue Gets a queue by identifier. // // See also // @@ -386,7 +386,7 @@ func (client QueueAdminClient) getWorkRequest(ctx context.Context, request commo return response, err } -// ListQueues Returns a list of Queues. +// ListQueues Returns a list of queues. // // See also // @@ -618,8 +618,9 @@ func (client QueueAdminClient) listWorkRequests(ctx context.Context, request com return response, err } -// PurgeQueue Deletes all messages present in the queue at the time of invocation. Only one concurrent purge operation is supported for any given queue. +// PurgeQueue Deletes all messages present in the queue, or deletes all the messages in the specific channel at the time of invocation. Only one concurrent purge operation is supported for any given queue. // However multiple concurrent purge operations are supported for different queues. +// Purge request without specification of target channels will clean up all messages in the queue and in the child channels. // // See also // @@ -677,7 +678,7 @@ func (client QueueAdminClient) purgeQueue(ctx context.Context, request common.OC return response, err } -// UpdateQueue Updates the Queue +// UpdateQueue Updates the specified queue. // // See also // diff --git a/queue/queue_stats.go b/queue/queue_stats.go index 2e837b324b..7e5f527cca 100644 --- a/queue/queue_stats.go +++ b/queue/queue_stats.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -15,11 +15,14 @@ import ( "strings" ) -// QueueStats The stats for a queue and its dead letter queue. +// QueueStats The stats for a queue and its dead letter queue. If channelId is specified in request field, it will return channel specific stats response. type QueueStats struct { Queue *Stats `mandatory:"true" json:"queue"` Dlq *Stats `mandatory:"true" json:"dlq"` + + // If channelId is presented in GetStats call, the channel id will be returned in the GetStats response. + ChannelId *string `mandatory:"false" json:"channelId"` } func (m QueueStats) String() string { diff --git a/queue/queue_summary.go b/queue/queue_summary.go index d5fdb58b00..5f0a1dc5fc 100644 --- a/queue/queue_summary.go +++ b/queue/queue_summary.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -15,31 +15,33 @@ import ( "strings" ) -// QueueSummary Summary of the Queue. +// QueueSummary Summary of the queue. type QueueSummary struct { - // Unique identifier that is immutable on creation + // A unique identifier for the queue that is immutable on creation. Id *string `mandatory:"true" json:"id"` - // Compartment Identifier + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the queue. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The time the the Queue was created. An RFC3339 formatted datetime string + // The time that the queue was created, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // The time the Queue was updated. An RFC3339 formatted datetime string + // The time that the queue was updated, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - // The current state of the Queue. + // The current state of the queue. LifecycleState QueueLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - // The endpoint to use to get or put messages in the queue. + // The endpoint to use to consume or publish messages in the queue. MessagesEndpoint *string `mandatory:"true" json:"messagesEndpoint"` - // Queue Identifier, can be renamed + // A user-friendly name for the queue. Does not have to be unique, and it's changeable. Avoid entering confidential information. DisplayName *string `mandatory:"false" json:"displayName"` - // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + // Any additional details about the current state of the queue. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/queue/sort_order.go b/queue/sort_order.go index e470cd620b..61e40430bc 100644 --- a/queue/sort_order.go +++ b/queue/sort_order.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/stats.go b/queue/stats.go index 2731b740aa..c9e5ece046 100644 --- a/queue/stats.go +++ b/queue/stats.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -24,7 +24,7 @@ type Stats struct { // The approximate number of messages delivered to a consumer but not yet deleted and so unavailable for re-delivery. InFlightMessages *int64 `mandatory:"true" json:"inFlightMessages"` - // The approximate size of the queue in bytes. Sum of the size of visible of in-flight messages. + // The approximate size of the queue in bytes. Sum of the size of visible and in-flight messages. SizeInBytes *int64 `mandatory:"true" json:"sizeInBytes"` } diff --git a/queue/update_message_details.go b/queue/update_message_details.go index 6dbacb2919..39f2022c7e 100644 --- a/queue/update_message_details.go +++ b/queue/update_message_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/update_message_request_response.go b/queue/update_message_request_response.go index 4b2319b483..f0816e92d5 100644 --- a/queue/update_message_request_response.go +++ b/queue/update_message_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateMessage.go.html to see an example of how to use UpdateMessageRequest. type UpdateMessageRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // The receipt of the message retrieved from a GetMessages call. @@ -27,7 +27,7 @@ type UpdateMessageRequest struct { // Details for the message to update. UpdateMessageDetails `contributesTo:"body"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/update_messages_details.go b/queue/update_messages_details.go index dfc1ee3641..929b86a2fa 100644 --- a/queue/update_messages_details.go +++ b/queue/update_messages_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -15,7 +15,7 @@ import ( "strings" ) -// UpdateMessagesDetails The details of a UpdateMessages request. +// UpdateMessagesDetails The details of an UpdateMessages request. type UpdateMessagesDetails struct { // The array of messages to update in a queue. diff --git a/queue/update_messages_details_entry.go b/queue/update_messages_details_entry.go index 3bc0f19542..8893e062b7 100644 --- a/queue/update_messages_details_entry.go +++ b/queue/update_messages_details_entry.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -18,7 +18,7 @@ import ( // UpdateMessagesDetailsEntry Object that represents a message to update in a queue. type UpdateMessagesDetailsEntry struct { - // The receipt of the message to update + // The receipt of the message to update. Receipt *string `mandatory:"true" json:"receipt"` // The new visibility of the message relative to the current time (as-per the clock of the server receiving the request). diff --git a/queue/update_messages_request_response.go b/queue/update_messages_request_response.go index bed1da7e48..cb2a2d10c0 100644 --- a/queue/update_messages_request_response.go +++ b/queue/update_messages_request_response.go @@ -18,13 +18,13 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateMessages.go.html to see an example of how to use UpdateMessagesRequest. type UpdateMessagesRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // Details for the messages to update. UpdateMessagesDetails `contributesTo:"body"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/update_messages_result.go b/queue/update_messages_result.go index 0fdf08db0d..b51fbcfa52 100644 --- a/queue/update_messages_result.go +++ b/queue/update_messages_result.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -21,7 +21,7 @@ type UpdateMessagesResult struct { // The number of messages that failed to be updated in the queue because of a server failure. ServerFailures *int `mandatory:"true" json:"serverFailures"` - // The number of messages that failed to be updated in the queue because of a client failure such as an invalid receipt or invalid visibilityInSeconds. + // The number of messages that failed to be updated in the queue because of a client failure such as an invalid receipt or invalid `visibilityInSeconds`. ClientFailures *int `mandatory:"true" json:"clientFailures"` // An array of items representing the result of each action. diff --git a/queue/update_messages_result_entry.go b/queue/update_messages_result_entry.go index eca81153d9..17dd0e9445 100644 --- a/queue/update_messages_result_entry.go +++ b/queue/update_messages_result_entry.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -20,10 +20,11 @@ import ( // If a message failed to be updated in the queue, the entry includes the `errorCode` and `errorMessage` fields. type UpdateMessagesResultEntry struct { - // The id of the message that's been updated. + // The ID of the message that's been updated. Id *int64 `mandatory:"false" json:"id"` - // The time after which the message will be visible to other consumers. An RFC3339 formatted datetime string + // The time after which the message will be visible to other consumers, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` VisibleAfter *common.SDKTime `mandatory:"false" json:"visibleAfter"` // The error code, in case the message was not successfully updated in the queue. diff --git a/queue/update_queue_details.go b/queue/update_queue_details.go index ad1d7cf1d9..8616175eb1 100644 --- a/queue/update_queue_details.go +++ b/queue/update_queue_details.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -18,21 +18,24 @@ import ( // UpdateQueueDetails The information to be updated. type UpdateQueueDetails struct { - // Queue Identifier + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the queue. DisplayName *string `mandatory:"false" json:"displayName"` - // The default visibility of the messages consumed from the queue. + // The default visibility timeout of the messages consumed from the queue, in seconds. VisibilityInSeconds *int `mandatory:"false" json:"visibilityInSeconds"` // The default polling timeout of the messages in the queue, in seconds. TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` + // The percentage of allocated queue resources that can be consumed by a single channel. For example, if a queue has a storage limit of 2Gb, and a single channel consumption limit is 0.1 (10%), that means data size of a single channel can't exceed 200Mb. Consumption limit of 100% (default) means that a single channel can consume up-to all allocated queue's resources. + ChannelConsumptionLimit *int `mandatory:"false" json:"channelConsumptionLimit"` + // The number of times a message can be delivered to a consumer before being moved to the dead letter queue. // A value of 0 indicates that the DLQ is not used. - // Changing that value to a lower threshold does not retro-actively move in-flight messages in the dead letter queue. + // Changing that value to a lower threshold does not retroactively move in-flight messages in the dead letter queue. DeadLetterQueueDeliveryCount *int `mandatory:"false" json:"deadLetterQueueDeliveryCount"` - // Id of the custom master encryption key which will be used to encrypt messages content. String of length 0 means the custom key should be removed from queue + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the custom encryption key to be used to encrypt messages content. A string with a length of 0 means the custom key should be removed from queue. CustomEncryptionKeyId *string `mandatory:"false" json:"customEncryptionKeyId"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/queue/update_queue_request_response.go b/queue/update_queue_request_response.go index b548a1f10b..985f4956a2 100644 --- a/queue/update_queue_request_response.go +++ b/queue/update_queue_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateQueue.go.html to see an example of how to use UpdateQueueRequest. type UpdateQueueRequest struct { - // unique Queue identifier + // The unique queue identifier. QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` // The information to be updated. @@ -31,7 +31,7 @@ type UpdateQueueRequest struct { // provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - // The client request ID for tracing. + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/queue/updated_message.go b/queue/updated_message.go index ca0e316698..a2ee23ffb3 100644 --- a/queue/updated_message.go +++ b/queue/updated_message.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -18,10 +18,11 @@ import ( // UpdatedMessage An updated message with the new visibility. type UpdatedMessage struct { - // The id of the message that's been updated. + // The ID of the message that's been updated. Id *int64 `mandatory:"true" json:"id"` - // The time after which the message will be visible to other consumers. An RFC3339 formatted datetime string + // The time after which the message will be visible to other consumers, expressed in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2018-04-20T00:00:07.405Z` VisibleAfter *common.SDKTime `mandatory:"true" json:"visibleAfter"` } diff --git a/queue/work_request.go b/queue/work_request.go index 8b8ea52c2d..fffc94d768 100644 --- a/queue/work_request.go +++ b/queue/work_request.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -27,7 +27,7 @@ type WorkRequest struct { // The id of the work request. Id *string `mandatory:"true" json:"id"` - // The ocid of the compartment that contains the work request. Work requests should be scoped to + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. Work requests should be scoped to // the same compartment as the resource the work request affects. If the work request affects multiple resources, // and those resources are not in the same compartment, it is up to the service team to pick the primary // resource whose compartment should be used diff --git a/queue/work_request_error.go b/queue/work_request_error.go index 706f92b12c..ca2a6f6de1 100644 --- a/queue/work_request_error.go +++ b/queue/work_request_error.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -25,7 +25,7 @@ type WorkRequestError struct { // A human readable description of the issue encountered. Message *string `mandatory:"true" json:"message"` - // The time the error occured. An RFC3339 formatted datetime string. + // The time the error occured. An RFC 3339 (https://tools.ietf.org/rfc/rfc3339) formatted datetime string. Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` } diff --git a/queue/work_request_error_collection.go b/queue/work_request_error_collection.go index ca225d9903..dcae721325 100644 --- a/queue/work_request_error_collection.go +++ b/queue/work_request_error_collection.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/work_request_log_entry.go b/queue/work_request_log_entry.go index ec2266cd49..841cddeb11 100644 --- a/queue/work_request_log_entry.go +++ b/queue/work_request_log_entry.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -21,7 +21,7 @@ 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 + // The time the log message was written. An RFC 3339 (https://tools.ietf.org/rfc/rfc3339) formatted datetime string Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` } diff --git a/queue/work_request_log_entry_collection.go b/queue/work_request_log_entry_collection.go index 81886a2ff7..a99831aab9 100644 --- a/queue/work_request_log_entry_collection.go +++ b/queue/work_request_log_entry_collection.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/work_request_resource.go b/queue/work_request_resource.go index 24055deea2..3d6596e96a 100644 --- a/queue/work_request_resource.go +++ b/queue/work_request_resource.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue diff --git a/queue/work_request_summary.go b/queue/work_request_summary.go index 75c335144f..5803075043 100644 --- a/queue/work_request_summary.go +++ b/queue/work_request_summary.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue @@ -24,10 +24,10 @@ type WorkRequestSummary struct { // Status of current work request. Status OperationStatusEnum `mandatory:"true" json:"status"` - // The id of the work request. + // The ID of the work request. Id *string `mandatory:"true" json:"id"` - // The ocid of the compartment that contains the work request. Work requests should be scoped to + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. Work requests should be scoped to // the same compartment as the resource the work request affects. If the work request affects multiple resources, // and those resources are not in the same compartment, it is up to the service team to pick the primary // resource whose compartment should be used diff --git a/queue/work_request_summary_collection.go b/queue/work_request_summary_collection.go index a262b8d918..9d6d0d7ec6 100644 --- a/queue/work_request_summary_collection.go +++ b/queue/work_request_summary_collection.go @@ -4,7 +4,7 @@ // Queue API // -// A description of the Queue API +// Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see Queue (https://docs.cloud.oracle.com/iaas/Content/queue/overview.htm). // package queue