diff --git a/CHANGELOG.md b/CHANGELOG.md index 5afec23f19..92eca6ef84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.61.0 - 2024-03-05 +n### Added +- Support for Linux capabilities configuration for the containers in the Container Instances service +- Support for service platforms in the Oracle Store Platform Gateway service +- Support for whisper models and delete job operation in the Speech service +- Support for new SQL insight content types in news reports in the Operations Insights service +- Support for launching virtual machines with multiple volumes in the Compute service + +### Breaking Changes +- The property `CapacityPlanningResources` was made optional in the model `NewsContentTypes` in the Operations Insights service + + ## 65.60.0 - 2024-02-27 ### Added - Support for specifying dialog version when creating skills entities in the Digital Assistant service diff --git a/aispeech/aispeech_aiservicespeech_client.go b/aispeech/aispeech_aiservicespeech_client.go index 48939136f7..7babdc445f 100644 --- a/aispeech/aispeech_aiservicespeech_client.go +++ b/aispeech/aispeech_aiservicespeech_client.go @@ -339,6 +339,68 @@ func (client AIServiceSpeechClient) createTranscriptionJob(ctx context.Context, return response, err } +// DeleteTranscriptionJob Delete API cleans job, tasks and the related metadata. However the generated transcriptions in customer tenancy will not be deleted. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aispeech/DeleteTranscriptionJob.go.html to see an example of how to use DeleteTranscriptionJob API. +func (client AIServiceSpeechClient) DeleteTranscriptionJob(ctx context.Context, request DeleteTranscriptionJobRequest) (response DeleteTranscriptionJobResponse, 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.deleteTranscriptionJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteTranscriptionJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteTranscriptionJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteTranscriptionJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteTranscriptionJobResponse") + } + return +} + +// deleteTranscriptionJob implements the OCIOperation interface (enables retrying operations) +func (client AIServiceSpeechClient) deleteTranscriptionJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/transcriptionJobs/{transcriptionJobId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteTranscriptionJobResponse + 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/speech/20220101/TranscriptionJob/DeleteTranscriptionJob" + err = common.PostProcessServiceError(err, "AIServiceSpeech", "DeleteTranscriptionJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetTranscriptionJob Gets a Transcription Job by identifier // // # See also diff --git a/aispeech/delete_transcription_job_request_response.go b/aispeech/delete_transcription_job_request_response.go new file mode 100644 index 0000000000..1782b73d06 --- /dev/null +++ b/aispeech/delete_transcription_job_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package aispeech + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteTranscriptionJobRequest wrapper for the DeleteTranscriptionJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aispeech/DeleteTranscriptionJob.go.html to see an example of how to use DeleteTranscriptionJobRequest. +type DeleteTranscriptionJobRequest struct { + + // Unique Transcription Job identifier. + TranscriptionJobId *string `mandatory:"true" contributesTo:"path" name:"transcriptionJobId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteTranscriptionJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteTranscriptionJobRequest) 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 DeleteTranscriptionJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteTranscriptionJobRequest) 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 DeleteTranscriptionJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteTranscriptionJobResponse wrapper for the DeleteTranscriptionJob operation +type DeleteTranscriptionJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteTranscriptionJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteTranscriptionJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/aispeech/transcription_model_details.go b/aispeech/transcription_model_details.go index 32dfa02839..9c067d2d54 100644 --- a/aispeech/transcription_model_details.go +++ b/aispeech/transcription_model_details.go @@ -18,11 +18,18 @@ import ( // TranscriptionModelDetails Model details. type TranscriptionModelDetails struct { + // Select a model to use for generating transcriptions. Currently supported models are: + // - ORACLE + // - WHISPER_MEDIUM + // - WHISPER_LARGE_V2 (upon service request) + ModelType *string `mandatory:"false" json:"modelType"` + // Domain for input files. Domain TranscriptionModelDetailsDomainEnum `mandatory:"false" json:"domain,omitempty"` - // Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. - // - en-US: English - United States + // + // Oracle supported language codes are (Oracle models are locale specific). + // - en-US: English - United States (default) // - es-ES: Spanish - Spain // - pt-BR: Portuguese - Brazil // - en-GB: English - Great Britain @@ -32,6 +39,64 @@ type TranscriptionModelDetails struct { // - fr-FR: French - France // - de-DE: German - Germany // - it-IT: Italian - Italy + // Whisper supported language codes are (Whisper models are locale agnostic). + // - af: Afrikaans + // - ar: Arabic + // - az: Azerbaijani + // - be: Belarusian + // - bg: Bulgarian + // - bs: Bosnian + // - ca: Catalan + // - cs: Czech + // - cy: Welsh + // - da: Danish + // - de: German + // - el: Greek + // - en: English (default) + // - es: Spanish + // - et: Estonian + // - fa: Persian + // - fi: Finnish + // - fr: French + // - gl: Galician + // - he: Hebrew + // - hi: Hindi + // - hr: Croatian + // - hu: Hungarian + // - hy: Armenian + // - id: Indonesian + // - is: Icelandic + // - it: Italian + // - ja: Japanese + // - kk: Kazakh + // - kn: Kannada + // - ko: Korean + // - lt: Lithuanian + // - lv: Latvian + // - mi: Maori + // - mk: Macedonian + // - mr: Marathi + // - ms: Malay + // - ne: Nepali + // - nl: Dutch + // - no: Norwegian + // - pl: Polish + // - pt: Portuguese + // - ro: Romanian + // - ru: Russian + // - sk: Slovak + // - sl: Slovenian + // - sr: Serbian + // - sv: Swedish + // - sw: Swahili + // - ta: Tamil + // - th: Thai + // - tl: Tagalog + // - tr: Turkish + // - uk: Ukrainian + // - ur: Urdu + // - vi: Vietnamese + // - zh: Chinese LanguageCode TranscriptionModelDetailsLanguageCodeEnum `mandatory:"false" json:"languageCode,omitempty"` TranscriptionSettings *TranscriptionSettings `mandatory:"false" json:"transcriptionSettings"` @@ -112,6 +177,63 @@ const ( TranscriptionModelDetailsLanguageCodeFrFr TranscriptionModelDetailsLanguageCodeEnum = "fr-FR" TranscriptionModelDetailsLanguageCodeDeDe TranscriptionModelDetailsLanguageCodeEnum = "de-DE" TranscriptionModelDetailsLanguageCodeItIt TranscriptionModelDetailsLanguageCodeEnum = "it-IT" + TranscriptionModelDetailsLanguageCodeAf TranscriptionModelDetailsLanguageCodeEnum = "af" + TranscriptionModelDetailsLanguageCodeAr TranscriptionModelDetailsLanguageCodeEnum = "ar" + TranscriptionModelDetailsLanguageCodeAz TranscriptionModelDetailsLanguageCodeEnum = "az" + TranscriptionModelDetailsLanguageCodeBe TranscriptionModelDetailsLanguageCodeEnum = "be" + TranscriptionModelDetailsLanguageCodeBg TranscriptionModelDetailsLanguageCodeEnum = "bg" + TranscriptionModelDetailsLanguageCodeBs TranscriptionModelDetailsLanguageCodeEnum = "bs" + TranscriptionModelDetailsLanguageCodeCa TranscriptionModelDetailsLanguageCodeEnum = "ca" + TranscriptionModelDetailsLanguageCodeCs TranscriptionModelDetailsLanguageCodeEnum = "cs" + TranscriptionModelDetailsLanguageCodeCy TranscriptionModelDetailsLanguageCodeEnum = "cy" + TranscriptionModelDetailsLanguageCodeDa TranscriptionModelDetailsLanguageCodeEnum = "da" + TranscriptionModelDetailsLanguageCodeDe TranscriptionModelDetailsLanguageCodeEnum = "de" + TranscriptionModelDetailsLanguageCodeEl TranscriptionModelDetailsLanguageCodeEnum = "el" + TranscriptionModelDetailsLanguageCodeEn TranscriptionModelDetailsLanguageCodeEnum = "en" + TranscriptionModelDetailsLanguageCodeEs TranscriptionModelDetailsLanguageCodeEnum = "es" + TranscriptionModelDetailsLanguageCodeEt TranscriptionModelDetailsLanguageCodeEnum = "et" + TranscriptionModelDetailsLanguageCodeFa TranscriptionModelDetailsLanguageCodeEnum = "fa" + TranscriptionModelDetailsLanguageCodeFi TranscriptionModelDetailsLanguageCodeEnum = "fi" + TranscriptionModelDetailsLanguageCodeFr TranscriptionModelDetailsLanguageCodeEnum = "fr" + TranscriptionModelDetailsLanguageCodeGl TranscriptionModelDetailsLanguageCodeEnum = "gl" + TranscriptionModelDetailsLanguageCodeHe TranscriptionModelDetailsLanguageCodeEnum = "he" + TranscriptionModelDetailsLanguageCodeHi TranscriptionModelDetailsLanguageCodeEnum = "hi" + TranscriptionModelDetailsLanguageCodeHr TranscriptionModelDetailsLanguageCodeEnum = "hr" + TranscriptionModelDetailsLanguageCodeHu TranscriptionModelDetailsLanguageCodeEnum = "hu" + TranscriptionModelDetailsLanguageCodeHy TranscriptionModelDetailsLanguageCodeEnum = "hy" + TranscriptionModelDetailsLanguageCodeId TranscriptionModelDetailsLanguageCodeEnum = "id" + TranscriptionModelDetailsLanguageCodeIs TranscriptionModelDetailsLanguageCodeEnum = "is" + TranscriptionModelDetailsLanguageCodeIt TranscriptionModelDetailsLanguageCodeEnum = "it" + TranscriptionModelDetailsLanguageCodeJa TranscriptionModelDetailsLanguageCodeEnum = "ja" + TranscriptionModelDetailsLanguageCodeKk TranscriptionModelDetailsLanguageCodeEnum = "kk" + TranscriptionModelDetailsLanguageCodeKn TranscriptionModelDetailsLanguageCodeEnum = "kn" + TranscriptionModelDetailsLanguageCodeKo TranscriptionModelDetailsLanguageCodeEnum = "ko" + TranscriptionModelDetailsLanguageCodeLt TranscriptionModelDetailsLanguageCodeEnum = "lt" + TranscriptionModelDetailsLanguageCodeLv TranscriptionModelDetailsLanguageCodeEnum = "lv" + TranscriptionModelDetailsLanguageCodeMi TranscriptionModelDetailsLanguageCodeEnum = "mi" + TranscriptionModelDetailsLanguageCodeMk TranscriptionModelDetailsLanguageCodeEnum = "mk" + TranscriptionModelDetailsLanguageCodeMr TranscriptionModelDetailsLanguageCodeEnum = "mr" + TranscriptionModelDetailsLanguageCodeMs TranscriptionModelDetailsLanguageCodeEnum = "ms" + TranscriptionModelDetailsLanguageCodeNe TranscriptionModelDetailsLanguageCodeEnum = "ne" + TranscriptionModelDetailsLanguageCodeNl TranscriptionModelDetailsLanguageCodeEnum = "nl" + TranscriptionModelDetailsLanguageCodeNo TranscriptionModelDetailsLanguageCodeEnum = "no" + TranscriptionModelDetailsLanguageCodePl TranscriptionModelDetailsLanguageCodeEnum = "pl" + TranscriptionModelDetailsLanguageCodePt TranscriptionModelDetailsLanguageCodeEnum = "pt" + TranscriptionModelDetailsLanguageCodeRo TranscriptionModelDetailsLanguageCodeEnum = "ro" + TranscriptionModelDetailsLanguageCodeRu TranscriptionModelDetailsLanguageCodeEnum = "ru" + TranscriptionModelDetailsLanguageCodeSk TranscriptionModelDetailsLanguageCodeEnum = "sk" + TranscriptionModelDetailsLanguageCodeSl TranscriptionModelDetailsLanguageCodeEnum = "sl" + TranscriptionModelDetailsLanguageCodeSr TranscriptionModelDetailsLanguageCodeEnum = "sr" + TranscriptionModelDetailsLanguageCodeSv TranscriptionModelDetailsLanguageCodeEnum = "sv" + TranscriptionModelDetailsLanguageCodeSw TranscriptionModelDetailsLanguageCodeEnum = "sw" + TranscriptionModelDetailsLanguageCodeTa TranscriptionModelDetailsLanguageCodeEnum = "ta" + TranscriptionModelDetailsLanguageCodeTh TranscriptionModelDetailsLanguageCodeEnum = "th" + TranscriptionModelDetailsLanguageCodeTl TranscriptionModelDetailsLanguageCodeEnum = "tl" + TranscriptionModelDetailsLanguageCodeTr TranscriptionModelDetailsLanguageCodeEnum = "tr" + TranscriptionModelDetailsLanguageCodeUk TranscriptionModelDetailsLanguageCodeEnum = "uk" + TranscriptionModelDetailsLanguageCodeUr TranscriptionModelDetailsLanguageCodeEnum = "ur" + TranscriptionModelDetailsLanguageCodeVi TranscriptionModelDetailsLanguageCodeEnum = "vi" + TranscriptionModelDetailsLanguageCodeZh TranscriptionModelDetailsLanguageCodeEnum = "zh" ) var mappingTranscriptionModelDetailsLanguageCodeEnum = map[string]TranscriptionModelDetailsLanguageCodeEnum{ @@ -125,6 +247,63 @@ var mappingTranscriptionModelDetailsLanguageCodeEnum = map[string]TranscriptionM "fr-FR": TranscriptionModelDetailsLanguageCodeFrFr, "de-DE": TranscriptionModelDetailsLanguageCodeDeDe, "it-IT": TranscriptionModelDetailsLanguageCodeItIt, + "af": TranscriptionModelDetailsLanguageCodeAf, + "ar": TranscriptionModelDetailsLanguageCodeAr, + "az": TranscriptionModelDetailsLanguageCodeAz, + "be": TranscriptionModelDetailsLanguageCodeBe, + "bg": TranscriptionModelDetailsLanguageCodeBg, + "bs": TranscriptionModelDetailsLanguageCodeBs, + "ca": TranscriptionModelDetailsLanguageCodeCa, + "cs": TranscriptionModelDetailsLanguageCodeCs, + "cy": TranscriptionModelDetailsLanguageCodeCy, + "da": TranscriptionModelDetailsLanguageCodeDa, + "de": TranscriptionModelDetailsLanguageCodeDe, + "el": TranscriptionModelDetailsLanguageCodeEl, + "en": TranscriptionModelDetailsLanguageCodeEn, + "es": TranscriptionModelDetailsLanguageCodeEs, + "et": TranscriptionModelDetailsLanguageCodeEt, + "fa": TranscriptionModelDetailsLanguageCodeFa, + "fi": TranscriptionModelDetailsLanguageCodeFi, + "fr": TranscriptionModelDetailsLanguageCodeFr, + "gl": TranscriptionModelDetailsLanguageCodeGl, + "he": TranscriptionModelDetailsLanguageCodeHe, + "hi": TranscriptionModelDetailsLanguageCodeHi, + "hr": TranscriptionModelDetailsLanguageCodeHr, + "hu": TranscriptionModelDetailsLanguageCodeHu, + "hy": TranscriptionModelDetailsLanguageCodeHy, + "id": TranscriptionModelDetailsLanguageCodeId, + "is": TranscriptionModelDetailsLanguageCodeIs, + "it": TranscriptionModelDetailsLanguageCodeIt, + "ja": TranscriptionModelDetailsLanguageCodeJa, + "kk": TranscriptionModelDetailsLanguageCodeKk, + "kn": TranscriptionModelDetailsLanguageCodeKn, + "ko": TranscriptionModelDetailsLanguageCodeKo, + "lt": TranscriptionModelDetailsLanguageCodeLt, + "lv": TranscriptionModelDetailsLanguageCodeLv, + "mi": TranscriptionModelDetailsLanguageCodeMi, + "mk": TranscriptionModelDetailsLanguageCodeMk, + "mr": TranscriptionModelDetailsLanguageCodeMr, + "ms": TranscriptionModelDetailsLanguageCodeMs, + "ne": TranscriptionModelDetailsLanguageCodeNe, + "nl": TranscriptionModelDetailsLanguageCodeNl, + "no": TranscriptionModelDetailsLanguageCodeNo, + "pl": TranscriptionModelDetailsLanguageCodePl, + "pt": TranscriptionModelDetailsLanguageCodePt, + "ro": TranscriptionModelDetailsLanguageCodeRo, + "ru": TranscriptionModelDetailsLanguageCodeRu, + "sk": TranscriptionModelDetailsLanguageCodeSk, + "sl": TranscriptionModelDetailsLanguageCodeSl, + "sr": TranscriptionModelDetailsLanguageCodeSr, + "sv": TranscriptionModelDetailsLanguageCodeSv, + "sw": TranscriptionModelDetailsLanguageCodeSw, + "ta": TranscriptionModelDetailsLanguageCodeTa, + "th": TranscriptionModelDetailsLanguageCodeTh, + "tl": TranscriptionModelDetailsLanguageCodeTl, + "tr": TranscriptionModelDetailsLanguageCodeTr, + "uk": TranscriptionModelDetailsLanguageCodeUk, + "ur": TranscriptionModelDetailsLanguageCodeUr, + "vi": TranscriptionModelDetailsLanguageCodeVi, + "zh": TranscriptionModelDetailsLanguageCodeZh, } var mappingTranscriptionModelDetailsLanguageCodeEnumLowerCase = map[string]TranscriptionModelDetailsLanguageCodeEnum{ @@ -138,6 +317,63 @@ var mappingTranscriptionModelDetailsLanguageCodeEnumLowerCase = map[string]Trans "fr-fr": TranscriptionModelDetailsLanguageCodeFrFr, "de-de": TranscriptionModelDetailsLanguageCodeDeDe, "it-it": TranscriptionModelDetailsLanguageCodeItIt, + "af": TranscriptionModelDetailsLanguageCodeAf, + "ar": TranscriptionModelDetailsLanguageCodeAr, + "az": TranscriptionModelDetailsLanguageCodeAz, + "be": TranscriptionModelDetailsLanguageCodeBe, + "bg": TranscriptionModelDetailsLanguageCodeBg, + "bs": TranscriptionModelDetailsLanguageCodeBs, + "ca": TranscriptionModelDetailsLanguageCodeCa, + "cs": TranscriptionModelDetailsLanguageCodeCs, + "cy": TranscriptionModelDetailsLanguageCodeCy, + "da": TranscriptionModelDetailsLanguageCodeDa, + "de": TranscriptionModelDetailsLanguageCodeDe, + "el": TranscriptionModelDetailsLanguageCodeEl, + "en": TranscriptionModelDetailsLanguageCodeEn, + "es": TranscriptionModelDetailsLanguageCodeEs, + "et": TranscriptionModelDetailsLanguageCodeEt, + "fa": TranscriptionModelDetailsLanguageCodeFa, + "fi": TranscriptionModelDetailsLanguageCodeFi, + "fr": TranscriptionModelDetailsLanguageCodeFr, + "gl": TranscriptionModelDetailsLanguageCodeGl, + "he": TranscriptionModelDetailsLanguageCodeHe, + "hi": TranscriptionModelDetailsLanguageCodeHi, + "hr": TranscriptionModelDetailsLanguageCodeHr, + "hu": TranscriptionModelDetailsLanguageCodeHu, + "hy": TranscriptionModelDetailsLanguageCodeHy, + "id": TranscriptionModelDetailsLanguageCodeId, + "is": TranscriptionModelDetailsLanguageCodeIs, + "it": TranscriptionModelDetailsLanguageCodeIt, + "ja": TranscriptionModelDetailsLanguageCodeJa, + "kk": TranscriptionModelDetailsLanguageCodeKk, + "kn": TranscriptionModelDetailsLanguageCodeKn, + "ko": TranscriptionModelDetailsLanguageCodeKo, + "lt": TranscriptionModelDetailsLanguageCodeLt, + "lv": TranscriptionModelDetailsLanguageCodeLv, + "mi": TranscriptionModelDetailsLanguageCodeMi, + "mk": TranscriptionModelDetailsLanguageCodeMk, + "mr": TranscriptionModelDetailsLanguageCodeMr, + "ms": TranscriptionModelDetailsLanguageCodeMs, + "ne": TranscriptionModelDetailsLanguageCodeNe, + "nl": TranscriptionModelDetailsLanguageCodeNl, + "no": TranscriptionModelDetailsLanguageCodeNo, + "pl": TranscriptionModelDetailsLanguageCodePl, + "pt": TranscriptionModelDetailsLanguageCodePt, + "ro": TranscriptionModelDetailsLanguageCodeRo, + "ru": TranscriptionModelDetailsLanguageCodeRu, + "sk": TranscriptionModelDetailsLanguageCodeSk, + "sl": TranscriptionModelDetailsLanguageCodeSl, + "sr": TranscriptionModelDetailsLanguageCodeSr, + "sv": TranscriptionModelDetailsLanguageCodeSv, + "sw": TranscriptionModelDetailsLanguageCodeSw, + "ta": TranscriptionModelDetailsLanguageCodeTa, + "th": TranscriptionModelDetailsLanguageCodeTh, + "tl": TranscriptionModelDetailsLanguageCodeTl, + "tr": TranscriptionModelDetailsLanguageCodeTr, + "uk": TranscriptionModelDetailsLanguageCodeUk, + "ur": TranscriptionModelDetailsLanguageCodeUr, + "vi": TranscriptionModelDetailsLanguageCodeVi, + "zh": TranscriptionModelDetailsLanguageCodeZh, } // GetTranscriptionModelDetailsLanguageCodeEnumValues Enumerates the set of values for TranscriptionModelDetailsLanguageCodeEnum @@ -162,6 +398,63 @@ func GetTranscriptionModelDetailsLanguageCodeEnumStringValues() []string { "fr-FR", "de-DE", "it-IT", + "af", + "ar", + "az", + "be", + "bg", + "bs", + "ca", + "cs", + "cy", + "da", + "de", + "el", + "en", + "es", + "et", + "fa", + "fi", + "fr", + "gl", + "he", + "hi", + "hr", + "hu", + "hy", + "id", + "is", + "it", + "ja", + "kk", + "kn", + "ko", + "lt", + "lv", + "mi", + "mk", + "mr", + "ms", + "ne", + "nl", + "no", + "pl", + "pt", + "ro", + "ru", + "sk", + "sl", + "sr", + "sv", + "sw", + "ta", + "th", + "tl", + "tr", + "uk", + "ur", + "vi", + "zh", } } diff --git a/common/version.go b/common/version.go index 7866a59e90..b68ba4b0b5 100644 --- a/common/version.go +++ b/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "60" + minor = "61" patch = "0" tag = "" ) diff --git a/containerinstances/container_capabilities.go b/containerinstances/container_capabilities.go new file mode 100644 index 0000000000..0a83fa8e90 --- /dev/null +++ b/containerinstances/container_capabilities.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Instance API +// +// A description of the Container Instance API +// + +package containerinstances + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ContainerCapabilities Linux Container capabilities to configure capabilities of container. +type ContainerCapabilities struct { + + // A list of additional configurable container capabilities. + AddCapabilities []ContainerCapabilityTypeEnum `mandatory:"false" json:"addCapabilities,omitempty"` + + // A list of container capabilities that can be dropped. + DropCapabilities []ContainerCapabilityTypeEnum `mandatory:"false" json:"dropCapabilities,omitempty"` +} + +func (m ContainerCapabilities) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ContainerCapabilities) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AddCapabilities { + if _, ok := GetMappingContainerCapabilityTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AddCapabilities: %s. Supported values are: %s.", val, strings.Join(GetContainerCapabilityTypeEnumStringValues(), ","))) + } + } + + for _, val := range m.DropCapabilities { + if _, ok := GetMappingContainerCapabilityTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DropCapabilities: %s. Supported values are: %s.", val, strings.Join(GetContainerCapabilityTypeEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/containerinstances/container_capability_type.go b/containerinstances/container_capability_type.go new file mode 100644 index 0000000000..59e46bc9a7 --- /dev/null +++ b/containerinstances/container_capability_type.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Instance API +// +// A description of the Container Instance API +// + +package containerinstances + +import ( + "strings" +) + +// ContainerCapabilityTypeEnum Enum with underlying type: string +type ContainerCapabilityTypeEnum string + +// Set of constants representing the allowable values for ContainerCapabilityTypeEnum +const ( + ContainerCapabilityTypeCapChown ContainerCapabilityTypeEnum = "CAP_CHOWN" + ContainerCapabilityTypeCapDacOverride ContainerCapabilityTypeEnum = "CAP_DAC_OVERRIDE" + ContainerCapabilityTypeCapFsetid ContainerCapabilityTypeEnum = "CAP_FSETID" + ContainerCapabilityTypeCapFowner ContainerCapabilityTypeEnum = "CAP_FOWNER" + ContainerCapabilityTypeCapMknod ContainerCapabilityTypeEnum = "CAP_MKNOD" + ContainerCapabilityTypeCapNetRaw ContainerCapabilityTypeEnum = "CAP_NET_RAW" + ContainerCapabilityTypeCapSetgid ContainerCapabilityTypeEnum = "CAP_SETGID" + ContainerCapabilityTypeCapSetuid ContainerCapabilityTypeEnum = "CAP_SETUID" + ContainerCapabilityTypeCapSetfcap ContainerCapabilityTypeEnum = "CAP_SETFCAP" + ContainerCapabilityTypeCapSetpcap ContainerCapabilityTypeEnum = "CAP_SETPCAP" + ContainerCapabilityTypeCapNetBindService ContainerCapabilityTypeEnum = "CAP_NET_BIND_SERVICE" + ContainerCapabilityTypeCapSysChroot ContainerCapabilityTypeEnum = "CAP_SYS_CHROOT" + ContainerCapabilityTypeCapKill ContainerCapabilityTypeEnum = "CAP_KILL" + ContainerCapabilityTypeCapAuditWrite ContainerCapabilityTypeEnum = "CAP_AUDIT_WRITE" + ContainerCapabilityTypeAll ContainerCapabilityTypeEnum = "ALL" +) + +var mappingContainerCapabilityTypeEnum = map[string]ContainerCapabilityTypeEnum{ + "CAP_CHOWN": ContainerCapabilityTypeCapChown, + "CAP_DAC_OVERRIDE": ContainerCapabilityTypeCapDacOverride, + "CAP_FSETID": ContainerCapabilityTypeCapFsetid, + "CAP_FOWNER": ContainerCapabilityTypeCapFowner, + "CAP_MKNOD": ContainerCapabilityTypeCapMknod, + "CAP_NET_RAW": ContainerCapabilityTypeCapNetRaw, + "CAP_SETGID": ContainerCapabilityTypeCapSetgid, + "CAP_SETUID": ContainerCapabilityTypeCapSetuid, + "CAP_SETFCAP": ContainerCapabilityTypeCapSetfcap, + "CAP_SETPCAP": ContainerCapabilityTypeCapSetpcap, + "CAP_NET_BIND_SERVICE": ContainerCapabilityTypeCapNetBindService, + "CAP_SYS_CHROOT": ContainerCapabilityTypeCapSysChroot, + "CAP_KILL": ContainerCapabilityTypeCapKill, + "CAP_AUDIT_WRITE": ContainerCapabilityTypeCapAuditWrite, + "ALL": ContainerCapabilityTypeAll, +} + +var mappingContainerCapabilityTypeEnumLowerCase = map[string]ContainerCapabilityTypeEnum{ + "cap_chown": ContainerCapabilityTypeCapChown, + "cap_dac_override": ContainerCapabilityTypeCapDacOverride, + "cap_fsetid": ContainerCapabilityTypeCapFsetid, + "cap_fowner": ContainerCapabilityTypeCapFowner, + "cap_mknod": ContainerCapabilityTypeCapMknod, + "cap_net_raw": ContainerCapabilityTypeCapNetRaw, + "cap_setgid": ContainerCapabilityTypeCapSetgid, + "cap_setuid": ContainerCapabilityTypeCapSetuid, + "cap_setfcap": ContainerCapabilityTypeCapSetfcap, + "cap_setpcap": ContainerCapabilityTypeCapSetpcap, + "cap_net_bind_service": ContainerCapabilityTypeCapNetBindService, + "cap_sys_chroot": ContainerCapabilityTypeCapSysChroot, + "cap_kill": ContainerCapabilityTypeCapKill, + "cap_audit_write": ContainerCapabilityTypeCapAuditWrite, + "all": ContainerCapabilityTypeAll, +} + +// GetContainerCapabilityTypeEnumValues Enumerates the set of values for ContainerCapabilityTypeEnum +func GetContainerCapabilityTypeEnumValues() []ContainerCapabilityTypeEnum { + values := make([]ContainerCapabilityTypeEnum, 0) + for _, v := range mappingContainerCapabilityTypeEnum { + values = append(values, v) + } + return values +} + +// GetContainerCapabilityTypeEnumStringValues Enumerates the set of values in String for ContainerCapabilityTypeEnum +func GetContainerCapabilityTypeEnumStringValues() []string { + return []string{ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_FSETID", + "CAP_FOWNER", + "CAP_MKNOD", + "CAP_NET_RAW", + "CAP_SETGID", + "CAP_SETUID", + "CAP_SETFCAP", + "CAP_SETPCAP", + "CAP_NET_BIND_SERVICE", + "CAP_SYS_CHROOT", + "CAP_KILL", + "CAP_AUDIT_WRITE", + "ALL", + } +} + +// GetMappingContainerCapabilityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingContainerCapabilityTypeEnum(val string) (ContainerCapabilityTypeEnum, bool) { + enum, ok := mappingContainerCapabilityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/containerinstances/containerinstances_containerinstance_client.go b/containerinstances/containerinstances_containerinstance_client.go index 050fdf6f43..f0eb82f6e5 100644 --- a/containerinstances/containerinstances_containerinstance_client.go +++ b/containerinstances/containerinstances_containerinstance_client.go @@ -850,7 +850,7 @@ func (client ContainerInstanceClient) restartContainerInstance(ctx context.Conte return response, err } -// RetrieveLogs Retrieves recent logs from the specified container. The most recent 256 KB of logs are returned. +// RetrieveLogs Returns the most recent 256 KB of logs from the specified container. // // # See also // diff --git a/containerinstances/create_linux_security_context_details.go b/containerinstances/create_linux_security_context_details.go index f3abd36ca6..1dbeb31a96 100644 --- a/containerinstances/create_linux_security_context_details.go +++ b/containerinstances/create_linux_security_context_details.go @@ -30,6 +30,8 @@ type CreateLinuxSecurityContextDetails struct { // Determines if the container will have a read-only root file system. Default value is false. IsRootFileSystemReadonly *bool `mandatory:"false" json:"isRootFileSystemReadonly"` + + Capabilities *ContainerCapabilities `mandatory:"false" json:"capabilities"` } func (m CreateLinuxSecurityContextDetails) String() string { diff --git a/containerinstances/linux_security_context.go b/containerinstances/linux_security_context.go index c76b4b87be..d20abbade0 100644 --- a/containerinstances/linux_security_context.go +++ b/containerinstances/linux_security_context.go @@ -30,6 +30,8 @@ type LinuxSecurityContext struct { // Determines if the container will have a read-only root file system. Default value is false. IsRootFileSystemReadonly *bool `mandatory:"false" json:"isRootFileSystemReadonly"` + + Capabilities *ContainerCapabilities `mandatory:"false" json:"capabilities"` } func (m LinuxSecurityContext) String() string { diff --git a/containerinstances/retrieve_logs_request_response.go b/containerinstances/retrieve_logs_request_response.go index 93cc8ad38e..4e9e380279 100644 --- a/containerinstances/retrieve_logs_request_response.go +++ b/containerinstances/retrieve_logs_request_response.go @@ -25,8 +25,8 @@ type RetrieveLogsRequest 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"` - // Returns the logs for the previous run of the container in a pod if the pod exists. - // If the container fails for some reason, this parameter is useful to determine the root cause of the failure. + // Returns the logs for the previous run of the container in a pod. + // If the container fails, this parameter can help you to determine the root cause of the failure. IsPrevious *bool `mandatory:"false" contributesTo:"query" name:"isPrevious"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/core/emulated_volume_attachment.go b/core/emulated_volume_attachment.go index 00a35ebe3b..69c9b62cc0 100644 --- a/core/emulated_volume_attachment.go +++ b/core/emulated_volume_attachment.go @@ -67,6 +67,10 @@ type EmulatedVolumeAttachment struct { // Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. IsMultipath *bool `mandatory:"false" json:"isMultipath"` + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` + // The current state of the volume attachment. LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` @@ -145,6 +149,11 @@ func (m EmulatedVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLogi return m.IscsiLoginState } +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m EmulatedVolumeAttachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + func (m EmulatedVolumeAttachment) String() string { return common.PointerString(m) } diff --git a/core/i_scsi_volume_attachment.go b/core/i_scsi_volume_attachment.go index 5250d489df..8bd2559106 100644 --- a/core/i_scsi_volume_attachment.go +++ b/core/i_scsi_volume_attachment.go @@ -80,6 +80,10 @@ type IScsiVolumeAttachment struct { // Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. IsMultipath *bool `mandatory:"false" json:"isMultipath"` + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` + // The Challenge-Handshake-Authentication-Protocol (CHAP) secret // valid for the associated CHAP user name. // (Also called the "CHAP password".) @@ -178,6 +182,11 @@ func (m IScsiVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginSt return m.IscsiLoginState } +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m IScsiVolumeAttachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + func (m IScsiVolumeAttachment) String() string { return common.PointerString(m) } diff --git a/core/paravirtualized_volume_attachment.go b/core/paravirtualized_volume_attachment.go index e7d4c32fb8..4724b4b5a4 100644 --- a/core/paravirtualized_volume_attachment.go +++ b/core/paravirtualized_volume_attachment.go @@ -67,6 +67,10 @@ type ParavirtualizedVolumeAttachment struct { // Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. IsMultipath *bool `mandatory:"false" json:"isMultipath"` + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` + // The current state of the volume attachment. LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` @@ -145,6 +149,11 @@ func (m ParavirtualizedVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIs return m.IscsiLoginState } +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m ParavirtualizedVolumeAttachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + func (m ParavirtualizedVolumeAttachment) String() string { return common.PointerString(m) } diff --git a/core/volume_attachment.go b/core/volume_attachment.go index 22501334a6..9039ac97ec 100644 --- a/core/volume_attachment.go +++ b/core/volume_attachment.go @@ -79,6 +79,10 @@ type VolumeAttachment interface { // The iscsi login state of the volume attachment. For a Iscsi volume attachment, // all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state. GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum + + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + GetIsVolumeCreatedDuringLaunch() *bool } type volumeattachment struct { @@ -90,6 +94,7 @@ type volumeattachment struct { IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` IsMultipath *bool `mandatory:"false" json:"isMultipath"` IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` CompartmentId *string `mandatory:"true" json:"compartmentId"` Id *string `mandatory:"true" json:"id"` @@ -125,6 +130,7 @@ func (m *volumeattachment) UnmarshalJSON(data []byte) error { m.IsPvEncryptionInTransitEnabled = s.Model.IsPvEncryptionInTransitEnabled m.IsMultipath = s.Model.IsMultipath m.IscsiLoginState = s.Model.IscsiLoginState + m.IsVolumeCreatedDuringLaunch = s.Model.IsVolumeCreatedDuringLaunch m.AttachmentType = s.Model.AttachmentType return err @@ -192,6 +198,11 @@ func (m volumeattachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEn return m.IscsiLoginState } +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m volumeattachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + // GetAvailabilityDomain returns AvailabilityDomain func (m volumeattachment) GetAvailabilityDomain() *string { return m.AvailabilityDomain diff --git a/desktops/desktops_desktopservice_client.go b/desktops/desktops_desktopservice_client.go index 2a41a4c209..c996fb75f0 100644 --- a/desktops/desktops_desktopservice_client.go +++ b/desktops/desktops_desktopservice_client.go @@ -140,7 +140,7 @@ func (client DesktopServiceClient) cancelWorkRequest(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/WorkRequest/CancelWorkRequest" err = common.PostProcessServiceError(err, "DesktopService", "CancelWorkRequest", apiReferenceLink) return response, err } @@ -203,7 +203,7 @@ func (client DesktopServiceClient) changeDesktopPoolCompartment(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/ChangeDesktopPoolCompartment" err = common.PostProcessServiceError(err, "DesktopService", "ChangeDesktopPoolCompartment", apiReferenceLink) return response, err } @@ -266,7 +266,7 @@ func (client DesktopServiceClient) createDesktopPool(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/CreateDesktopPool" err = common.PostProcessServiceError(err, "DesktopService", "CreateDesktopPool", apiReferenceLink) return response, err } @@ -324,7 +324,7 @@ func (client DesktopServiceClient) deleteDesktop(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/Desktop/DeleteDesktop" err = common.PostProcessServiceError(err, "DesktopService", "DeleteDesktop", apiReferenceLink) return response, err } @@ -382,7 +382,7 @@ func (client DesktopServiceClient) deleteDesktopPool(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/DeleteDesktopPool" err = common.PostProcessServiceError(err, "DesktopService", "DeleteDesktopPool", apiReferenceLink) return response, err } @@ -440,7 +440,7 @@ func (client DesktopServiceClient) getDesktop(ctx context.Context, request commo defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/Desktop/GetDesktop" err = common.PostProcessServiceError(err, "DesktopService", "GetDesktop", apiReferenceLink) return response, err } @@ -498,7 +498,7 @@ func (client DesktopServiceClient) getDesktopPool(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/GetDesktopPool" err = common.PostProcessServiceError(err, "DesktopService", "GetDesktopPool", apiReferenceLink) return response, err } @@ -556,7 +556,7 @@ func (client DesktopServiceClient) getWorkRequest(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "DesktopService", "GetWorkRequest", apiReferenceLink) return response, err } @@ -614,7 +614,7 @@ func (client DesktopServiceClient) listDesktopPoolDesktops(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/ListDesktopPoolDesktops" err = common.PostProcessServiceError(err, "DesktopService", "ListDesktopPoolDesktops", apiReferenceLink) return response, err } @@ -672,7 +672,7 @@ func (client DesktopServiceClient) listDesktopPoolVolumes(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/ListDesktopPoolVolumes" err = common.PostProcessServiceError(err, "DesktopService", "ListDesktopPoolVolumes", apiReferenceLink) return response, err } @@ -730,7 +730,7 @@ func (client DesktopServiceClient) listDesktopPools(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/ListDesktopPools" err = common.PostProcessServiceError(err, "DesktopService", "ListDesktopPools", apiReferenceLink) return response, err } @@ -788,7 +788,7 @@ func (client DesktopServiceClient) listDesktops(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/Desktop/ListDesktops" err = common.PostProcessServiceError(err, "DesktopService", "ListDesktops", apiReferenceLink) return response, err } @@ -846,7 +846,7 @@ func (client DesktopServiceClient) listWorkRequestErrors(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/WorkRequestError/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "DesktopService", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -904,7 +904,7 @@ func (client DesktopServiceClient) listWorkRequestLogs(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/WorkRequestLogEntry/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "DesktopService", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -962,7 +962,7 @@ func (client DesktopServiceClient) listWorkRequests(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/WorkRequest/ListWorkRequests" err = common.PostProcessServiceError(err, "DesktopService", "ListWorkRequests", apiReferenceLink) return response, err } @@ -1025,7 +1025,7 @@ func (client DesktopServiceClient) startDesktop(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/Desktop/StartDesktop" err = common.PostProcessServiceError(err, "DesktopService", "StartDesktop", apiReferenceLink) return response, err } @@ -1088,7 +1088,7 @@ func (client DesktopServiceClient) startDesktopPool(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/StartDesktopPool" err = common.PostProcessServiceError(err, "DesktopService", "StartDesktopPool", apiReferenceLink) return response, err } @@ -1151,7 +1151,7 @@ func (client DesktopServiceClient) stopDesktop(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/Desktop/StopDesktop" err = common.PostProcessServiceError(err, "DesktopService", "StopDesktop", apiReferenceLink) return response, err } @@ -1214,7 +1214,7 @@ func (client DesktopServiceClient) stopDesktopPool(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/StopDesktopPool" err = common.PostProcessServiceError(err, "DesktopService", "StopDesktopPool", apiReferenceLink) return response, err } @@ -1272,7 +1272,7 @@ func (client DesktopServiceClient) updateDesktop(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/Desktop/UpdateDesktop" err = common.PostProcessServiceError(err, "DesktopService", "UpdateDesktop", apiReferenceLink) return response, err } @@ -1330,7 +1330,7 @@ func (client DesktopServiceClient) updateDesktopPool(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/secure-desktops/20220618/DesktopPool/UpdateDesktopPool" err = common.PostProcessServiceError(err, "DesktopService", "UpdateDesktopPool", apiReferenceLink) return response, err } diff --git a/opsi/create_news_report_details.go b/opsi/create_news_report_details.go index 7cebd958db..edfd251b9b 100644 --- a/opsi/create_news_report_details.go +++ b/opsi/create_news_report_details.go @@ -50,6 +50,12 @@ type CreateNewsReportDetails struct { // Defines if the news report will be enabled or disabled. Status ResourceStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Day of the week in which the news report will be sent if the frequency is set to WEEKLY. + DayOfWeek DayOfWeekEnum `mandatory:"false" json:"dayOfWeek,omitempty"` + + // A flag to consider the resources within a given compartment and all sub-compartments. + AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` } func (m CreateNewsReportDetails) String() string { @@ -71,6 +77,9 @@ func (m CreateNewsReportDetails) ValidateEnumValue() (bool, error) { if _, ok := GetMappingResourceStatusEnum(string(m.Status)); !ok && m.Status != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetResourceStatusEnumStringValues(), ","))) } + if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/opsi/day_of_week.go b/opsi/day_of_week.go new file mode 100644 index 0000000000..5fc954f55c --- /dev/null +++ b/opsi/day_of_week.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "strings" +) + +// DayOfWeekEnum Enum with underlying type: string +type DayOfWeekEnum string + +// Set of constants representing the allowable values for DayOfWeekEnum +const ( + DayOfWeekMonday DayOfWeekEnum = "MONDAY" + DayOfWeekTuesday DayOfWeekEnum = "TUESDAY" + DayOfWeekWednesday DayOfWeekEnum = "WEDNESDAY" + DayOfWeekThursday DayOfWeekEnum = "THURSDAY" + DayOfWeekFriday DayOfWeekEnum = "FRIDAY" + DayOfWeekSaturday DayOfWeekEnum = "SATURDAY" + DayOfWeekSunday DayOfWeekEnum = "SUNDAY" +) + +var mappingDayOfWeekEnum = map[string]DayOfWeekEnum{ + "MONDAY": DayOfWeekMonday, + "TUESDAY": DayOfWeekTuesday, + "WEDNESDAY": DayOfWeekWednesday, + "THURSDAY": DayOfWeekThursday, + "FRIDAY": DayOfWeekFriday, + "SATURDAY": DayOfWeekSaturday, + "SUNDAY": DayOfWeekSunday, +} + +var mappingDayOfWeekEnumLowerCase = map[string]DayOfWeekEnum{ + "monday": DayOfWeekMonday, + "tuesday": DayOfWeekTuesday, + "wednesday": DayOfWeekWednesday, + "thursday": DayOfWeekThursday, + "friday": DayOfWeekFriday, + "saturday": DayOfWeekSaturday, + "sunday": DayOfWeekSunday, +} + +// GetDayOfWeekEnumValues Enumerates the set of values for DayOfWeekEnum +func GetDayOfWeekEnumValues() []DayOfWeekEnum { + values := make([]DayOfWeekEnum, 0) + for _, v := range mappingDayOfWeekEnum { + values = append(values, v) + } + return values +} + +// GetDayOfWeekEnumStringValues Enumerates the set of values in String for DayOfWeekEnum +func GetDayOfWeekEnumStringValues() []string { + return []string{ + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY", + } +} + +// GetMappingDayOfWeekEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDayOfWeekEnum(val string) (DayOfWeekEnum, bool) { + enum, ok := mappingDayOfWeekEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/news_content_types.go b/opsi/news_content_types.go index fdbef30a61..20820763c1 100644 --- a/opsi/news_content_types.go +++ b/opsi/news_content_types.go @@ -21,7 +21,25 @@ import ( type NewsContentTypes struct { // Supported resources for capacity planning content type. - CapacityPlanningResources []NewsContentTypesResourceEnum `mandatory:"true" json:"capacityPlanningResources"` + CapacityPlanningResources []NewsContentTypesResourceEnum `mandatory:"false" json:"capacityPlanningResources"` + + // Supported resources for SQL insights - fleet analysis content type. + SqlInsightsFleetAnalysisResources []NewsSqlInsightsContentTypesResourceEnum `mandatory:"false" json:"sqlInsightsFleetAnalysisResources"` + + // Supported resources for SQL insights - plan changes content type. + SqlInsightsPlanChangesResources []NewsSqlInsightsContentTypesResourceEnum `mandatory:"false" json:"sqlInsightsPlanChangesResources"` + + // Supported resources for SQL insights - top databases content type. + SqlInsightsTopDatabasesResources []NewsSqlInsightsContentTypesResourceEnum `mandatory:"false" json:"sqlInsightsTopDatabasesResources"` + + // Supported resources for SQL insights - top SQL by insights content type. + SqlInsightsTopSqlByInsightsResources []NewsSqlInsightsContentTypesResourceEnum `mandatory:"false" json:"sqlInsightsTopSqlByInsightsResources"` + + // Supported resources for SQL insights - top SQL content type. + SqlInsightsTopSqlResources []NewsSqlInsightsContentTypesResourceEnum `mandatory:"false" json:"sqlInsightsTopSqlResources"` + + // Supported resources for SQL insights - performance degradation content type. + SqlInsightsPerformanceDegradationResources []NewsSqlInsightsContentTypesResourceEnum `mandatory:"false" json:"sqlInsightsPerformanceDegradationResources"` } func (m NewsContentTypes) String() string { diff --git a/opsi/news_report.go b/opsi/news_report.go index cb5c7f29b9..1cfcbaf16c 100644 --- a/opsi/news_report.go +++ b/opsi/news_report.go @@ -69,6 +69,12 @@ type NewsReport struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Day of the week in which the news report will be sent if the frequency is set to WEEKLY. + DayOfWeek DayOfWeekEnum `mandatory:"false" json:"dayOfWeek,omitempty"` + + // A flag to consider the resources within a given compartment and all sub-compartments. + AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` } func (m NewsReport) String() string { @@ -93,6 +99,9 @@ func (m NewsReport) ValidateEnumValue() (bool, error) { if _, ok := GetMappingLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/opsi/news_report_summary.go b/opsi/news_report_summary.go index 3dbd1ff563..55ef78a37d 100644 --- a/opsi/news_report_summary.go +++ b/opsi/news_report_summary.go @@ -69,6 +69,12 @@ type NewsReportSummary struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Day of the week in which the news report will be sent if the frequency is set to WEEKLY. + DayOfWeek DayOfWeekEnum `mandatory:"false" json:"dayOfWeek,omitempty"` + + // A flag to consider the resources within a given compartment and all sub-compartments. + AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` } func (m NewsReportSummary) String() string { @@ -93,6 +99,9 @@ func (m NewsReportSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/opsi/news_sql_insights_content_types_resource.go b/opsi/news_sql_insights_content_types_resource.go new file mode 100644 index 0000000000..108e76f682 --- /dev/null +++ b/opsi/news_sql_insights_content_types_resource.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "strings" +) + +// NewsSqlInsightsContentTypesResourceEnum Enum with underlying type: string +type NewsSqlInsightsContentTypesResourceEnum string + +// Set of constants representing the allowable values for NewsSqlInsightsContentTypesResourceEnum +const ( + NewsSqlInsightsContentTypesResourceDatabase NewsSqlInsightsContentTypesResourceEnum = "DATABASE" + NewsSqlInsightsContentTypesResourceExadata NewsSqlInsightsContentTypesResourceEnum = "EXADATA" +) + +var mappingNewsSqlInsightsContentTypesResourceEnum = map[string]NewsSqlInsightsContentTypesResourceEnum{ + "DATABASE": NewsSqlInsightsContentTypesResourceDatabase, + "EXADATA": NewsSqlInsightsContentTypesResourceExadata, +} + +var mappingNewsSqlInsightsContentTypesResourceEnumLowerCase = map[string]NewsSqlInsightsContentTypesResourceEnum{ + "database": NewsSqlInsightsContentTypesResourceDatabase, + "exadata": NewsSqlInsightsContentTypesResourceExadata, +} + +// GetNewsSqlInsightsContentTypesResourceEnumValues Enumerates the set of values for NewsSqlInsightsContentTypesResourceEnum +func GetNewsSqlInsightsContentTypesResourceEnumValues() []NewsSqlInsightsContentTypesResourceEnum { + values := make([]NewsSqlInsightsContentTypesResourceEnum, 0) + for _, v := range mappingNewsSqlInsightsContentTypesResourceEnum { + values = append(values, v) + } + return values +} + +// GetNewsSqlInsightsContentTypesResourceEnumStringValues Enumerates the set of values in String for NewsSqlInsightsContentTypesResourceEnum +func GetNewsSqlInsightsContentTypesResourceEnumStringValues() []string { + return []string{ + "DATABASE", + "EXADATA", + } +} + +// GetMappingNewsSqlInsightsContentTypesResourceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNewsSqlInsightsContentTypesResourceEnum(val string) (NewsSqlInsightsContentTypesResourceEnum, bool) { + enum, ok := mappingNewsSqlInsightsContentTypesResourceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/update_host_insight_details.go b/opsi/update_host_insight_details.go index 931410d0b7..07dbce550d 100644 --- a/opsi/update_host_insight_details.go +++ b/opsi/update_host_insight_details.go @@ -76,6 +76,10 @@ func (m *updatehostinsightdetails) UnmarshalPolymorphicJSON(data []byte) (interf mm := UpdateMacsManagedCloudHostInsightDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "PE_COMANAGED_HOST": + mm := UpdatePeComanagedHostInsightDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for UpdateHostInsightDetails: %s.", m.EntitySource) return *m, nil diff --git a/opsi/update_news_report_details.go b/opsi/update_news_report_details.go index 0d53821dde..a77d18f152 100644 --- a/opsi/update_news_report_details.go +++ b/opsi/update_news_report_details.go @@ -41,6 +41,18 @@ type UpdateNewsReportDetails struct { // Defined tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The news report name. + Name *string `mandatory:"false" json:"name"` + + // The description of the news report. + Description *string `mandatory:"false" json:"description"` + + // Day of the week in which the news report will be sent if the frequency is set to WEEKLY. + DayOfWeek DayOfWeekEnum `mandatory:"false" json:"dayOfWeek,omitempty"` + + // A flag to consider the resources within a given compartment and all sub-compartments. + AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` } func (m UpdateNewsReportDetails) String() string { @@ -62,6 +74,9 @@ func (m UpdateNewsReportDetails) ValidateEnumValue() (bool, error) { if _, ok := GetMappingNewsLocaleEnum(string(m.Locale)); !ok && m.Locale != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Locale: %s. Supported values are: %s.", m.Locale, strings.Join(GetNewsLocaleEnumStringValues(), ","))) } + if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/opsi/update_pe_comanaged_host_insight_details.go b/opsi/update_pe_comanaged_host_insight_details.go new file mode 100644 index 0000000000..f22c706f72 --- /dev/null +++ b/opsi/update_pe_comanaged_host_insight_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePeComanagedHostInsightDetails The information to be updated. +type UpdatePeComanagedHostInsightDetails struct { + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +// GetFreeformTags returns FreeformTags +func (m UpdatePeComanagedHostInsightDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdatePeComanagedHostInsightDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdatePeComanagedHostInsightDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePeComanagedHostInsightDetails) 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 UpdatePeComanagedHostInsightDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdatePeComanagedHostInsightDetails UpdatePeComanagedHostInsightDetails + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeUpdatePeComanagedHostInsightDetails + }{ + "PE_COMANAGED_HOST", + (MarshalTypeUpdatePeComanagedHostInsightDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/ospgateway/ospgateway_addressruleservice_client.go b/ospgateway/ospgateway_addressruleservice_client.go index beb468b6a1..fb3c91ebbd 100644 --- a/ospgateway/ospgateway_addressruleservice_client.go +++ b/ospgateway/ospgateway_addressruleservice_client.go @@ -67,7 +67,7 @@ func newAddressRuleServiceClientFromBaseClient(baseClient common.BaseClient, con // SetRegion overrides the region of this client. func (client *AddressRuleServiceClient) SetRegion(region string) { - client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://ospap.oracle.com") + client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://osp-oci-integ.osp.{region}.oci.{secondLevelDomain}") } // SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid diff --git a/ospgateway/ospgateway_addressservice_client.go b/ospgateway/ospgateway_addressservice_client.go index 53b8d8e01c..9f133eb1ff 100644 --- a/ospgateway/ospgateway_addressservice_client.go +++ b/ospgateway/ospgateway_addressservice_client.go @@ -67,7 +67,7 @@ func newAddressServiceClientFromBaseClient(baseClient common.BaseClient, configP // SetRegion overrides the region of this client. func (client *AddressServiceClient) SetRegion(region string) { - client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://ospap.oracle.com") + client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://osp-oci-integ.osp.{region}.oci.{secondLevelDomain}") } // SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid diff --git a/ospgateway/ospgateway_invoiceservice_client.go b/ospgateway/ospgateway_invoiceservice_client.go index 4115d6f369..3106cf9b80 100644 --- a/ospgateway/ospgateway_invoiceservice_client.go +++ b/ospgateway/ospgateway_invoiceservice_client.go @@ -67,7 +67,7 @@ func newInvoiceServiceClientFromBaseClient(baseClient common.BaseClient, configP // SetRegion overrides the region of this client. func (client *InvoiceServiceClient) SetRegion(region string) { - client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://ospap.oracle.com") + client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://osp-oci-integ.osp.{region}.oci.{secondLevelDomain}") } // SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid diff --git a/ospgateway/ospgateway_subscriptionservice_client.go b/ospgateway/ospgateway_subscriptionservice_client.go index 3af53127a1..f2978ec386 100644 --- a/ospgateway/ospgateway_subscriptionservice_client.go +++ b/ospgateway/ospgateway_subscriptionservice_client.go @@ -67,7 +67,7 @@ func newSubscriptionServiceClientFromBaseClient(baseClient common.BaseClient, co // SetRegion overrides the region of this client. func (client *SubscriptionServiceClient) SetRegion(region string) { - client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://ospap.oracle.com") + client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://osp-oci-integ.osp.{region}.oci.{secondLevelDomain}") } // SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid diff --git a/sch/sch_connectorplugins_client.go b/sch/sch_connectorplugins_client.go index 6e2b9b969d..869a176576 100644 --- a/sch/sch_connectorplugins_client.go +++ b/sch/sch_connectorplugins_client.go @@ -143,7 +143,7 @@ func (client ConnectorPluginsClient) getConnectorPlugin(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ConnectorPlugin/GetConnectorPlugin" err = common.PostProcessServiceError(err, "ConnectorPlugins", "GetConnectorPlugin", apiReferenceLink) return response, err } @@ -201,7 +201,7 @@ func (client ConnectorPluginsClient) listConnectorPlugins(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ConnectorPluginSummary/ListConnectorPlugins" err = common.PostProcessServiceError(err, "ConnectorPlugins", "ListConnectorPlugins", apiReferenceLink) return response, err } diff --git a/sch/sch_serviceconnector_client.go b/sch/sch_serviceconnector_client.go index f7d940bae9..e805c75708 100644 --- a/sch/sch_serviceconnector_client.go +++ b/sch/sch_serviceconnector_client.go @@ -153,7 +153,7 @@ func (client ServiceConnectorClient) activateServiceConnector(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/ActivateServiceConnector" err = common.PostProcessServiceError(err, "ServiceConnector", "ActivateServiceConnector", apiReferenceLink) return response, err } @@ -214,7 +214,7 @@ func (client ServiceConnectorClient) changeServiceConnectorCompartment(ctx conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/ChangeServiceConnectorCompartment" err = common.PostProcessServiceError(err, "ServiceConnector", "ChangeServiceConnectorCompartment", apiReferenceLink) return response, err } @@ -294,7 +294,7 @@ func (client ServiceConnectorClient) createServiceConnector(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/CreateServiceConnector" err = common.PostProcessServiceError(err, "ServiceConnector", "CreateServiceConnector", apiReferenceLink) return response, err } @@ -361,7 +361,7 @@ func (client ServiceConnectorClient) deactivateServiceConnector(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/DeactivateServiceConnector" err = common.PostProcessServiceError(err, "ServiceConnector", "DeactivateServiceConnector", apiReferenceLink) return response, err } @@ -423,7 +423,7 @@ func (client ServiceConnectorClient) deleteServiceConnector(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/DeleteServiceConnector" err = common.PostProcessServiceError(err, "ServiceConnector", "DeleteServiceConnector", apiReferenceLink) return response, err } @@ -483,7 +483,7 @@ func (client ServiceConnectorClient) getServiceConnector(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/GetServiceConnector" err = common.PostProcessServiceError(err, "ServiceConnector", "GetServiceConnector", apiReferenceLink) return response, err } @@ -543,7 +543,7 @@ func (client ServiceConnectorClient) getWorkRequest(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "ServiceConnector", "GetWorkRequest", apiReferenceLink) return response, err } @@ -603,7 +603,7 @@ func (client ServiceConnectorClient) listServiceConnectors(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/ListServiceConnectors" err = common.PostProcessServiceError(err, "ServiceConnector", "ListServiceConnectors", apiReferenceLink) return response, err } @@ -663,7 +663,7 @@ func (client ServiceConnectorClient) listWorkRequestErrors(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/WorkRequestError/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "ServiceConnector", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -723,7 +723,7 @@ func (client ServiceConnectorClient) listWorkRequestLogs(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/WorkRequestLogEntry/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "ServiceConnector", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -783,7 +783,7 @@ func (client ServiceConnectorClient) listWorkRequests(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/WorkRequest/ListWorkRequests" err = common.PostProcessServiceError(err, "ServiceConnector", "ListWorkRequests", apiReferenceLink) return response, err } @@ -846,7 +846,7 @@ func (client ServiceConnectorClient) updateServiceConnector(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/UpdateServiceConnector" err = common.PostProcessServiceError(err, "ServiceConnector", "UpdateServiceConnector", apiReferenceLink) return response, err }