diff --git a/CHANGELOG.md b/CHANGELOG.md index e009a16f24..c5777ee96e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.43.0 - 2023-07-11 +### Added +- Support for specifying default snapshot enablement, verified response codes, client certificate details, and request authentication schemes when creating or updating synthetic monitors in the Application Performance Monitoring service +- Support for address rules, address verification, and requesting addresses in the OSP Gateway service +- Support for synchronous operations in the Document Understanding service +- Support for migration without SSH to database hosts (DMS) in the Database Migration service +- Support for processing workload mappings in the Container Engine for Kubernetes service +- Support for Salesforce, MySQL HeatWave, and Oracle EBS, Sieble, and PeopleSoft connectors in the Data Integration service +- Support for updating the envelope key of a volume backup in the Block Volume service + +### Breaking Changes +- Support for retries by default on operations of the OSP Gateway service +- The type of property `BillingAddress` was changed from `*BillingAddress` to `*Address` in the `Subscription` and `SubscriptionSummary` models in the OSP Gateway service + + ## 65.42.0 - 2023-06-27 ### Added - Support for calling Oracle Cloud Infrastructure services in the eu-frankfurt-2 region diff --git a/aidocument/aidocument_aiservicedocument_client.go b/aidocument/aidocument_aiservicedocument_client.go index f5d9e6dfb8..b7fe69476f 100644 --- a/aidocument/aidocument_aiservicedocument_client.go +++ b/aidocument/aidocument_aiservicedocument_client.go @@ -88,6 +88,64 @@ func (client *AIServiceDocumentClient) ConfigurationProvider() *common.Configura return client.config } +// AnalyzeDocument Perform different types of document analysis. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aidocument/AnalyzeDocument.go.html to see an example of how to use AnalyzeDocument API. +// A default retry strategy applies to this operation AnalyzeDocument() +func (client AIServiceDocumentClient) AnalyzeDocument(ctx context.Context, request AnalyzeDocumentRequest) (response AnalyzeDocumentResponse, 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.analyzeDocument, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AnalyzeDocumentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AnalyzeDocumentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AnalyzeDocumentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AnalyzeDocumentResponse") + } + return +} + +// analyzeDocument implements the OCIOperation interface (enables retrying operations) +func (client AIServiceDocumentClient) analyzeDocument(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/actions/analyzeDocument", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response AnalyzeDocumentResponse + 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/document-understanding/20221109/AnalyzeDocumentResult/AnalyzeDocument" + err = common.PostProcessServiceError(err, "AIServiceDocument", "AnalyzeDocument", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CancelProcessorJob Cancel a processor job. // // See also @@ -1141,6 +1199,63 @@ func (client AIServiceDocumentClient) listWorkRequests(ctx context.Context, requ return response, err } +// PatchModel Updates the model metadata only selected path parameter. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aidocument/PatchModel.go.html to see an example of how to use PatchModel API. +func (client AIServiceDocumentClient) PatchModel(ctx context.Context, request PatchModelRequest) (response PatchModelResponse, 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.patchModel, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PatchModelResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PatchModelResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PatchModelResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchModelResponse") + } + return +} + +// patchModel implements the OCIOperation interface (enables retrying operations) +func (client AIServiceDocumentClient) patchModel(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/models/{modelId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PatchModelResponse + 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/document-understanding/20221109/Model/PatchModel" + err = common.PostProcessServiceError(err, "AIServiceDocument", "PatchModel", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateModel Updates the model metadata. // // See also diff --git a/aidocument/analyze_document_details.go b/aidocument/analyze_document_details.go new file mode 100644 index 0000000000..a14f54c4c6 --- /dev/null +++ b/aidocument/analyze_document_details.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AnalyzeDocumentDetails The details of how to analyze a document. +type AnalyzeDocumentDetails struct { + + // The types of document analysis requested. + Features []DocumentFeature `mandatory:"true" json:"features"` + + Document DocumentDetails `mandatory:"true" json:"document"` + + // The compartment identifier. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + OutputLocation *OutputLocation `mandatory:"false" json:"outputLocation"` + + // The document language, abbreviated according to the BCP 47 syntax. + Language *string `mandatory:"false" json:"language"` + + // The document type. + DocumentType DocumentTypeEnum `mandatory:"false" json:"documentType,omitempty"` + + OcrData *AnalyzeDocumentResult `mandatory:"false" json:"ocrData"` +} + +func (m AnalyzeDocumentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AnalyzeDocumentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDocumentTypeEnum(string(m.DocumentType)); !ok && m.DocumentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DocumentType: %s. Supported values are: %s.", m.DocumentType, strings.Join(GetDocumentTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *AnalyzeDocumentDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompartmentId *string `json:"compartmentId"` + OutputLocation *OutputLocation `json:"outputLocation"` + Language *string `json:"language"` + DocumentType DocumentTypeEnum `json:"documentType"` + OcrData *AnalyzeDocumentResult `json:"ocrData"` + Features []documentfeature `json:"features"` + Document documentdetails `json:"document"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompartmentId = model.CompartmentId + + m.OutputLocation = model.OutputLocation + + m.Language = model.Language + + m.DocumentType = model.DocumentType + + m.OcrData = model.OcrData + + m.Features = make([]DocumentFeature, len(model.Features)) + for i, n := range model.Features { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Features[i] = nn.(DocumentFeature) + } else { + m.Features[i] = nil + } + } + + nn, e = model.Document.UnmarshalPolymorphicJSON(model.Document.JsonData) + if e != nil { + return + } + if nn != nil { + m.Document = nn.(DocumentDetails) + } else { + m.Document = nil + } + + return +} diff --git a/aidocument/analyze_document_request_response.go b/aidocument/analyze_document_request_response.go new file mode 100644 index 0000000000..581f2f21c4 --- /dev/null +++ b/aidocument/analyze_document_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 aidocument + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AnalyzeDocumentRequest wrapper for the AnalyzeDocument operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aidocument/AnalyzeDocument.go.html to see an example of how to use AnalyzeDocumentRequest. +type AnalyzeDocumentRequest struct { + + // The details of how to analyze a document. + AnalyzeDocumentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AnalyzeDocumentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AnalyzeDocumentRequest) 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 AnalyzeDocumentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AnalyzeDocumentRequest) 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 AnalyzeDocumentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AnalyzeDocumentResponse wrapper for the AnalyzeDocument operation +type AnalyzeDocumentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AnalyzeDocumentResult instance + AnalyzeDocumentResult `presentIn:"body"` + + // The full URI of the resource related to the request + ContentLocation *string `presentIn:"header" name:"content-location"` + + // The full URI of the resource related to the request + Location *string `presentIn:"header" name:"location"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A 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 AnalyzeDocumentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AnalyzeDocumentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/aidocument/component_model.go b/aidocument/component_model.go new file mode 100644 index 0000000000..ae006ba87c --- /dev/null +++ b/aidocument/component_model.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. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComponentModel The custom model selected for Composition. +type ComponentModel struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of active custom Key Value model that need to be composed. + ModelId *string `mandatory:"true" json:"modelId"` +} + +func (m ComponentModel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComponentModel) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aidocument/create_model_details.go b/aidocument/create_model_details.go index 0b073c3926..db5b613da5 100644 --- a/aidocument/create_model_details.go +++ b/aidocument/create_model_details.go @@ -49,6 +49,12 @@ type CreateModelDetails struct { ValidationDataset Dataset `mandatory:"false" json:"validationDataset"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) list of active custom Key Value models that need to be composed. + ComponentModels []ComponentModel `mandatory:"false" json:"componentModels"` + + // the alias name of the model. + AliasName *string `mandatory:"false" json:"aliasName"` + // A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. // For example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -87,6 +93,8 @@ func (m *CreateModelDetails) UnmarshalJSON(data []byte) (e error) { MaxTrainingTimeInHours *float64 `json:"maxTrainingTimeInHours"` TestingDataset dataset `json:"testingDataset"` ValidationDataset dataset `json:"validationDataset"` + ComponentModels []ComponentModel `json:"componentModels"` + AliasName *string `json:"aliasName"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` ModelType ModelModelTypeEnum `json:"modelType"` @@ -130,6 +138,13 @@ func (m *CreateModelDetails) UnmarshalJSON(data []byte) (e error) { m.ValidationDataset = nil } + m.ComponentModels = make([]ComponentModel, len(model.ComponentModels)) + for i, n := range model.ComponentModels { + m.ComponentModels[i] = n + } + + m.AliasName = model.AliasName + m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/aidocument/detected_document_type.go b/aidocument/detected_document_type.go index 14a68ac277..1002a0ac9b 100644 --- a/aidocument/detected_document_type.go +++ b/aidocument/detected_document_type.go @@ -23,6 +23,9 @@ type DetectedDocumentType struct { // The confidence score between 0 and 1. Confidence *float32 `mandatory:"true" json:"confidence"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Key-Value Extraction model that was used to extract the key-value pairs. + DocumentId *string `mandatory:"false" json:"documentId"` } func (m DetectedDocumentType) String() string { diff --git a/aidocument/document_classification_feature.go b/aidocument/document_classification_feature.go index 555288a3bc..409e02098b 100644 --- a/aidocument/document_classification_feature.go +++ b/aidocument/document_classification_feature.go @@ -24,6 +24,9 @@ type DocumentClassificationFeature struct { // The custom model ID. ModelId *string `mandatory:"false" json:"modelId"` + + // The custom model tenancy ID when modelId represents aliasName. + TenancyId *string `mandatory:"false" json:"tenancyId"` } func (m DocumentClassificationFeature) String() string { diff --git a/aidocument/document_details.go b/aidocument/document_details.go new file mode 100644 index 0000000000..66de9266d2 --- /dev/null +++ b/aidocument/document_details.go @@ -0,0 +1,123 @@ +// 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. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DocumentDetails The details of a document to analyze. +type DocumentDetails interface { +} + +type documentdetails struct { + JsonData []byte + Source string `json:"source"` +} + +// UnmarshalJSON unmarshals json +func (m *documentdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerdocumentdetails documentdetails + s := struct { + Model Unmarshalerdocumentdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Source = s.Model.Source + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *documentdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Source { + case "OBJECT_STORAGE": + mm := ObjectStorageDocumentDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INLINE": + mm := InlineDocumentDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for DocumentDetails: %s.", m.Source) + return *m, nil + } +} + +func (m documentdetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m documentdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DocumentDetailsSourceEnum Enum with underlying type: string +type DocumentDetailsSourceEnum string + +// Set of constants representing the allowable values for DocumentDetailsSourceEnum +const ( + DocumentDetailsSourceInline DocumentDetailsSourceEnum = "INLINE" + DocumentDetailsSourceObjectStorage DocumentDetailsSourceEnum = "OBJECT_STORAGE" +) + +var mappingDocumentDetailsSourceEnum = map[string]DocumentDetailsSourceEnum{ + "INLINE": DocumentDetailsSourceInline, + "OBJECT_STORAGE": DocumentDetailsSourceObjectStorage, +} + +var mappingDocumentDetailsSourceEnumLowerCase = map[string]DocumentDetailsSourceEnum{ + "inline": DocumentDetailsSourceInline, + "object_storage": DocumentDetailsSourceObjectStorage, +} + +// GetDocumentDetailsSourceEnumValues Enumerates the set of values for DocumentDetailsSourceEnum +func GetDocumentDetailsSourceEnumValues() []DocumentDetailsSourceEnum { + values := make([]DocumentDetailsSourceEnum, 0) + for _, v := range mappingDocumentDetailsSourceEnum { + values = append(values, v) + } + return values +} + +// GetDocumentDetailsSourceEnumStringValues Enumerates the set of values in String for DocumentDetailsSourceEnum +func GetDocumentDetailsSourceEnumStringValues() []string { + return []string{ + "INLINE", + "OBJECT_STORAGE", + } +} + +// GetMappingDocumentDetailsSourceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDocumentDetailsSourceEnum(val string) (DocumentDetailsSourceEnum, bool) { + enum, ok := mappingDocumentDetailsSourceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/aidocument/document_key_value_extraction_feature.go b/aidocument/document_key_value_extraction_feature.go index 1fd38f6d07..4e0b32bf53 100644 --- a/aidocument/document_key_value_extraction_feature.go +++ b/aidocument/document_key_value_extraction_feature.go @@ -21,6 +21,9 @@ type DocumentKeyValueExtractionFeature struct { // The custom model ID. ModelId *string `mandatory:"false" json:"modelId"` + + // The custom model tenancy ID when modelId represents aliasName. + TenancyId *string `mandatory:"false" json:"tenancyId"` } func (m DocumentKeyValueExtractionFeature) String() string { diff --git a/aidocument/inline_document_details.go b/aidocument/inline_document_details.go new file mode 100644 index 0000000000..2e30f1d779 --- /dev/null +++ b/aidocument/inline_document_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. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InlineDocumentDetails The document incorporated in the request payload. +type InlineDocumentDetails struct { + + // Raw document data with Base64 encoding. + Data []byte `mandatory:"true" json:"data"` +} + +func (m InlineDocumentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InlineDocumentDetails) 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 InlineDocumentDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInlineDocumentDetails InlineDocumentDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeInlineDocumentDetails + }{ + "INLINE", + (MarshalTypeInlineDocumentDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/aidocument/model.go b/aidocument/model.go index cfb1bfef01..3b920d0a30 100644 --- a/aidocument/model.go +++ b/aidocument/model.go @@ -28,8 +28,6 @@ type Model struct { // The type of the Document model. ModelType ModelModelTypeEnum `mandatory:"true" json:"modelType"` - TrainingDataset Dataset `mandatory:"true" json:"trainingDataset"` - // The version of the model. ModelVersion *string `mandatory:"true" json:"modelVersion"` @@ -48,6 +46,12 @@ type Model struct { // An optional description of the model. Description *string `mandatory:"false" json:"description"` + // The tenancy id of the model. + TenancyId *string `mandatory:"false" json:"tenancyId"` + + // the alias name of the model. + AliasName *string `mandatory:"false" json:"aliasName"` + // The collection of labels used to train the custom model. Labels []string `mandatory:"false" json:"labels"` @@ -60,10 +64,18 @@ type Model struct { // The total hours actually used for model training. TrainedTimeInHours *float64 `mandatory:"false" json:"trainedTimeInHours"` + TrainingDataset Dataset `mandatory:"false" json:"trainingDataset"` + TestingDataset Dataset `mandatory:"false" json:"testingDataset"` ValidationDataset Dataset `mandatory:"false" json:"validationDataset"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) collection of active custom Key Value models that need to be composed. + ComponentModels []ComponentModel `mandatory:"false" json:"componentModels"` + + // Set to true when the model is created by using multiple key value extraction models. + IsComposedModel *bool `mandatory:"false" json:"isComposedModel"` + // When the model was updated, as an RFC3339 datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` @@ -112,12 +124,17 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { model := struct { DisplayName *string `json:"displayName"` Description *string `json:"description"` + TenancyId *string `json:"tenancyId"` + AliasName *string `json:"aliasName"` Labels []string `json:"labels"` IsQuickMode *bool `json:"isQuickMode"` MaxTrainingTimeInHours *float64 `json:"maxTrainingTimeInHours"` TrainedTimeInHours *float64 `json:"trainedTimeInHours"` + TrainingDataset dataset `json:"trainingDataset"` TestingDataset dataset `json:"testingDataset"` ValidationDataset dataset `json:"validationDataset"` + ComponentModels []ComponentModel `json:"componentModels"` + IsComposedModel *bool `json:"isComposedModel"` TimeUpdated *common.SDKTime `json:"timeUpdated"` LifecycleDetails *string `json:"lifecycleDetails"` Metrics modelmetrics `json:"metrics"` @@ -127,7 +144,6 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { Id *string `json:"id"` CompartmentId *string `json:"compartmentId"` ModelType ModelModelTypeEnum `json:"modelType"` - TrainingDataset dataset `json:"trainingDataset"` ModelVersion *string `json:"modelVersion"` ProjectId *string `json:"projectId"` TimeCreated *common.SDKTime `json:"timeCreated"` @@ -143,6 +159,10 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { m.Description = model.Description + m.TenancyId = model.TenancyId + + m.AliasName = model.AliasName + m.Labels = make([]string, len(model.Labels)) for i, n := range model.Labels { m.Labels[i] = n @@ -154,6 +174,16 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { m.TrainedTimeInHours = model.TrainedTimeInHours + nn, e = model.TrainingDataset.UnmarshalPolymorphicJSON(model.TrainingDataset.JsonData) + if e != nil { + return + } + if nn != nil { + m.TrainingDataset = nn.(Dataset) + } else { + m.TrainingDataset = nil + } + nn, e = model.TestingDataset.UnmarshalPolymorphicJSON(model.TestingDataset.JsonData) if e != nil { return @@ -174,6 +204,13 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { m.ValidationDataset = nil } + m.ComponentModels = make([]ComponentModel, len(model.ComponentModels)) + for i, n := range model.ComponentModels { + m.ComponentModels[i] = n + } + + m.IsComposedModel = model.IsComposedModel + m.TimeUpdated = model.TimeUpdated m.LifecycleDetails = model.LifecycleDetails @@ -200,16 +237,6 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { m.ModelType = model.ModelType - nn, e = model.TrainingDataset.UnmarshalPolymorphicJSON(model.TrainingDataset.JsonData) - if e != nil { - return - } - if nn != nil { - m.TrainingDataset = nn.(Dataset) - } else { - m.TrainingDataset = nil - } - m.ModelVersion = model.ModelVersion m.ProjectId = model.ProjectId diff --git a/aidocument/model_summary.go b/aidocument/model_summary.go index fb419ebd7c..7beec7e6a7 100644 --- a/aidocument/model_summary.go +++ b/aidocument/model_summary.go @@ -55,12 +55,24 @@ type ModelSummary struct { // The precision of the trained model. Precision *float32 `mandatory:"false" json:"precision"` + // The tenancy id of the model. + TenancyId *string `mandatory:"false" json:"tenancyId"` + + // the alias name of the model. + AliasName *string `mandatory:"false" json:"aliasName"` + TrainingDataset Dataset `mandatory:"false" json:"trainingDataset"` TestingDataset Dataset `mandatory:"false" json:"testingDataset"` ValidationDataset Dataset `mandatory:"false" json:"validationDataset"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) list of active custom Key Value models that need to be composed. + ComponentModels []ComponentModel `mandatory:"false" json:"componentModels"` + + // Set to true when the model is created by using multiple key value extraction models. + IsComposedModel *bool `mandatory:"false" json:"isComposedModel"` + // A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. // For example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -104,9 +116,13 @@ func (m *ModelSummary) UnmarshalJSON(data []byte) (e error) { TimeUpdated *common.SDKTime `json:"timeUpdated"` LifecycleDetails *string `json:"lifecycleDetails"` Precision *float32 `json:"precision"` + TenancyId *string `json:"tenancyId"` + AliasName *string `json:"aliasName"` TrainingDataset dataset `json:"trainingDataset"` TestingDataset dataset `json:"testingDataset"` ValidationDataset dataset `json:"validationDataset"` + ComponentModels []ComponentModel `json:"componentModels"` + IsComposedModel *bool `json:"isComposedModel"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` SystemTags map[string]map[string]interface{} `json:"systemTags"` @@ -134,6 +150,10 @@ func (m *ModelSummary) UnmarshalJSON(data []byte) (e error) { m.Precision = model.Precision + m.TenancyId = model.TenancyId + + m.AliasName = model.AliasName + nn, e = model.TrainingDataset.UnmarshalPolymorphicJSON(model.TrainingDataset.JsonData) if e != nil { return @@ -164,6 +184,13 @@ func (m *ModelSummary) UnmarshalJSON(data []byte) (e error) { m.ValidationDataset = nil } + m.ComponentModels = make([]ComponentModel, len(model.ComponentModels)) + for i, n := range model.ComponentModels { + m.ComponentModels[i] = n + } + + m.IsComposedModel = model.IsComposedModel + m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/aidocument/object_storage_document_details.go b/aidocument/object_storage_document_details.go new file mode 100644 index 0000000000..c664a1773d --- /dev/null +++ b/aidocument/object_storage_document_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectStorageDocumentDetails A document in OCI Object Storage. +type ObjectStorageDocumentDetails struct { + + // The Object Storage namespace. + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // The Object Storage bucket name. + BucketName *string `mandatory:"true" json:"bucketName"` + + // The Object Storage object name. + ObjectName *string `mandatory:"true" json:"objectName"` +} + +func (m ObjectStorageDocumentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectStorageDocumentDetails) 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 ObjectStorageDocumentDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeObjectStorageDocumentDetails ObjectStorageDocumentDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeObjectStorageDocumentDetails + }{ + "OBJECT_STORAGE", + (MarshalTypeObjectStorageDocumentDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/aidocument/operation_type.go b/aidocument/operation_type.go index 02e8518a16..c665ac849c 100644 --- a/aidocument/operation_type.go +++ b/aidocument/operation_type.go @@ -26,6 +26,7 @@ const ( OperationTypeUpdateModel OperationTypeEnum = "UPDATE_MODEL" OperationTypeDeleteModel OperationTypeEnum = "DELETE_MODEL" OperationTypeMoveModel OperationTypeEnum = "MOVE_MODEL" + OperationTypeComposeModel OperationTypeEnum = "COMPOSE_MODEL" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -37,6 +38,7 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "UPDATE_MODEL": OperationTypeUpdateModel, "DELETE_MODEL": OperationTypeDeleteModel, "MOVE_MODEL": OperationTypeMoveModel, + "COMPOSE_MODEL": OperationTypeComposeModel, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -48,6 +50,7 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "update_model": OperationTypeUpdateModel, "delete_model": OperationTypeDeleteModel, "move_model": OperationTypeMoveModel, + "compose_model": OperationTypeComposeModel, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -70,6 +73,7 @@ func GetOperationTypeEnumStringValues() []string { "UPDATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", + "COMPOSE_MODEL", } } diff --git a/aidocument/output_location.go b/aidocument/output_location.go index a471eb8fba..dbe20fa8cc 100644 --- a/aidocument/output_location.go +++ b/aidocument/output_location.go @@ -15,7 +15,7 @@ import ( "strings" ) -// OutputLocation The Object Storage Location. +// OutputLocation The object storage location where to store analysis results. type OutputLocation struct { // The Object Storage namespace. diff --git a/aidocument/patch_model_details.go b/aidocument/patch_model_details.go new file mode 100644 index 0000000000..1edbd49136 --- /dev/null +++ b/aidocument/patch_model_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchModelDetails The model parameters to be updated using patch operation. +type PatchModelDetails struct { + + // A list of patch operations for model. + Operations []PatchModelOperation `mandatory:"false" json:"operations"` +} + +func (m PatchModelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchModelDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aidocument/patch_model_operation.go b/aidocument/patch_model_operation.go new file mode 100644 index 0000000000..7e9709c48e --- /dev/null +++ b/aidocument/patch_model_operation.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchModelOperation The metadata which can be edited after model creation. +type PatchModelOperation struct { + + // The parameter of the resource to be changed. + Path *string `mandatory:"false" json:"path"` + + // The value of the parameter to be updated. + Value *string `mandatory:"false" json:"value"` + + // The value of the parameter to be updated. + Operation PatchModelOperationOperationEnum `mandatory:"false" json:"operation,omitempty"` +} + +func (m PatchModelOperation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchModelOperation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPatchModelOperationOperationEnum(string(m.Operation)); !ok && m.Operation != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Operation: %s. Supported values are: %s.", m.Operation, strings.Join(GetPatchModelOperationOperationEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchModelOperationOperationEnum Enum with underlying type: string +type PatchModelOperationOperationEnum string + +// Set of constants representing the allowable values for PatchModelOperationOperationEnum +const ( + PatchModelOperationOperationDelete PatchModelOperationOperationEnum = "DELETE" + PatchModelOperationOperationAdd PatchModelOperationOperationEnum = "ADD" + PatchModelOperationOperationReplace PatchModelOperationOperationEnum = "REPLACE" +) + +var mappingPatchModelOperationOperationEnum = map[string]PatchModelOperationOperationEnum{ + "DELETE": PatchModelOperationOperationDelete, + "ADD": PatchModelOperationOperationAdd, + "REPLACE": PatchModelOperationOperationReplace, +} + +var mappingPatchModelOperationOperationEnumLowerCase = map[string]PatchModelOperationOperationEnum{ + "delete": PatchModelOperationOperationDelete, + "add": PatchModelOperationOperationAdd, + "replace": PatchModelOperationOperationReplace, +} + +// GetPatchModelOperationOperationEnumValues Enumerates the set of values for PatchModelOperationOperationEnum +func GetPatchModelOperationOperationEnumValues() []PatchModelOperationOperationEnum { + values := make([]PatchModelOperationOperationEnum, 0) + for _, v := range mappingPatchModelOperationOperationEnum { + values = append(values, v) + } + return values +} + +// GetPatchModelOperationOperationEnumStringValues Enumerates the set of values in String for PatchModelOperationOperationEnum +func GetPatchModelOperationOperationEnumStringValues() []string { + return []string{ + "DELETE", + "ADD", + "REPLACE", + } +} + +// GetMappingPatchModelOperationOperationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchModelOperationOperationEnum(val string) (PatchModelOperationOperationEnum, bool) { + enum, ok := mappingPatchModelOperationOperationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/aidocument/patch_model_request_response.go b/aidocument/patch_model_request_response.go new file mode 100644 index 0000000000..d9113e270c --- /dev/null +++ b/aidocument/patch_model_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 aidocument + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchModelRequest wrapper for the PatchModel operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aidocument/PatchModel.go.html to see an example of how to use PatchModelRequest. +type PatchModelRequest struct { + + // A unique model identifier. + ModelId *string `mandatory:"true" contributesTo:"path" name:"modelId"` + + // The model metadata to be updated. + PatchModelDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchModelRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchModelRequest) 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 PatchModelRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchModelRequest) 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 PatchModelRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchModelResponse wrapper for the PatchModel operation +type PatchModelResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PatchResponseMessage instance + PatchResponseMessage `presentIn:"body"` + + // A unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A 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 optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchModelResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchModelResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/aidocument/patch_response_message.go b/aidocument/patch_response_message.go new file mode 100644 index 0000000000..bd7065805f --- /dev/null +++ b/aidocument/patch_response_message.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Document Understanding API +// +// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. +// + +package aidocument + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchResponseMessage The response containing the details of the patch operation status. +type PatchResponseMessage struct { + + // The response message containing details of operation. + Message *string `mandatory:"true" json:"message"` + + // Model ID representing the conflicting patch operation. + ModelId *string `mandatory:"false" json:"modelId"` + + // Compartment ID representing the conflicting Model Compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m PatchResponseMessage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchResponseMessage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/apmsynthetics/aggregated_network_data.go b/apmsynthetics/aggregated_network_data.go index d537013980..8652e60737 100644 --- a/apmsynthetics/aggregated_network_data.go +++ b/apmsynthetics/aggregated_network_data.go @@ -15,22 +15,22 @@ import ( "strings" ) -// AggregatedNetworkData aggregated network data. +// AggregatedNetworkData Details of the aggregated network data. type AggregatedNetworkData struct { - // state of the result + // Status of the aggregated network data result. ResultState AggregatedNetworkDataResultStateEnum `mandatory:"true" json:"resultState"` - // List of VantagePointNode items. + // List of vantage point nodes. VantagePointNodes []VantagePointNode `mandatory:"false" json:"vantagePointNodes"` - // 2d array of nodes where each internal array corresponds to 1 level + // An array of node arrays where each internal array corresponds to nodes at one level. NodesByLevel [][]Node `mandatory:"false" json:"nodesByLevel"` - // map of Link objects + // Map of link objects. Links map[string]Link `mandatory:"false" json:"links"` - // string contaiing error details + // String containing error details. ErrorDetails *string `mandatory:"false" json:"errorDetails"` } diff --git a/apmsynthetics/availability_configuration.go b/apmsynthetics/availability_configuration.go index b60cc8358e..53e4b5718a 100644 --- a/apmsynthetics/availability_configuration.go +++ b/apmsynthetics/availability_configuration.go @@ -18,10 +18,10 @@ import ( // AvailabilityConfiguration Monitor availability configuration details. type AvailabilityConfiguration struct { - // Intervals with failed runs more than this value will be classified as UNAVAILABLE. + // Maximum number of failed runs allowed in an interval. If an interval has more failed runs than the specified value, then the interval will be classified as UNAVAILABLE. MaxAllowedFailuresPerInterval *int `mandatory:"false" json:"maxAllowedFailuresPerInterval"` - // Intervals with runs less than this value will be classified as UNKNOWN and excluded from the availability calculations. + // Minimum number of runs allowed in an interval. If an interval has fewer runs than the specified value, then the interval will be classified as UNKNOWN and will be excluded from the availability calculations. MinAllowedRunsPerInterval *int `mandatory:"false" json:"minAllowedRunsPerInterval"` } diff --git a/apmsynthetics/browser_monitor_configuration.go b/apmsynthetics/browser_monitor_configuration.go index fccaf727f1..aa26513279 100644 --- a/apmsynthetics/browser_monitor_configuration.go +++ b/apmsynthetics/browser_monitor_configuration.go @@ -27,10 +27,16 @@ type BrowserMonitorConfiguration struct { // If certificate validation is enabled, then the call will fail in case of certification errors. IsCertificateValidationEnabled *bool `mandatory:"false" json:"isCertificateValidationEnabled"` + // If disabled then auto snapshots are not collected. + IsDefaultSnapshotEnabled *bool `mandatory:"false" json:"isDefaultSnapshotEnabled"` + // Verifies all the search strings present in the response. // If any search string is not present in the response, then it will be considered as a failure. VerifyTexts []VerifyText `mandatory:"false" json:"verifyTexts"` + // Expected HTTP response codes. For status code range, set values such as 2xx, 3xx. + VerifyResponseCodes []string `mandatory:"false" json:"verifyResponseCodes"` + NetworkConfiguration *NetworkConfiguration `mandatory:"false" json:"networkConfiguration"` } diff --git a/apmsynthetics/client_certificate.go b/apmsynthetics/client_certificate.go new file mode 100644 index 0000000000..9d75d1df78 --- /dev/null +++ b/apmsynthetics/client_certificate.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. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClientCertificate Client certificate in pem format. +type ClientCertificate struct { + + // Name of the certificate file. The name should not contain any confidential information. + FileName *string `mandatory:"true" json:"fileName"` + + // Content of the client certificate file. + Content *string `mandatory:"true" json:"content"` +} + +func (m ClientCertificate) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClientCertificate) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/apmsynthetics/client_certificate_details.go b/apmsynthetics/client_certificate_details.go new file mode 100644 index 0000000000..4c2ad0439e --- /dev/null +++ b/apmsynthetics/client_certificate_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClientCertificateDetails Details for client certificate. +type ClientCertificateDetails struct { + ClientCertificate *ClientCertificate `mandatory:"false" json:"clientCertificate"` + + PrivateKey *PrivateKey `mandatory:"false" json:"privateKey"` +} + +func (m ClientCertificateDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClientCertificateDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/apmsynthetics/create_monitor_details.go b/apmsynthetics/create_monitor_details.go index e2d010e15a..90c97146d6 100644 --- a/apmsynthetics/create_monitor_details.go +++ b/apmsynthetics/create_monitor_details.go @@ -74,13 +74,13 @@ type CreateMonitorDetails struct { // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - // If isRunNow is enabled, then the monitor will run now. + // If isRunNow is enabled, then the monitor will run immediately. IsRunNow *bool `mandatory:"false" json:"isRunNow"` - // Scheduling policy on Vantage points. + // Scheduling policy to decide the distribution of monitor executions on vantage points. SchedulingPolicy SchedulingPolicyEnum `mandatory:"false" json:"schedulingPolicy,omitempty"` - // Time interval between 2 runs in round robin batch mode (*SchedulingPolicy - BATCHED_ROUND_ROBIN). + // Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN). BatchIntervalInSeconds *int `mandatory:"false" json:"batchIntervalInSeconds"` } diff --git a/apmsynthetics/dns_configuration.go b/apmsynthetics/dns_configuration.go index 38184552c4..bdbbaffeec 100644 --- a/apmsynthetics/dns_configuration.go +++ b/apmsynthetics/dns_configuration.go @@ -15,13 +15,13 @@ import ( "strings" ) -// DnsConfiguration Dns settings. +// DnsConfiguration Information about the DNS settings. type DnsConfiguration struct { - // If isOverrideDns is true, then dns will be overridden. + // If isOverrideDns is true, then DNS settings will be overridden. IsOverrideDns *bool `mandatory:"false" json:"isOverrideDns"` - // Override dns ip value. This value will be honored only if *ref-isOverrideDns is set to true. + // Attribute to override the DNS IP value. This value will be honored only if isOverrideDns is set to true. OverrideDnsIp *string `mandatory:"false" json:"overrideDnsIp"` } diff --git a/apmsynthetics/geo_summary.go b/apmsynthetics/geo_summary.go index 9e8145df18..9a09e018f7 100644 --- a/apmsynthetics/geo_summary.go +++ b/apmsynthetics/geo_summary.go @@ -31,7 +31,7 @@ type GeoSummary struct { // The common English-language name for the country. CountryName *string `mandatory:"false" json:"countryName"` - // Degrees north of the Equator. + // Degrees north of the equator. Latitude *float64 `mandatory:"false" json:"latitude"` // Degrees east of the prime meridian. diff --git a/apmsynthetics/link.go b/apmsynthetics/link.go index cfe87c2ddd..95b3dae1f5 100644 --- a/apmsynthetics/link.go +++ b/apmsynthetics/link.go @@ -15,32 +15,35 @@ import ( "strings" ) -// Link link between 2 nodes +// Link Details of the link between two nodes. type Link struct { - // id of Link + // ID of the link. Id *string `mandatory:"true" json:"id"` - // source node id + // ID of the source node. Source *string `mandatory:"false" json:"source"` - // destination node id + // ID of the destination node. Destination *string `mandatory:"false" json:"destination"` - // number of times this link is repeated + // Number of times the link is repeated. RepeatCount *int `mandatory:"false" json:"repeatCount"` - // average packet loss + // Average packet loss. ForwardingLoss *float64 `mandatory:"false" json:"forwardingLoss"` - // difference of packet response time between source and destination in milliseconds + // Difference of the packet response time between source and destination nodes, in milliseconds. DelayInMilliseconds *float64 `mandatory:"false" json:"delayInMilliseconds"` - // minimum delay in milliseconds + // Minimum delay in milliseconds. MinDelayInMilliseconds *float64 `mandatory:"false" json:"minDelayInMilliseconds"` - // maximum delay in milliseconds + // Maximum delay in milliseconds. MaxDelayInMilliseconds *float64 `mandatory:"false" json:"maxDelayInMilliseconds"` + + // List of all path ids of which this link is part of. + Paths []string `mandatory:"false" json:"paths"` } func (m Link) String() string { diff --git a/apmsynthetics/maintenance_window_schedule.go b/apmsynthetics/maintenance_window_schedule.go index 0b91c0c31d..b868948a4f 100644 --- a/apmsynthetics/maintenance_window_schedule.go +++ b/apmsynthetics/maintenance_window_schedule.go @@ -15,14 +15,14 @@ import ( "strings" ) -// MaintenanceWindowSchedule Details used to schedule maintenance window. +// MaintenanceWindowSchedule Details required to schedule maintenance window. type MaintenanceWindowSchedule struct { - // Start time for the maintenance window, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. + // Start time of the maintenance window, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. // Example: `2020-02-12T22:47:12.613Z` TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - // End time for the maintenance window, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. + // End time of the maintenance window, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. // Example: `2020-02-12T22:47:12.613Z` TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` } diff --git a/apmsynthetics/monitor.go b/apmsynthetics/monitor.go index 62e2e0b2fc..bbafc6ef90 100644 --- a/apmsynthetics/monitor.go +++ b/apmsynthetics/monitor.go @@ -25,7 +25,7 @@ type Monitor struct { // Unique name that can be edited. The name should not contain any confidential information. DisplayName *string `mandatory:"true" json:"displayName"` - // Type of the monitor. + // Type of monitor. MonitorType MonitorTypesEnum `mandatory:"true" json:"monitorType"` // List of public and dedicated vantage points where the monitor is running. @@ -57,13 +57,13 @@ type Monitor struct { // Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. TimeoutInSeconds *int `mandatory:"true" json:"timeoutInSeconds"` - // If isRunNow is enabled, then the monitor will run now. + // If isRunNow is enabled, then the monitor will run immediately. IsRunNow *bool `mandatory:"true" json:"isRunNow"` - // Scheduling policy on Vantage points. + // Scheduling policy to decide the distribution of monitor executions on vantage points. SchedulingPolicy SchedulingPolicyEnum `mandatory:"true" json:"schedulingPolicy"` - // Time interval between 2 runs in round robin batch mode (*SchedulingPolicy - BATCHED_ROUND_ROBIN). + // Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN). BatchIntervalInSeconds *int `mandatory:"true" json:"batchIntervalInSeconds"` // Specify the endpoint on which to run the monitor. diff --git a/apmsynthetics/monitor_summary.go b/apmsynthetics/monitor_summary.go index 7c5fcaf6bf..eb970e33a1 100644 --- a/apmsynthetics/monitor_summary.go +++ b/apmsynthetics/monitor_summary.go @@ -56,13 +56,13 @@ type MonitorSummary struct { // Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. TimeoutInSeconds *int `mandatory:"true" json:"timeoutInSeconds"` - // If isRunNow is enabled, then the monitor will run now. + // If isRunNow is enabled, then the monitor will run immediately. IsRunNow *bool `mandatory:"true" json:"isRunNow"` - // Scheduling policy on Vantage points. + // Scheduling policy to decide the distribution of monitor executions on vantage points. SchedulingPolicy SchedulingPolicyEnum `mandatory:"true" json:"schedulingPolicy"` - // Time interval between 2 runs in round robin batch mode (*SchedulingPolicy - BATCHED_ROUND_ROBIN). + // Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN). BatchIntervalInSeconds *int `mandatory:"true" json:"batchIntervalInSeconds"` // Specify the endpoint on which to run the monitor. diff --git a/apmsynthetics/node.go b/apmsynthetics/node.go index 00f6786b9e..f00c07f850 100644 --- a/apmsynthetics/node.go +++ b/apmsynthetics/node.go @@ -15,37 +15,37 @@ import ( "strings" ) -// Node Network node +// Node Details of the network node. type Node struct { - // id of node + // ID of the network node. Id *string `mandatory:"true" json:"id"` - // ip address of node + // IP address of the network node. IpAddress *string `mandatory:"false" json:"ipAddress"` - // display name of node + // Display name of the network node. DisplayName *string `mandatory:"false" json:"displayName"` - // geo info + // Geographical information of the network node. GeoInfo *string `mandatory:"false" json:"geoInfo"` - // links outgoing from this node + // Outgoing links from the network node. OutgoingLinks []string `mandatory:"false" json:"outgoingLinks"` - // consecutive anonymous node count + // Number of consecutive anonymous network nodes. ConsecutiveAnonymousCount *int `mandatory:"false" json:"consecutiveAnonymousCount"` - // level of this node + // Level of the network node. Level *int `mandatory:"false" json:"level"` - // average packet response time in milli seconds + // Average packet response time in milliseconds. AvgPacketResponseTimeInMs *float64 `mandatory:"false" json:"avgPacketResponseTimeInMs"` - // average packet loss percentage + // Percentage of the average packet loss. AvgPacketLossPercent *float64 `mandatory:"false" json:"avgPacketLossPercent"` - // type of node + // Type of network node. Type NodeTypeEnum `mandatory:"false" json:"type,omitempty"` } diff --git a/apmsynthetics/private_key.go b/apmsynthetics/private_key.go new file mode 100644 index 0000000000..d855b083d5 --- /dev/null +++ b/apmsynthetics/private_key.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. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrivateKey The private key associated with the client certificate in pem format. +type PrivateKey struct { + + // Name of the private key file. + FileName *string `mandatory:"true" json:"fileName"` + + // Content of the private key file. + Content *string `mandatory:"true" json:"content"` +} + +func (m PrivateKey) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrivateKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/apmsynthetics/request_authentication_details.go b/apmsynthetics/request_authentication_details.go index 76039df58d..f141b107e5 100644 --- a/apmsynthetics/request_authentication_details.go +++ b/apmsynthetics/request_authentication_details.go @@ -18,10 +18,10 @@ import ( // RequestAuthenticationDetails Details for request HTTP authentication. type RequestAuthenticationDetails struct { - // Request http oauth scheme. + // Request HTTP OAuth scheme. OauthScheme OAuthSchemesEnum `mandatory:"false" json:"oauthScheme,omitempty"` - // Username for authentication. + // User name for authentication. AuthUserName *string `mandatory:"false" json:"authUserName"` // User password for authentication. @@ -30,7 +30,7 @@ type RequestAuthenticationDetails struct { // Authentication token. AuthToken *string `mandatory:"false" json:"authToken"` - // URL to get authetication token. + // URL to get authentication token. AuthUrl *string `mandatory:"false" json:"authUrl"` // List of authentication headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]` diff --git a/apmsynthetics/request_authentication_schemes.go b/apmsynthetics/request_authentication_schemes.go index 375c7bd503..0a8b2972df 100644 --- a/apmsynthetics/request_authentication_schemes.go +++ b/apmsynthetics/request_authentication_schemes.go @@ -18,24 +18,27 @@ type RequestAuthenticationSchemesEnum string // Set of constants representing the allowable values for RequestAuthenticationSchemesEnum const ( - RequestAuthenticationSchemesOauth RequestAuthenticationSchemesEnum = "OAUTH" - RequestAuthenticationSchemesNone RequestAuthenticationSchemesEnum = "NONE" - RequestAuthenticationSchemesBasic RequestAuthenticationSchemesEnum = "BASIC" - RequestAuthenticationSchemesBearer RequestAuthenticationSchemesEnum = "BEARER" + RequestAuthenticationSchemesOauth RequestAuthenticationSchemesEnum = "OAUTH" + RequestAuthenticationSchemesNone RequestAuthenticationSchemesEnum = "NONE" + RequestAuthenticationSchemesBasic RequestAuthenticationSchemesEnum = "BASIC" + RequestAuthenticationSchemesBearer RequestAuthenticationSchemesEnum = "BEARER" + RequestAuthenticationSchemesResourcePrincipal RequestAuthenticationSchemesEnum = "RESOURCE_PRINCIPAL" ) var mappingRequestAuthenticationSchemesEnum = map[string]RequestAuthenticationSchemesEnum{ - "OAUTH": RequestAuthenticationSchemesOauth, - "NONE": RequestAuthenticationSchemesNone, - "BASIC": RequestAuthenticationSchemesBasic, - "BEARER": RequestAuthenticationSchemesBearer, + "OAUTH": RequestAuthenticationSchemesOauth, + "NONE": RequestAuthenticationSchemesNone, + "BASIC": RequestAuthenticationSchemesBasic, + "BEARER": RequestAuthenticationSchemesBearer, + "RESOURCE_PRINCIPAL": RequestAuthenticationSchemesResourcePrincipal, } var mappingRequestAuthenticationSchemesEnumLowerCase = map[string]RequestAuthenticationSchemesEnum{ - "oauth": RequestAuthenticationSchemesOauth, - "none": RequestAuthenticationSchemesNone, - "basic": RequestAuthenticationSchemesBasic, - "bearer": RequestAuthenticationSchemesBearer, + "oauth": RequestAuthenticationSchemesOauth, + "none": RequestAuthenticationSchemesNone, + "basic": RequestAuthenticationSchemesBasic, + "bearer": RequestAuthenticationSchemesBearer, + "resource_principal": RequestAuthenticationSchemesResourcePrincipal, } // GetRequestAuthenticationSchemesEnumValues Enumerates the set of values for RequestAuthenticationSchemesEnum @@ -54,6 +57,7 @@ func GetRequestAuthenticationSchemesEnumStringValues() []string { "NONE", "BASIC", "BEARER", + "RESOURCE_PRINCIPAL", } } diff --git a/apmsynthetics/request_authentication_schemes_for_scripted_rest.go b/apmsynthetics/request_authentication_schemes_for_scripted_rest.go new file mode 100644 index 0000000000..f3409cfbf5 --- /dev/null +++ b/apmsynthetics/request_authentication_schemes_for_scripted_rest.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "strings" +) + +// RequestAuthenticationSchemesForScriptedRestEnum Enum with underlying type: string +type RequestAuthenticationSchemesForScriptedRestEnum string + +// Set of constants representing the allowable values for RequestAuthenticationSchemesForScriptedRestEnum +const ( + RequestAuthenticationSchemesForScriptedRestNone RequestAuthenticationSchemesForScriptedRestEnum = "NONE" + RequestAuthenticationSchemesForScriptedRestResourcePrincipal RequestAuthenticationSchemesForScriptedRestEnum = "RESOURCE_PRINCIPAL" +) + +var mappingRequestAuthenticationSchemesForScriptedRestEnum = map[string]RequestAuthenticationSchemesForScriptedRestEnum{ + "NONE": RequestAuthenticationSchemesForScriptedRestNone, + "RESOURCE_PRINCIPAL": RequestAuthenticationSchemesForScriptedRestResourcePrincipal, +} + +var mappingRequestAuthenticationSchemesForScriptedRestEnumLowerCase = map[string]RequestAuthenticationSchemesForScriptedRestEnum{ + "none": RequestAuthenticationSchemesForScriptedRestNone, + "resource_principal": RequestAuthenticationSchemesForScriptedRestResourcePrincipal, +} + +// GetRequestAuthenticationSchemesForScriptedRestEnumValues Enumerates the set of values for RequestAuthenticationSchemesForScriptedRestEnum +func GetRequestAuthenticationSchemesForScriptedRestEnumValues() []RequestAuthenticationSchemesForScriptedRestEnum { + values := make([]RequestAuthenticationSchemesForScriptedRestEnum, 0) + for _, v := range mappingRequestAuthenticationSchemesForScriptedRestEnum { + values = append(values, v) + } + return values +} + +// GetRequestAuthenticationSchemesForScriptedRestEnumStringValues Enumerates the set of values in String for RequestAuthenticationSchemesForScriptedRestEnum +func GetRequestAuthenticationSchemesForScriptedRestEnumStringValues() []string { + return []string{ + "NONE", + "RESOURCE_PRINCIPAL", + } +} + +// GetMappingRequestAuthenticationSchemesForScriptedRestEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRequestAuthenticationSchemesForScriptedRestEnum(val string) (RequestAuthenticationSchemesForScriptedRestEnum, bool) { + enum, ok := mappingRequestAuthenticationSchemesForScriptedRestEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/apmsynthetics/rest_monitor_configuration.go b/apmsynthetics/rest_monitor_configuration.go index 7f0f34519a..2a62c9098c 100644 --- a/apmsynthetics/rest_monitor_configuration.go +++ b/apmsynthetics/rest_monitor_configuration.go @@ -24,14 +24,16 @@ type RestMonitorConfiguration struct { DnsConfiguration *DnsConfiguration `mandatory:"false" json:"dnsConfiguration"` - // If redirection enabled, then redirects will be allowed while accessing target URL. + // If redirection is enabled, then redirects will be allowed while accessing target URL. IsRedirectionEnabled *bool `mandatory:"false" json:"isRedirectionEnabled"` - // If certificate validation enabled, then call will fail for certificate errors. + // If certificate validation is enabled, then call will fail for certificate errors. IsCertificateValidationEnabled *bool `mandatory:"false" json:"isCertificateValidationEnabled"` ReqAuthenticationDetails *RequestAuthenticationDetails `mandatory:"false" json:"reqAuthenticationDetails"` + ClientCertificateDetails *ClientCertificateDetails `mandatory:"false" json:"clientCertificateDetails"` + // List of request headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]` RequestHeaders []Header `mandatory:"false" json:"requestHeaders"` @@ -53,7 +55,7 @@ type RestMonitorConfiguration struct { // Request HTTP method. RequestMethod RequestMethodsEnum `mandatory:"false" json:"requestMethod,omitempty"` - // Request http authentication scheme. + // Request HTTP authentication scheme. ReqAuthenticationScheme RequestAuthenticationSchemesEnum `mandatory:"false" json:"reqAuthenticationScheme,omitempty"` } diff --git a/apmsynthetics/scripted_browser_monitor_configuration.go b/apmsynthetics/scripted_browser_monitor_configuration.go index fe1e6b5b81..8141557a7d 100644 --- a/apmsynthetics/scripted_browser_monitor_configuration.go +++ b/apmsynthetics/scripted_browser_monitor_configuration.go @@ -27,6 +27,9 @@ type ScriptedBrowserMonitorConfiguration struct { // If certificate validation is enabled, then the call will fail in case of certification errors. IsCertificateValidationEnabled *bool `mandatory:"false" json:"isCertificateValidationEnabled"` + // If disabled then auto snapshots are not collected. + IsDefaultSnapshotEnabled *bool `mandatory:"false" json:"isDefaultSnapshotEnabled"` + NetworkConfiguration *NetworkConfiguration `mandatory:"false" json:"networkConfiguration"` } diff --git a/apmsynthetics/scripted_rest_monitor_configuration.go b/apmsynthetics/scripted_rest_monitor_configuration.go index 2b244a0495..5ff3f7cb07 100644 --- a/apmsynthetics/scripted_rest_monitor_configuration.go +++ b/apmsynthetics/scripted_rest_monitor_configuration.go @@ -24,7 +24,13 @@ type ScriptedRestMonitorConfiguration struct { DnsConfiguration *DnsConfiguration `mandatory:"false" json:"dnsConfiguration"` + // Expected HTTP response codes. For status code range, set values such as 2xx, 3xx. + VerifyResponseCodes []string `mandatory:"false" json:"verifyResponseCodes"` + NetworkConfiguration *NetworkConfiguration `mandatory:"false" json:"networkConfiguration"` + + // Request HTTP authentication scheme. + ReqAuthenticationScheme RequestAuthenticationSchemesForScriptedRestEnum `mandatory:"false" json:"reqAuthenticationScheme,omitempty"` } //GetIsFailureRetried returns IsFailureRetried @@ -47,6 +53,9 @@ func (m ScriptedRestMonitorConfiguration) String() string { func (m ScriptedRestMonitorConfiguration) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingRequestAuthenticationSchemesForScriptedRestEnum(string(m.ReqAuthenticationScheme)); !ok && m.ReqAuthenticationScheme != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReqAuthenticationScheme: %s. Supported values are: %s.", m.ReqAuthenticationScheme, strings.Join(GetRequestAuthenticationSchemesForScriptedRestEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/apmsynthetics/update_monitor_details.go b/apmsynthetics/update_monitor_details.go index 02ce82906c..0d691d215f 100644 --- a/apmsynthetics/update_monitor_details.go +++ b/apmsynthetics/update_monitor_details.go @@ -71,13 +71,13 @@ type UpdateMonitorDetails struct { // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - // If isRunNow is enabled, then the monitor will run now. + // If isRunNow is enabled, then the monitor will run immediately. IsRunNow *bool `mandatory:"false" json:"isRunNow"` - // Scheduling policy on Vantage points. + // Scheduling policy to decide the distribution of monitor executions on vantage points. SchedulingPolicy SchedulingPolicyEnum `mandatory:"false" json:"schedulingPolicy,omitempty"` - // Time interval between 2 runs in round robin batch mode (*SchedulingPolicy - BATCHED_ROUND_ROBIN). + // Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN). BatchIntervalInSeconds *int `mandatory:"false" json:"batchIntervalInSeconds"` } diff --git a/apmsynthetics/vantage_point_execution.go b/apmsynthetics/vantage_point_execution.go index 5d8ba11c41..afb50b10ac 100644 --- a/apmsynthetics/vantage_point_execution.go +++ b/apmsynthetics/vantage_point_execution.go @@ -18,10 +18,10 @@ import ( // VantagePointExecution Details of a vantage point execution. type VantagePointExecution struct { - // Vantage point name. + // Name of the vantage point. Name *string `mandatory:"false" json:"name"` - // list of execution times in milli seconds. + // List of execution times in milliseconds. Executions []int64 `mandatory:"false" json:"executions"` } diff --git a/apmsynthetics/vantage_point_node.go b/apmsynthetics/vantage_point_node.go index c5e8815d75..7eea481706 100644 --- a/apmsynthetics/vantage_point_node.go +++ b/apmsynthetics/vantage_point_node.go @@ -15,22 +15,22 @@ import ( "strings" ) -// VantagePointNode Vantage Point Node +// VantagePointNode Details of the vantage point node. type VantagePointNode struct { - // name of Vantage Point node + // Name of the vantage point node. Name *string `mandatory:"true" json:"name"` - // id of Vantage Point node + // ID of the vantage point node. Id *string `mandatory:"false" json:"id"` - // display name of Vantage Point node + // Display name of the vantage point node. DisplayName *string `mandatory:"false" json:"displayName"` - // geo info + // Geographical information of the vantage point node. GeoInfo *string `mandatory:"false" json:"geoInfo"` - // links outgoing from this Vantage Point node + // Outgoing links from the vantage point node. OutgoingLinks []string `mandatory:"false" json:"outgoingLinks"` } diff --git a/common/version.go b/common/version.go index 7f48cda478..2c272d9d54 100644 --- a/common/version.go +++ b/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "42" + minor = "43" patch = "0" tag = "" ) diff --git a/containerengine/cluster_summary.go b/containerengine/cluster_summary.go index 8ea05d3377..3a1e9e4672 100644 --- a/containerengine/cluster_summary.go +++ b/containerengine/cluster_summary.go @@ -77,7 +77,7 @@ type ClusterSummary struct { // Available CNIs and network options for existing and new node pools of the cluster ClusterPodNetworkOptions []ClusterPodNetworkOptionDetails `mandatory:"false" json:"clusterPodNetworkOptions"` - // Type of cluster + // Type of cluster. Values can be BASIC_CLUSTER or ENHANCED_CLUSTER. For more information, see Cluster Types (https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengcomparingenhancedwithbasicclusters_topic.htm) Type ClusterTypeEnum `mandatory:"false" json:"type,omitempty"` } diff --git a/containerengine/containerengine_client.go b/containerengine/containerengine_client.go index 920fc21b5a..2182356006 100644 --- a/containerengine/containerengine_client.go +++ b/containerengine/containerengine_client.go @@ -394,6 +394,69 @@ func (client ContainerEngineClient) createVirtualNodePool(ctx context.Context, r return response, err } +// CreateWorkloadMapping Create the specified workloadMapping for a cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateWorkloadMapping.go.html to see an example of how to use CreateWorkloadMapping API. +// A default retry strategy applies to this operation CreateWorkloadMapping() +func (client ContainerEngineClient) CreateWorkloadMapping(ctx context.Context, request CreateWorkloadMappingRequest) (response CreateWorkloadMappingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateWorkloadMappingResponse") + } + return +} + +// createWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/workloadMappings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateWorkloadMappingResponse + 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/containerengine/20180222/WorkloadMapping/CreateWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "CreateWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteCluster Delete a cluster. // // See also @@ -684,6 +747,64 @@ func (client ContainerEngineClient) deleteWorkRequest(ctx context.Context, reque return response, err } +// DeleteWorkloadMapping Delete workloadMapping for a provisioned cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteWorkloadMapping.go.html to see an example of how to use DeleteWorkloadMapping API. +// A default retry strategy applies to this operation DeleteWorkloadMapping() +func (client ContainerEngineClient) DeleteWorkloadMapping(ctx context.Context, request DeleteWorkloadMappingRequest) (response DeleteWorkloadMappingResponse, 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.deleteWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteWorkloadMappingResponse") + } + return +} + +// deleteWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusters/{clusterId}/workloadMappings/{workloadMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteWorkloadMappingResponse + 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/containerengine/20180222/WorkloadMapping/DeleteWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DisableAddon Disable addon for a provisioned cluster. // // See also @@ -1264,6 +1385,64 @@ func (client ContainerEngineClient) getWorkRequest(ctx context.Context, request return response, err } +// GetWorkloadMapping Get the specified workloadMapping for a cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetWorkloadMapping.go.html to see an example of how to use GetWorkloadMapping API. +// A default retry strategy applies to this operation GetWorkloadMapping() +func (client ContainerEngineClient) GetWorkloadMapping(ctx context.Context, request GetWorkloadMappingRequest) (response GetWorkloadMappingResponse, 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.getWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkloadMappingResponse") + } + return +} + +// getWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/workloadMappings/{workloadMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetWorkloadMappingResponse + 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/containerengine/20180222/WorkloadMapping/GetWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // InstallAddon Install the specified addon for a cluster. // // See also @@ -1907,6 +2086,64 @@ func (client ContainerEngineClient) listWorkRequests(ctx context.Context, reques return response, err } +// ListWorkloadMappings List workloadMappings for a provisioned cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkloadMappings.go.html to see an example of how to use ListWorkloadMappings API. +// A default retry strategy applies to this operation ListWorkloadMappings() +func (client ContainerEngineClient) ListWorkloadMappings(ctx context.Context, request ListWorkloadMappingsRequest) (response ListWorkloadMappingsResponse, 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.listWorkloadMappings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkloadMappingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkloadMappingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkloadMappingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkloadMappingsResponse") + } + return +} + +// listWorkloadMappings implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkloadMappings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/workloadMappings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkloadMappingsResponse + 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/containerengine/20180222/WorkloadMappingSummary/ListWorkloadMappings" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkloadMappings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateAddon Update addon details for a cluster. // // See also @@ -2196,3 +2433,61 @@ func (client ContainerEngineClient) updateVirtualNodePool(ctx context.Context, r err = common.UnmarshalResponse(httpResponse, &response) return response, err } + +// UpdateWorkloadMapping Update workloadMapping details for a cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateWorkloadMapping.go.html to see an example of how to use UpdateWorkloadMapping API. +// A default retry strategy applies to this operation UpdateWorkloadMapping() +func (client ContainerEngineClient) UpdateWorkloadMapping(ctx context.Context, request UpdateWorkloadMappingRequest) (response UpdateWorkloadMappingResponse, 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.updateWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateWorkloadMappingResponse") + } + return +} + +// updateWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusters/{clusterId}/workloadMappings/{workloadMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateWorkloadMappingResponse + 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/containerengine/20180222/WorkloadMapping/UpdateWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/containerengine/create_workload_mapping_details.go b/containerengine/create_workload_mapping_details.go new file mode 100644 index 0000000000..f966bbe934 --- /dev/null +++ b/containerengine/create_workload_mapping_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. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateWorkloadMappingDetails The properties that define a workloadMapping +type CreateWorkloadMappingDetails struct { + + // The namespace of the workloadMapping. + Namespace *string `mandatory:"true" json:"namespace"` + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"true" json:"mappedCompartmentId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateWorkloadMappingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateWorkloadMappingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/containerengine/create_workload_mapping_request_response.go b/containerengine/create_workload_mapping_request_response.go new file mode 100644 index 0000000000..f6dd35315b --- /dev/null +++ b/containerengine/create_workload_mapping_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateWorkloadMappingRequest wrapper for the CreateWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateWorkloadMapping.go.html to see an example of how to use CreateWorkloadMappingRequest. +type CreateWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details of the workloadMapping to be create. + CreateWorkloadMappingDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateWorkloadMappingRequest) 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 CreateWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateWorkloadMappingRequest) 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 CreateWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateWorkloadMappingResponse wrapper for the CreateWorkloadMapping operation +type CreateWorkloadMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkloadMapping instance + WorkloadMapping `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/containerengine/delete_workload_mapping_request_response.go b/containerengine/delete_workload_mapping_request_response.go new file mode 100644 index 0000000000..f4404eeff8 --- /dev/null +++ b/containerengine/delete_workload_mapping_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteWorkloadMappingRequest wrapper for the DeleteWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteWorkloadMapping.go.html to see an example of how to use DeleteWorkloadMappingRequest. +type DeleteWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The OCID of the workloadMapping. + WorkloadMappingId *string `mandatory:"true" contributesTo:"path" name:"workloadMappingId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteWorkloadMappingRequest) 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 DeleteWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteWorkloadMappingRequest) 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 DeleteWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteWorkloadMappingResponse wrapper for the DeleteWorkloadMapping operation +type DeleteWorkloadMappingResponse 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 DeleteWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/containerengine/get_workload_mapping_request_response.go b/containerengine/get_workload_mapping_request_response.go new file mode 100644 index 0000000000..37dfc423a2 --- /dev/null +++ b/containerengine/get_workload_mapping_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkloadMappingRequest wrapper for the GetWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetWorkloadMapping.go.html to see an example of how to use GetWorkloadMappingRequest. +type GetWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The OCID of the workloadMapping. + WorkloadMappingId *string `mandatory:"true" contributesTo:"path" name:"workloadMappingId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkloadMappingRequest) 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 GetWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkloadMappingRequest) 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 GetWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkloadMappingResponse wrapper for the GetWorkloadMapping operation +type GetWorkloadMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkloadMapping instance + WorkloadMapping `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/containerengine/list_workload_mappings_request_response.go b/containerengine/list_workload_mappings_request_response.go new file mode 100644 index 0000000000..e0888cac78 --- /dev/null +++ b/containerengine/list_workload_mappings_request_response.go @@ -0,0 +1,200 @@ +// 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 containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkloadMappingsRequest wrapper for the ListWorkloadMappings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkloadMappings.go.html to see an example of how to use ListWorkloadMappingsRequest. +type ListWorkloadMappingsRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // 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. + // 1 is the minimum, 1000 is the maximum. 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"` + + // The optional order in which to sort the results. + SortOrder ListWorkloadMappingsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListWorkloadMappingsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkloadMappingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkloadMappingsRequest) 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 ListWorkloadMappingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkloadMappingsRequest) 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 ListWorkloadMappingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkloadMappingsSortOrderEnum(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(GetListWorkloadMappingsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkloadMappingsSortByEnum(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(GetListWorkloadMappingsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkloadMappingsResponse wrapper for the ListWorkloadMappings operation +type ListWorkloadMappingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []WorkloadMappingSummary instances + Items []WorkloadMappingSummary `presentIn:"body"` + + // 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/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkloadMappingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkloadMappingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkloadMappingsSortOrderEnum Enum with underlying type: string +type ListWorkloadMappingsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkloadMappingsSortOrderEnum +const ( + ListWorkloadMappingsSortOrderAsc ListWorkloadMappingsSortOrderEnum = "ASC" + ListWorkloadMappingsSortOrderDesc ListWorkloadMappingsSortOrderEnum = "DESC" +) + +var mappingListWorkloadMappingsSortOrderEnum = map[string]ListWorkloadMappingsSortOrderEnum{ + "ASC": ListWorkloadMappingsSortOrderAsc, + "DESC": ListWorkloadMappingsSortOrderDesc, +} + +var mappingListWorkloadMappingsSortOrderEnumLowerCase = map[string]ListWorkloadMappingsSortOrderEnum{ + "asc": ListWorkloadMappingsSortOrderAsc, + "desc": ListWorkloadMappingsSortOrderDesc, +} + +// GetListWorkloadMappingsSortOrderEnumValues Enumerates the set of values for ListWorkloadMappingsSortOrderEnum +func GetListWorkloadMappingsSortOrderEnumValues() []ListWorkloadMappingsSortOrderEnum { + values := make([]ListWorkloadMappingsSortOrderEnum, 0) + for _, v := range mappingListWorkloadMappingsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkloadMappingsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkloadMappingsSortOrderEnum +func GetListWorkloadMappingsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkloadMappingsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkloadMappingsSortOrderEnum(val string) (ListWorkloadMappingsSortOrderEnum, bool) { + enum, ok := mappingListWorkloadMappingsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkloadMappingsSortByEnum Enum with underlying type: string +type ListWorkloadMappingsSortByEnum string + +// Set of constants representing the allowable values for ListWorkloadMappingsSortByEnum +const ( + ListWorkloadMappingsSortByNamespace ListWorkloadMappingsSortByEnum = "NAMESPACE" + ListWorkloadMappingsSortByTimecreated ListWorkloadMappingsSortByEnum = "TIMECREATED" +) + +var mappingListWorkloadMappingsSortByEnum = map[string]ListWorkloadMappingsSortByEnum{ + "NAMESPACE": ListWorkloadMappingsSortByNamespace, + "TIMECREATED": ListWorkloadMappingsSortByTimecreated, +} + +var mappingListWorkloadMappingsSortByEnumLowerCase = map[string]ListWorkloadMappingsSortByEnum{ + "namespace": ListWorkloadMappingsSortByNamespace, + "timecreated": ListWorkloadMappingsSortByTimecreated, +} + +// GetListWorkloadMappingsSortByEnumValues Enumerates the set of values for ListWorkloadMappingsSortByEnum +func GetListWorkloadMappingsSortByEnumValues() []ListWorkloadMappingsSortByEnum { + values := make([]ListWorkloadMappingsSortByEnum, 0) + for _, v := range mappingListWorkloadMappingsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkloadMappingsSortByEnumStringValues Enumerates the set of values in String for ListWorkloadMappingsSortByEnum +func GetListWorkloadMappingsSortByEnumStringValues() []string { + return []string{ + "NAMESPACE", + "TIMECREATED", + } +} + +// GetMappingListWorkloadMappingsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkloadMappingsSortByEnum(val string) (ListWorkloadMappingsSortByEnum, bool) { + enum, ok := mappingListWorkloadMappingsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/containerengine/update_workload_mapping_details.go b/containerengine/update_workload_mapping_details.go new file mode 100644 index 0000000000..b572fdf821 --- /dev/null +++ b/containerengine/update_workload_mapping_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateWorkloadMappingDetails The properties that define a workloadMapping +type UpdateWorkloadMappingDetails struct { + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"false" json:"mappedCompartmentId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateWorkloadMappingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateWorkloadMappingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/containerengine/update_workload_mapping_request_response.go b/containerengine/update_workload_mapping_request_response.go new file mode 100644 index 0000000000..f5393a4cde --- /dev/null +++ b/containerengine/update_workload_mapping_request_response.go @@ -0,0 +1,105 @@ +// 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 containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateWorkloadMappingRequest wrapper for the UpdateWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateWorkloadMapping.go.html to see an example of how to use UpdateWorkloadMappingRequest. +type UpdateWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The OCID of the workloadMapping. + WorkloadMappingId *string `mandatory:"true" contributesTo:"path" name:"workloadMappingId"` + + // The details of the workloadMapping to be updated. + UpdateWorkloadMappingDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateWorkloadMappingRequest) 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 UpdateWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateWorkloadMappingRequest) 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 UpdateWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateWorkloadMappingResponse wrapper for the UpdateWorkloadMapping operation +type UpdateWorkloadMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkloadMapping instance + WorkloadMapping `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/containerengine/workload_mapping.go b/containerengine/workload_mapping.go new file mode 100644 index 0000000000..7451856574 --- /dev/null +++ b/containerengine/workload_mapping.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkloadMapping The properties that define an workloadMapping. +type WorkloadMapping struct { + + // The ocid of the workloadMapping. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // The namespace of the workloadMapping. + Namespace *string `mandatory:"true" json:"namespace"` + + // The OCID of the mapped customer tenancy. + MappedTenancyId *string `mandatory:"true" json:"mappedTenancyId"` + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"true" json:"mappedCompartmentId"` + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The state of the workloadMapping. + LifecycleState WorkloadMappingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m WorkloadMapping) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkloadMapping) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingWorkloadMappingLifecycleStateEnum(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(GetWorkloadMappingLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/containerengine/workload_mapping_lifecycle_state.go b/containerengine/workload_mapping_lifecycle_state.go new file mode 100644 index 0000000000..096534b2bf --- /dev/null +++ b/containerengine/workload_mapping_lifecycle_state.go @@ -0,0 +1,74 @@ +// 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. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// WorkloadMappingLifecycleStateEnum Enum with underlying type: string +type WorkloadMappingLifecycleStateEnum string + +// Set of constants representing the allowable values for WorkloadMappingLifecycleStateEnum +const ( + WorkloadMappingLifecycleStateCreating WorkloadMappingLifecycleStateEnum = "CREATING" + WorkloadMappingLifecycleStateActive WorkloadMappingLifecycleStateEnum = "ACTIVE" + WorkloadMappingLifecycleStateFailed WorkloadMappingLifecycleStateEnum = "FAILED" + WorkloadMappingLifecycleStateDeleting WorkloadMappingLifecycleStateEnum = "DELETING" + WorkloadMappingLifecycleStateDeleted WorkloadMappingLifecycleStateEnum = "DELETED" + WorkloadMappingLifecycleStateUpdating WorkloadMappingLifecycleStateEnum = "UPDATING" +) + +var mappingWorkloadMappingLifecycleStateEnum = map[string]WorkloadMappingLifecycleStateEnum{ + "CREATING": WorkloadMappingLifecycleStateCreating, + "ACTIVE": WorkloadMappingLifecycleStateActive, + "FAILED": WorkloadMappingLifecycleStateFailed, + "DELETING": WorkloadMappingLifecycleStateDeleting, + "DELETED": WorkloadMappingLifecycleStateDeleted, + "UPDATING": WorkloadMappingLifecycleStateUpdating, +} + +var mappingWorkloadMappingLifecycleStateEnumLowerCase = map[string]WorkloadMappingLifecycleStateEnum{ + "creating": WorkloadMappingLifecycleStateCreating, + "active": WorkloadMappingLifecycleStateActive, + "failed": WorkloadMappingLifecycleStateFailed, + "deleting": WorkloadMappingLifecycleStateDeleting, + "deleted": WorkloadMappingLifecycleStateDeleted, + "updating": WorkloadMappingLifecycleStateUpdating, +} + +// GetWorkloadMappingLifecycleStateEnumValues Enumerates the set of values for WorkloadMappingLifecycleStateEnum +func GetWorkloadMappingLifecycleStateEnumValues() []WorkloadMappingLifecycleStateEnum { + values := make([]WorkloadMappingLifecycleStateEnum, 0) + for _, v := range mappingWorkloadMappingLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetWorkloadMappingLifecycleStateEnumStringValues Enumerates the set of values in String for WorkloadMappingLifecycleStateEnum +func GetWorkloadMappingLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "FAILED", + "DELETING", + "DELETED", + "UPDATING", + } +} + +// GetMappingWorkloadMappingLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkloadMappingLifecycleStateEnum(val string) (WorkloadMappingLifecycleStateEnum, bool) { + enum, ok := mappingWorkloadMappingLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/containerengine/workload_mapping_summary.go b/containerengine/workload_mapping_summary.go new file mode 100644 index 0000000000..6ce87b9c79 --- /dev/null +++ b/containerengine/workload_mapping_summary.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkloadMappingSummary The properties that define an workloadMapping summary. +type WorkloadMappingSummary struct { + + // The ocid of the workloadMapping. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // The namespace of the workloadMapping. + Namespace *string `mandatory:"true" json:"namespace"` + + // The OCID of the mapped customer tenancy. + MappedTenancyId *string `mandatory:"true" json:"mappedTenancyId"` + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"true" json:"mappedCompartmentId"` + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The state of the workloadMapping. + LifecycleState WorkloadMappingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m WorkloadMappingSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkloadMappingSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingWorkloadMappingLifecycleStateEnum(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(GetWorkloadMappingLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/create_boot_volume_backup_details.go b/core/create_boot_volume_backup_details.go index 77c9a9e465..91ce59339c 100644 --- a/core/create_boot_volume_backup_details.go +++ b/core/create_boot_volume_backup_details.go @@ -43,6 +43,12 @@ type CreateBootVolumeBackupDetails struct { // The type of backup to create. If omitted, defaults to incremental. Type CreateBootVolumeBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` } func (m CreateBootVolumeBackupDetails) String() string { diff --git a/core/create_volume_backup_details.go b/core/create_volume_backup_details.go index 7f027b9cd3..eec61386fc 100644 --- a/core/create_volume_backup_details.go +++ b/core/create_volume_backup_details.go @@ -27,6 +27,12 @@ type CreateVolumeBackupDetails struct { // The OCID of the volume that needs to be backed up. VolumeId *string `mandatory:"true" json:"volumeId"` + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + // Defined tags for this resource. Each key is predefined and scoped to a // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Operations": {"CostCenter": "42"}}` diff --git a/core/update_boot_volume_backup_details.go b/core/update_boot_volume_backup_details.go index 39e4ce80be..0b0d5202f4 100644 --- a/core/update_boot_volume_backup_details.go +++ b/core/update_boot_volume_backup_details.go @@ -37,6 +37,12 @@ type UpdateBootVolumeBackupDetails struct { // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` } func (m UpdateBootVolumeBackupDetails) String() string { diff --git a/core/update_volume_backup_details.go b/core/update_volume_backup_details.go index 4111bafe57..6280b1a233 100644 --- a/core/update_volume_backup_details.go +++ b/core/update_volume_backup_details.go @@ -37,6 +37,12 @@ type UpdateVolumeBackupDetails struct { // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` } func (m UpdateVolumeBackupDetails) String() string { diff --git a/databasemigration/create_curl_transfer_details.go b/databasemigration/create_curl_transfer_details.go index fc9d58444a..7d2414d3c4 100644 --- a/databasemigration/create_curl_transfer_details.go +++ b/databasemigration/create_curl_transfer_details.go @@ -18,6 +18,14 @@ import ( // CreateCurlTransferDetails Optional properties for Curl-based dump transfer in source or target host. type CreateCurlTransferDetails struct { + + // Directory path to OCI SSL wallet location on Db server node. + WalletLocation *string `mandatory:"false" json:"walletLocation"` +} + +//GetWalletLocation returns WalletLocation +func (m CreateCurlTransferDetails) GetWalletLocation() *string { + return m.WalletLocation } func (m CreateCurlTransferDetails) String() string { diff --git a/databasemigration/create_host_dump_transfer_details.go b/databasemigration/create_host_dump_transfer_details.go index 0db068ca1e..68f9bc9e09 100644 --- a/databasemigration/create_host_dump_transfer_details.go +++ b/databasemigration/create_host_dump_transfer_details.go @@ -18,11 +18,15 @@ import ( // CreateHostDumpTransferDetails Optional additional properties for dump transfer in source or target host. Default kind is CURL type CreateHostDumpTransferDetails interface { + + // Directory path to OCI SSL wallet location on Db server node. + GetWalletLocation() *string } type createhostdumptransferdetails struct { - JsonData []byte - Kind string `json:"kind"` + JsonData []byte + WalletLocation *string `mandatory:"false" json:"walletLocation"` + Kind string `json:"kind"` } // UnmarshalJSON unmarshals json @@ -36,6 +40,7 @@ func (m *createhostdumptransferdetails) UnmarshalJSON(data []byte) error { if err != nil { return err } + m.WalletLocation = s.Model.WalletLocation m.Kind = s.Model.Kind return err @@ -64,6 +69,11 @@ func (m *createhostdumptransferdetails) UnmarshalPolymorphicJSON(data []byte) (i } } +//GetWalletLocation returns WalletLocation +func (m createhostdumptransferdetails) GetWalletLocation() *string { + return m.WalletLocation +} + func (m createhostdumptransferdetails) String() string { return common.PointerString(m) } diff --git a/databasemigration/create_oci_cli_dump_transfer_details.go b/databasemigration/create_oci_cli_dump_transfer_details.go index 568cdec93a..50b2bd2efc 100644 --- a/databasemigration/create_oci_cli_dump_transfer_details.go +++ b/databasemigration/create_oci_cli_dump_transfer_details.go @@ -21,6 +21,14 @@ type CreateOciCliDumpTransferDetails struct { // Path to the OCI CLI installation in the node. OciHome *string `mandatory:"true" json:"ociHome"` + + // Directory path to OCI SSL wallet location on Db server node. + WalletLocation *string `mandatory:"false" json:"walletLocation"` +} + +//GetWalletLocation returns WalletLocation +func (m CreateOciCliDumpTransferDetails) GetWalletLocation() *string { + return m.WalletLocation } func (m CreateOciCliDumpTransferDetails) String() string { diff --git a/databasemigration/curl_transfer_details.go b/databasemigration/curl_transfer_details.go index c341d53705..e518842093 100644 --- a/databasemigration/curl_transfer_details.go +++ b/databasemigration/curl_transfer_details.go @@ -18,6 +18,14 @@ import ( // CurlTransferDetails Optional properties for Curl-based dump transfer in source or target host. type CurlTransferDetails struct { + + // Directory path to OCI SSL wallet location on Db server node. + WalletLocation *string `mandatory:"false" json:"walletLocation"` +} + +//GetWalletLocation returns WalletLocation +func (m CurlTransferDetails) GetWalletLocation() *string { + return m.WalletLocation } func (m CurlTransferDetails) String() string { diff --git a/databasemigration/host_dump_transfer_details.go b/databasemigration/host_dump_transfer_details.go index a010a28246..0ad88550a9 100644 --- a/databasemigration/host_dump_transfer_details.go +++ b/databasemigration/host_dump_transfer_details.go @@ -18,11 +18,15 @@ import ( // HostDumpTransferDetails Optional additional properties for dump transfer in source or target host. Default kind is CURL type HostDumpTransferDetails interface { + + // Directory path to OCI SSL wallet location on Db server node. + GetWalletLocation() *string } type hostdumptransferdetails struct { - JsonData []byte - Kind string `json:"kind"` + JsonData []byte + WalletLocation *string `mandatory:"false" json:"walletLocation"` + Kind string `json:"kind"` } // UnmarshalJSON unmarshals json @@ -36,6 +40,7 @@ func (m *hostdumptransferdetails) UnmarshalJSON(data []byte) error { if err != nil { return err } + m.WalletLocation = s.Model.WalletLocation m.Kind = s.Model.Kind return err @@ -64,6 +69,11 @@ func (m *hostdumptransferdetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } +//GetWalletLocation returns WalletLocation +func (m hostdumptransferdetails) GetWalletLocation() *string { + return m.WalletLocation +} + func (m hostdumptransferdetails) String() string { return common.PointerString(m) } diff --git a/databasemigration/oci_cli_dump_transfer_details.go b/databasemigration/oci_cli_dump_transfer_details.go index 67fc3910b2..72ceeffe72 100644 --- a/databasemigration/oci_cli_dump_transfer_details.go +++ b/databasemigration/oci_cli_dump_transfer_details.go @@ -19,10 +19,18 @@ import ( // OciCliDumpTransferDetails Optional dump transfer details for OCI-CLI-based dump transfer in source or target host. type OciCliDumpTransferDetails struct { + // Directory path to OCI SSL wallet location on Db server node. + WalletLocation *string `mandatory:"false" json:"walletLocation"` + // Path to the OCI CLI installation in the node. OciHome *string `mandatory:"false" json:"ociHome"` } +//GetWalletLocation returns WalletLocation +func (m OciCliDumpTransferDetails) GetWalletLocation() *string { + return m.WalletLocation +} + func (m OciCliDumpTransferDetails) String() string { return common.PointerString(m) } diff --git a/databasemigration/update_curl_transfer_details.go b/databasemigration/update_curl_transfer_details.go index 6ec51d6d6b..1d251a6d98 100644 --- a/databasemigration/update_curl_transfer_details.go +++ b/databasemigration/update_curl_transfer_details.go @@ -18,6 +18,14 @@ import ( // UpdateCurlTransferDetails Optional properties for Curl-based dump transfer in source or target host. type UpdateCurlTransferDetails struct { + + // Directory path to OCI SSL wallet location on Db server node. + WalletLocation *string `mandatory:"false" json:"walletLocation"` +} + +//GetWalletLocation returns WalletLocation +func (m UpdateCurlTransferDetails) GetWalletLocation() *string { + return m.WalletLocation } func (m UpdateCurlTransferDetails) String() string { diff --git a/databasemigration/update_host_dump_transfer_details.go b/databasemigration/update_host_dump_transfer_details.go index 2d46837c32..5cd072b87e 100644 --- a/databasemigration/update_host_dump_transfer_details.go +++ b/databasemigration/update_host_dump_transfer_details.go @@ -18,11 +18,15 @@ import ( // UpdateHostDumpTransferDetails Optional additional properties for dump transfer in source or target host. Default kind is CURL type UpdateHostDumpTransferDetails interface { + + // Directory path to OCI SSL wallet location on Db server node. + GetWalletLocation() *string } type updatehostdumptransferdetails struct { - JsonData []byte - Kind string `json:"kind"` + JsonData []byte + WalletLocation *string `mandatory:"false" json:"walletLocation"` + Kind string `json:"kind"` } // UnmarshalJSON unmarshals json @@ -36,6 +40,7 @@ func (m *updatehostdumptransferdetails) UnmarshalJSON(data []byte) error { if err != nil { return err } + m.WalletLocation = s.Model.WalletLocation m.Kind = s.Model.Kind return err @@ -64,6 +69,11 @@ func (m *updatehostdumptransferdetails) UnmarshalPolymorphicJSON(data []byte) (i } } +//GetWalletLocation returns WalletLocation +func (m updatehostdumptransferdetails) GetWalletLocation() *string { + return m.WalletLocation +} + func (m updatehostdumptransferdetails) String() string { return common.PointerString(m) } diff --git a/databasemigration/update_oci_cli_dump_transfer_details.go b/databasemigration/update_oci_cli_dump_transfer_details.go index a3dd09b181..3a54dec86f 100644 --- a/databasemigration/update_oci_cli_dump_transfer_details.go +++ b/databasemigration/update_oci_cli_dump_transfer_details.go @@ -21,6 +21,14 @@ type UpdateOciCliDumpTransferDetails struct { // Path to the OCI CLI installation in the node. OciHome *string `mandatory:"true" json:"ociHome"` + + // Directory path to OCI SSL wallet location on Db server node. + WalletLocation *string `mandatory:"false" json:"walletLocation"` +} + +//GetWalletLocation returns WalletLocation +func (m UpdateOciCliDumpTransferDetails) GetWalletLocation() *string { + return m.WalletLocation } func (m UpdateOciCliDumpTransferDetails) String() string { diff --git a/dataintegration/composite_state.go b/dataintegration/composite_state.go new file mode 100644 index 0000000000..69df5ddf87 --- /dev/null +++ b/dataintegration/composite_state.go @@ -0,0 +1,121 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompositeState The composite state object provides information on the state of a task or schedule. +type CompositeState struct { + + // The type of the Composite State Aggregator. + CompositeStateAggregator CompositeStateCompositeStateAggregatorEnum `mandatory:"false" json:"compositeStateAggregator,omitempty"` + + // Generated key that can be used in API calls to identify Composite State. + Key *string `mandatory:"false" json:"key"` + + // The type of the object. + ModelType *string `mandatory:"false" json:"modelType"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // Detailed description for the object. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Map that stores all the States for a given Task or Schedule + AllStatesMap map[string]State `mandatory:"false" json:"allStatesMap"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` +} + +func (m CompositeState) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompositeState) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCompositeStateCompositeStateAggregatorEnum(string(m.CompositeStateAggregator)); !ok && m.CompositeStateAggregator != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CompositeStateAggregator: %s. Supported values are: %s.", m.CompositeStateAggregator, strings.Join(GetCompositeStateCompositeStateAggregatorEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CompositeStateCompositeStateAggregatorEnum Enum with underlying type: string +type CompositeStateCompositeStateAggregatorEnum string + +// Set of constants representing the allowable values for CompositeStateCompositeStateAggregatorEnum +const ( + CompositeStateCompositeStateAggregatorTaskSchedule CompositeStateCompositeStateAggregatorEnum = "TASK_SCHEDULE" + CompositeStateCompositeStateAggregatorTask CompositeStateCompositeStateAggregatorEnum = "TASK" + CompositeStateCompositeStateAggregatorTaskOperator CompositeStateCompositeStateAggregatorEnum = "TASK_OPERATOR" +) + +var mappingCompositeStateCompositeStateAggregatorEnum = map[string]CompositeStateCompositeStateAggregatorEnum{ + "TASK_SCHEDULE": CompositeStateCompositeStateAggregatorTaskSchedule, + "TASK": CompositeStateCompositeStateAggregatorTask, + "TASK_OPERATOR": CompositeStateCompositeStateAggregatorTaskOperator, +} + +var mappingCompositeStateCompositeStateAggregatorEnumLowerCase = map[string]CompositeStateCompositeStateAggregatorEnum{ + "task_schedule": CompositeStateCompositeStateAggregatorTaskSchedule, + "task": CompositeStateCompositeStateAggregatorTask, + "task_operator": CompositeStateCompositeStateAggregatorTaskOperator, +} + +// GetCompositeStateCompositeStateAggregatorEnumValues Enumerates the set of values for CompositeStateCompositeStateAggregatorEnum +func GetCompositeStateCompositeStateAggregatorEnumValues() []CompositeStateCompositeStateAggregatorEnum { + values := make([]CompositeStateCompositeStateAggregatorEnum, 0) + for _, v := range mappingCompositeStateCompositeStateAggregatorEnum { + values = append(values, v) + } + return values +} + +// GetCompositeStateCompositeStateAggregatorEnumStringValues Enumerates the set of values in String for CompositeStateCompositeStateAggregatorEnum +func GetCompositeStateCompositeStateAggregatorEnumStringValues() []string { + return []string{ + "TASK_SCHEDULE", + "TASK", + "TASK_OPERATOR", + } +} + +// GetMappingCompositeStateCompositeStateAggregatorEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCompositeStateCompositeStateAggregatorEnum(val string) (CompositeStateCompositeStateAggregatorEnum, bool) { + enum, ok := mappingCompositeStateCompositeStateAggregatorEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/connection.go b/dataintegration/connection.go index b25af93342..56eb23daa7 100644 --- a/dataintegration/connection.go +++ b/dataintegration/connection.go @@ -112,6 +112,34 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) var err error switch m.ModelType { + case "AMAZON_S3_CONNECTION": + mm := ConnectionFromAmazonS3{} + err = json.Unmarshal(data, &mm) + return mm, err + case "BIP_CONNECTION": + mm := ConnectionFromBip{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MYSQL_CONNECTION": + mm := ConnectionFromMySql{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC_JDBC_CONNECTION": + mm := ConnectionFromJdbc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "BICC_CONNECTION": + mm := ConnectionFromBicc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MYSQL_HEATWAVE_CONNECTION": + mm := ConnectionFromMySqlHeatWave{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REST_BASIC_AUTH_CONNECTION": + mm := ConnectionFromRestBasicAuth{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLE_OBJECT_STORAGE_CONNECTION": mm := ConnectionFromObjectStorage{} err = json.Unmarshal(data, &mm) @@ -128,24 +156,20 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) mm := ConnectionFromOracle{} err = json.Unmarshal(data, &mm) return mm, err - case "AMAZON_S3_CONNECTION": - mm := ConnectionFromAmazonS3{} + case "ORACLE_PEOPLESOFT_CONNECTION": + mm := ConnectionFromOraclePeopleSoft{} err = json.Unmarshal(data, &mm) return mm, err - case "BIP_CONNECTION": - mm := ConnectionFromBip{} + case "HDFS_CONNECTION": + mm := ConnectionFromHdfs{} err = json.Unmarshal(data, &mm) return mm, err - case "MYSQL_CONNECTION": - mm := ConnectionFromMySql{} + case "ORACLE_EBS_CONNECTION": + mm := ConnectionFromOracleEbs{} err = json.Unmarshal(data, &mm) return mm, err - case "GENERIC_JDBC_CONNECTION": - mm := ConnectionFromJdbc{} - err = json.Unmarshal(data, &mm) - return mm, err - case "BICC_CONNECTION": - mm := ConnectionFromBicc{} + case "ORACLE_SIEBEL_CONNECTION": + mm := ConnectionFromOracleSiebel{} err = json.Unmarshal(data, &mm) return mm, err case "REST_NO_AUTH_CONNECTION": @@ -156,10 +180,6 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) mm := ConnectionFromLake{} err = json.Unmarshal(data, &mm) return mm, err - case "REST_BASIC_AUTH_CONNECTION": - mm := ConnectionFromRestBasicAuth{} - err = json.Unmarshal(data, &mm) - return mm, err default: common.Logf("Recieved unsupported enum value for Connection: %s.", m.ModelType) return *m, nil @@ -262,6 +282,11 @@ const ( ConnectionModelTypeAmazonS3Connection ConnectionModelTypeEnum = "AMAZON_S3_CONNECTION" ConnectionModelTypeBipConnection ConnectionModelTypeEnum = "BIP_CONNECTION" ConnectionModelTypeLakeConnection ConnectionModelTypeEnum = "LAKE_CONNECTION" + ConnectionModelTypeOraclePeoplesoftConnection ConnectionModelTypeEnum = "ORACLE_PEOPLESOFT_CONNECTION" + ConnectionModelTypeOracleEbsConnection ConnectionModelTypeEnum = "ORACLE_EBS_CONNECTION" + ConnectionModelTypeOracleSiebelConnection ConnectionModelTypeEnum = "ORACLE_SIEBEL_CONNECTION" + ConnectionModelTypeHdfsConnection ConnectionModelTypeEnum = "HDFS_CONNECTION" + ConnectionModelTypeMysqlHeatwaveConnection ConnectionModelTypeEnum = "MYSQL_HEATWAVE_CONNECTION" ConnectionModelTypeRestNoAuthConnection ConnectionModelTypeEnum = "REST_NO_AUTH_CONNECTION" ConnectionModelTypeRestBasicAuthConnection ConnectionModelTypeEnum = "REST_BASIC_AUTH_CONNECTION" ) @@ -277,6 +302,11 @@ var mappingConnectionModelTypeEnum = map[string]ConnectionModelTypeEnum{ "AMAZON_S3_CONNECTION": ConnectionModelTypeAmazonS3Connection, "BIP_CONNECTION": ConnectionModelTypeBipConnection, "LAKE_CONNECTION": ConnectionModelTypeLakeConnection, + "ORACLE_PEOPLESOFT_CONNECTION": ConnectionModelTypeOraclePeoplesoftConnection, + "ORACLE_EBS_CONNECTION": ConnectionModelTypeOracleEbsConnection, + "ORACLE_SIEBEL_CONNECTION": ConnectionModelTypeOracleSiebelConnection, + "HDFS_CONNECTION": ConnectionModelTypeHdfsConnection, + "MYSQL_HEATWAVE_CONNECTION": ConnectionModelTypeMysqlHeatwaveConnection, "REST_NO_AUTH_CONNECTION": ConnectionModelTypeRestNoAuthConnection, "REST_BASIC_AUTH_CONNECTION": ConnectionModelTypeRestBasicAuthConnection, } @@ -292,6 +322,11 @@ var mappingConnectionModelTypeEnumLowerCase = map[string]ConnectionModelTypeEnum "amazon_s3_connection": ConnectionModelTypeAmazonS3Connection, "bip_connection": ConnectionModelTypeBipConnection, "lake_connection": ConnectionModelTypeLakeConnection, + "oracle_peoplesoft_connection": ConnectionModelTypeOraclePeoplesoftConnection, + "oracle_ebs_connection": ConnectionModelTypeOracleEbsConnection, + "oracle_siebel_connection": ConnectionModelTypeOracleSiebelConnection, + "hdfs_connection": ConnectionModelTypeHdfsConnection, + "mysql_heatwave_connection": ConnectionModelTypeMysqlHeatwaveConnection, "rest_no_auth_connection": ConnectionModelTypeRestNoAuthConnection, "rest_basic_auth_connection": ConnectionModelTypeRestBasicAuthConnection, } @@ -318,6 +353,11 @@ func GetConnectionModelTypeEnumStringValues() []string { "AMAZON_S3_CONNECTION", "BIP_CONNECTION", "LAKE_CONNECTION", + "ORACLE_PEOPLESOFT_CONNECTION", + "ORACLE_EBS_CONNECTION", + "ORACLE_SIEBEL_CONNECTION", + "HDFS_CONNECTION", + "MYSQL_HEATWAVE_CONNECTION", "REST_NO_AUTH_CONNECTION", "REST_BASIC_AUTH_CONNECTION", } diff --git a/dataintegration/connection_details.go b/dataintegration/connection_details.go index 7fabf6ea2d..94f42cc821 100644 --- a/dataintegration/connection_details.go +++ b/dataintegration/connection_details.go @@ -123,32 +123,52 @@ func (m *connectiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := ConnectionFromObjectStorageDetails{} err = json.Unmarshal(data, &mm) return mm, err - case "BICC_CONNECTION": - mm := ConnectionFromBiccDetails{} + case "ORACLE_SIEBEL_CONNECTION": + mm := ConnectionFromOracleSiebelDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "HDFS_CONNECTION": + mm := ConnectionFromHdfsDetails{} err = json.Unmarshal(data, &mm) return mm, err case "MYSQL_CONNECTION": mm := ConnectionFromMySqlDetails{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLE_ADWC_CONNECTION": - mm := ConnectionFromAdwcDetails{} + case "MYSQL_HEATWAVE_CONNECTION": + mm := ConnectionFromMySqlHeatWaveDetails{} err = json.Unmarshal(data, &mm) return mm, err case "ORACLE_ATP_CONNECTION": mm := ConnectionFromAtpDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "ORACLE_PEOPLESOFT_CONNECTION": + mm := ConnectionFromOraclePeopleSoftDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REST_BASIC_AUTH_CONNECTION": + mm := ConnectionFromRestBasicAuthDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "BICC_CONNECTION": + mm := ConnectionFromBiccDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_ADWC_CONNECTION": + mm := ConnectionFromAdwcDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLEDB_CONNECTION": mm := ConnectionFromOracleDetails{} err = json.Unmarshal(data, &mm) return mm, err - case "LAKE_CONNECTION": - mm := ConnectionFromLakeDetails{} + case "ORACLE_EBS_CONNECTION": + mm := ConnectionFromOracleEbsDetails{} err = json.Unmarshal(data, &mm) return mm, err - case "REST_BASIC_AUTH_CONNECTION": - mm := ConnectionFromRestBasicAuthDetails{} + case "LAKE_CONNECTION": + mm := ConnectionFromLakeDetails{} err = json.Unmarshal(data, &mm) return mm, err case "BIP_CONNECTION": @@ -252,6 +272,11 @@ const ( ConnectionDetailsModelTypeAmazonS3Connection ConnectionDetailsModelTypeEnum = "AMAZON_S3_CONNECTION" ConnectionDetailsModelTypeBipConnection ConnectionDetailsModelTypeEnum = "BIP_CONNECTION" ConnectionDetailsModelTypeLakeConnection ConnectionDetailsModelTypeEnum = "LAKE_CONNECTION" + ConnectionDetailsModelTypeOraclePeoplesoftConnection ConnectionDetailsModelTypeEnum = "ORACLE_PEOPLESOFT_CONNECTION" + ConnectionDetailsModelTypeOracleEbsConnection ConnectionDetailsModelTypeEnum = "ORACLE_EBS_CONNECTION" + ConnectionDetailsModelTypeOracleSiebelConnection ConnectionDetailsModelTypeEnum = "ORACLE_SIEBEL_CONNECTION" + ConnectionDetailsModelTypeHdfsConnection ConnectionDetailsModelTypeEnum = "HDFS_CONNECTION" + ConnectionDetailsModelTypeMysqlHeatwaveConnection ConnectionDetailsModelTypeEnum = "MYSQL_HEATWAVE_CONNECTION" ConnectionDetailsModelTypeRestNoAuthConnection ConnectionDetailsModelTypeEnum = "REST_NO_AUTH_CONNECTION" ConnectionDetailsModelTypeRestBasicAuthConnection ConnectionDetailsModelTypeEnum = "REST_BASIC_AUTH_CONNECTION" ) @@ -267,6 +292,11 @@ var mappingConnectionDetailsModelTypeEnum = map[string]ConnectionDetailsModelTyp "AMAZON_S3_CONNECTION": ConnectionDetailsModelTypeAmazonS3Connection, "BIP_CONNECTION": ConnectionDetailsModelTypeBipConnection, "LAKE_CONNECTION": ConnectionDetailsModelTypeLakeConnection, + "ORACLE_PEOPLESOFT_CONNECTION": ConnectionDetailsModelTypeOraclePeoplesoftConnection, + "ORACLE_EBS_CONNECTION": ConnectionDetailsModelTypeOracleEbsConnection, + "ORACLE_SIEBEL_CONNECTION": ConnectionDetailsModelTypeOracleSiebelConnection, + "HDFS_CONNECTION": ConnectionDetailsModelTypeHdfsConnection, + "MYSQL_HEATWAVE_CONNECTION": ConnectionDetailsModelTypeMysqlHeatwaveConnection, "REST_NO_AUTH_CONNECTION": ConnectionDetailsModelTypeRestNoAuthConnection, "REST_BASIC_AUTH_CONNECTION": ConnectionDetailsModelTypeRestBasicAuthConnection, } @@ -282,6 +312,11 @@ var mappingConnectionDetailsModelTypeEnumLowerCase = map[string]ConnectionDetail "amazon_s3_connection": ConnectionDetailsModelTypeAmazonS3Connection, "bip_connection": ConnectionDetailsModelTypeBipConnection, "lake_connection": ConnectionDetailsModelTypeLakeConnection, + "oracle_peoplesoft_connection": ConnectionDetailsModelTypeOraclePeoplesoftConnection, + "oracle_ebs_connection": ConnectionDetailsModelTypeOracleEbsConnection, + "oracle_siebel_connection": ConnectionDetailsModelTypeOracleSiebelConnection, + "hdfs_connection": ConnectionDetailsModelTypeHdfsConnection, + "mysql_heatwave_connection": ConnectionDetailsModelTypeMysqlHeatwaveConnection, "rest_no_auth_connection": ConnectionDetailsModelTypeRestNoAuthConnection, "rest_basic_auth_connection": ConnectionDetailsModelTypeRestBasicAuthConnection, } @@ -308,6 +343,11 @@ func GetConnectionDetailsModelTypeEnumStringValues() []string { "AMAZON_S3_CONNECTION", "BIP_CONNECTION", "LAKE_CONNECTION", + "ORACLE_PEOPLESOFT_CONNECTION", + "ORACLE_EBS_CONNECTION", + "ORACLE_SIEBEL_CONNECTION", + "HDFS_CONNECTION", + "MYSQL_HEATWAVE_CONNECTION", "REST_NO_AUTH_CONNECTION", "REST_BASIC_AUTH_CONNECTION", } diff --git a/dataintegration/connection_from_hdfs.go b/dataintegration/connection_from_hdfs.go new file mode 100644 index 0000000000..707f70aa21 --- /dev/null +++ b/dataintegration/connection_from_hdfs.go @@ -0,0 +1,169 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromHdfs The connection details for the HDFS data asset. +type ConnectionFromHdfs struct { + + // The HDFS principal. + HdfsPrincipal *string `mandatory:"true" json:"hdfsPrincipal"` + + // The HDFS Data Node principal. + DataNodePrincipal *string `mandatory:"true" json:"dataNodePrincipal"` + + // The HDFS Name Node principal. + NameNodePrincipal *string `mandatory:"true" json:"nameNodePrincipal"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // HDFS Realm name. + Realm *string `mandatory:"false" json:"realm"` + + // The HDFS Key Distribution Center. + KeyDistributionCenter *string `mandatory:"false" json:"keyDistributionCenter"` + + KeyTabContent *SensitiveAttribute `mandatory:"false" json:"keyTabContent"` +} + +//GetKey returns Key +func (m ConnectionFromHdfs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromHdfs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromHdfs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromHdfs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromHdfs) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromHdfs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromHdfs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromHdfs) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromHdfs) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromHdfs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromHdfs) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromHdfs) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionFromHdfs) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionFromHdfs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromHdfs) 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 ConnectionFromHdfs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromHdfs ConnectionFromHdfs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromHdfs + }{ + "HDFS_CONNECTION", + (MarshalTypeConnectionFromHdfs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_hdfs_details.go b/dataintegration/connection_from_hdfs_details.go new file mode 100644 index 0000000000..3bd953abe5 --- /dev/null +++ b/dataintegration/connection_from_hdfs_details.go @@ -0,0 +1,161 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromHdfsDetails The connection details for the HDFS data asset. +type ConnectionFromHdfsDetails struct { + + // The HDFS principal. + HdfsPrincipal *string `mandatory:"true" json:"hdfsPrincipal"` + + // The HDFS Data Node principal. + DataNodePrincipal *string `mandatory:"true" json:"dataNodePrincipal"` + + // The HDFS Name Node principal. + NameNodePrincipal *string `mandatory:"true" json:"nameNodePrincipal"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // HDFS Realm name. + Realm *string `mandatory:"false" json:"realm"` + + // The HDFS Key Distribution Center. + KeyDistributionCenter *string `mandatory:"false" json:"keyDistributionCenter"` + + KeyTabContent *SensitiveAttribute `mandatory:"false" json:"keyTabContent"` +} + +//GetKey returns Key +func (m ConnectionFromHdfsDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromHdfsDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromHdfsDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromHdfsDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromHdfsDetails) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromHdfsDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromHdfsDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromHdfsDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromHdfsDetails) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromHdfsDetails) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromHdfsDetails) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromHdfsDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m ConnectionFromHdfsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromHdfsDetails) 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 ConnectionFromHdfsDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromHdfsDetails ConnectionFromHdfsDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromHdfsDetails + }{ + "HDFS_CONNECTION", + (MarshalTypeConnectionFromHdfsDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_my_sql_heat_wave.go b/dataintegration/connection_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..f346d478d2 --- /dev/null +++ b/dataintegration/connection_from_my_sql_heat_wave.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromMySqlHeatWave The connection details for a MYSQL HeatWave data asset. +type ConnectionFromMySqlHeatWave struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // The user name for the connection. + Username *string `mandatory:"false" json:"username"` + + // The password for the connection. + Password *string `mandatory:"false" json:"password"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromMySqlHeatWave) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromMySqlHeatWave) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromMySqlHeatWave) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromMySqlHeatWave) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromMySqlHeatWave) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromMySqlHeatWave) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionFromMySqlHeatWave) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromMySqlHeatWave) 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 ConnectionFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromMySqlHeatWave ConnectionFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_CONNECTION", + (MarshalTypeConnectionFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_my_sql_heat_wave_details.go b/dataintegration/connection_from_my_sql_heat_wave_details.go new file mode 100644 index 0000000000..b414c97f73 --- /dev/null +++ b/dataintegration/connection_from_my_sql_heat_wave_details.go @@ -0,0 +1,152 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromMySqlHeatWaveDetails The connection details for a MYSQL HeatWave data asset. +type ConnectionFromMySqlHeatWaveDetails struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The user name for the connection. + Username *string `mandatory:"false" json:"username"` + + // The password for the connection. + Password *string `mandatory:"false" json:"password"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromMySqlHeatWaveDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromMySqlHeatWaveDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromMySqlHeatWaveDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromMySqlHeatWaveDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromMySqlHeatWaveDetails) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromMySqlHeatWaveDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromMySqlHeatWaveDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromMySqlHeatWaveDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromMySqlHeatWaveDetails) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromMySqlHeatWaveDetails) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromMySqlHeatWaveDetails) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromMySqlHeatWaveDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m ConnectionFromMySqlHeatWaveDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromMySqlHeatWaveDetails) 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 ConnectionFromMySqlHeatWaveDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromMySqlHeatWaveDetails ConnectionFromMySqlHeatWaveDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromMySqlHeatWaveDetails + }{ + "MYSQL_HEATWAVE_CONNECTION", + (MarshalTypeConnectionFromMySqlHeatWaveDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_oracle_ebs.go b/dataintegration/connection_from_oracle_ebs.go new file mode 100644 index 0000000000..47eafba749 --- /dev/null +++ b/dataintegration/connection_from_oracle_ebs.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromOracleEbs The connection details for E-Business Suite data asset. +type ConnectionFromOracleEbs struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromOracleEbs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromOracleEbs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromOracleEbs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromOracleEbs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromOracleEbs) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromOracleEbs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromOracleEbs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromOracleEbs) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromOracleEbs) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromOracleEbs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromOracleEbs) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromOracleEbs) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionFromOracleEbs) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionFromOracleEbs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromOracleEbs) 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 ConnectionFromOracleEbs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromOracleEbs ConnectionFromOracleEbs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromOracleEbs + }{ + "ORACLE_EBS_CONNECTION", + (MarshalTypeConnectionFromOracleEbs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_oracle_ebs_details.go b/dataintegration/connection_from_oracle_ebs_details.go new file mode 100644 index 0000000000..aa90f91216 --- /dev/null +++ b/dataintegration/connection_from_oracle_ebs_details.go @@ -0,0 +1,152 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromOracleEbsDetails The connection details for an E-Business Suite data asset. +type ConnectionFromOracleEbsDetails struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromOracleEbsDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromOracleEbsDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromOracleEbsDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromOracleEbsDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromOracleEbsDetails) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromOracleEbsDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromOracleEbsDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromOracleEbsDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromOracleEbsDetails) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromOracleEbsDetails) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromOracleEbsDetails) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromOracleEbsDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m ConnectionFromOracleEbsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromOracleEbsDetails) 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 ConnectionFromOracleEbsDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromOracleEbsDetails ConnectionFromOracleEbsDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromOracleEbsDetails + }{ + "ORACLE_EBS_CONNECTION", + (MarshalTypeConnectionFromOracleEbsDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_oracle_people_soft.go b/dataintegration/connection_from_oracle_people_soft.go new file mode 100644 index 0000000000..6bfb8a4e2d --- /dev/null +++ b/dataintegration/connection_from_oracle_people_soft.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromOraclePeopleSoft The connection details for an Oracle PeopleSoft data asset. +type ConnectionFromOraclePeopleSoft struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromOraclePeopleSoft) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromOraclePeopleSoft) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromOraclePeopleSoft) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromOraclePeopleSoft) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromOraclePeopleSoft) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromOraclePeopleSoft) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromOraclePeopleSoft) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromOraclePeopleSoft) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromOraclePeopleSoft) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromOraclePeopleSoft) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromOraclePeopleSoft) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromOraclePeopleSoft) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionFromOraclePeopleSoft) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionFromOraclePeopleSoft) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromOraclePeopleSoft) 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 ConnectionFromOraclePeopleSoft) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromOraclePeopleSoft ConnectionFromOraclePeopleSoft + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromOraclePeopleSoft + }{ + "ORACLE_PEOPLESOFT_CONNECTION", + (MarshalTypeConnectionFromOraclePeopleSoft)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_oracle_people_soft_details.go b/dataintegration/connection_from_oracle_people_soft_details.go new file mode 100644 index 0000000000..299e964e23 --- /dev/null +++ b/dataintegration/connection_from_oracle_people_soft_details.go @@ -0,0 +1,152 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromOraclePeopleSoftDetails The connection details for an Oracle PeopleSoft data asset. +type ConnectionFromOraclePeopleSoftDetails struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromOraclePeopleSoftDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromOraclePeopleSoftDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromOraclePeopleSoftDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromOraclePeopleSoftDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromOraclePeopleSoftDetails) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromOraclePeopleSoftDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromOraclePeopleSoftDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromOraclePeopleSoftDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromOraclePeopleSoftDetails) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromOraclePeopleSoftDetails) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromOraclePeopleSoftDetails) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromOraclePeopleSoftDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m ConnectionFromOraclePeopleSoftDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromOraclePeopleSoftDetails) 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 ConnectionFromOraclePeopleSoftDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromOraclePeopleSoftDetails ConnectionFromOraclePeopleSoftDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromOraclePeopleSoftDetails + }{ + "ORACLE_PEOPLESOFT_CONNECTION", + (MarshalTypeConnectionFromOraclePeopleSoftDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_oracle_siebel.go b/dataintegration/connection_from_oracle_siebel.go new file mode 100644 index 0000000000..78dcde773a --- /dev/null +++ b/dataintegration/connection_from_oracle_siebel.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromOracleSiebel The connection details for an Oracle Siebel data asset. +type ConnectionFromOracleSiebel struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromOracleSiebel) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromOracleSiebel) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromOracleSiebel) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromOracleSiebel) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromOracleSiebel) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromOracleSiebel) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromOracleSiebel) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromOracleSiebel) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromOracleSiebel) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromOracleSiebel) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromOracleSiebel) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromOracleSiebel) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionFromOracleSiebel) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionFromOracleSiebel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromOracleSiebel) 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 ConnectionFromOracleSiebel) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromOracleSiebel ConnectionFromOracleSiebel + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromOracleSiebel + }{ + "ORACLE_SIEBEL_CONNECTION", + (MarshalTypeConnectionFromOracleSiebel)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_from_oracle_siebel_details.go b/dataintegration/connection_from_oracle_siebel_details.go new file mode 100644 index 0000000000..46c857e1ca --- /dev/null +++ b/dataintegration/connection_from_oracle_siebel_details.go @@ -0,0 +1,152 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionFromOracleSiebelDetails The connection details for an Oracle Siebel data asset. +type ConnectionFromOracleSiebelDetails struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionFromOracleSiebelDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionFromOracleSiebelDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionFromOracleSiebelDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionFromOracleSiebelDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionFromOracleSiebelDetails) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionFromOracleSiebelDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionFromOracleSiebelDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionFromOracleSiebelDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionFromOracleSiebelDetails) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionFromOracleSiebelDetails) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionFromOracleSiebelDetails) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionFromOracleSiebelDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m ConnectionFromOracleSiebelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionFromOracleSiebelDetails) 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 ConnectionFromOracleSiebelDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionFromOracleSiebelDetails ConnectionFromOracleSiebelDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionFromOracleSiebelDetails + }{ + "ORACLE_SIEBEL_CONNECTION", + (MarshalTypeConnectionFromOracleSiebelDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_summary.go b/dataintegration/connection_summary.go index ffe2049e71..db46fdb190 100644 --- a/dataintegration/connection_summary.go +++ b/dataintegration/connection_summary.go @@ -116,28 +116,32 @@ func (m *connectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := ConnectionSummaryFromJdbc{} err = json.Unmarshal(data, &mm) return mm, err - case "BICC_CONNECTION": - mm := ConnectionSummaryFromBicc{} - err = json.Unmarshal(data, &mm) - return mm, err case "REST_NO_AUTH_CONNECTION": mm := ConnectionSummaryFromRestNoAuth{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLE_ATP_CONNECTION": - mm := ConnectionSummaryFromAtp{} + case "ORACLE_SIEBEL_CONNECTION": + mm := ConnectionSummaryFromOracleSiebel{} err = json.Unmarshal(data, &mm) return mm, err case "ORACLEDB_CONNECTION": mm := ConnectionSummaryFromOracle{} err = json.Unmarshal(data, &mm) return mm, err + case "MYSQL_HEATWAVE_CONNECTION": + mm := ConnectionSummaryFromMySqlHeatWave{} + err = json.Unmarshal(data, &mm) + return mm, err case "AMAZON_S3_CONNECTION": mm := ConnectionSummaryFromAmazonS3{} err = json.Unmarshal(data, &mm) return mm, err - case "REST_BASIC_AUTH_CONNECTION": - mm := ConnectionSummaryFromRestBasicAuth{} + case "ORACLE_PEOPLESOFT_CONNECTION": + mm := ConnectionSummaryFromOraclePeopleSoft{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_EBS_CONNECTION": + mm := ConnectionSummaryFromOracleEbs{} err = json.Unmarshal(data, &mm) return mm, err case "ORACLE_ADWC_CONNECTION": @@ -156,6 +160,22 @@ func (m *connectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := ConnectionSummaryFromBip{} err = json.Unmarshal(data, &mm) return mm, err + case "HDFS_CONNECTION": + mm := ConnectionSummaryFromHdfs{} + err = json.Unmarshal(data, &mm) + return mm, err + case "BICC_CONNECTION": + mm := ConnectionSummaryFromBicc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_ATP_CONNECTION": + mm := ConnectionSummaryFromAtp{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REST_BASIC_AUTH_CONNECTION": + mm := ConnectionSummaryFromRestBasicAuth{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLE_OBJECT_STORAGE_CONNECTION": mm := ConnectionSummaryFromObjectStorage{} err = json.Unmarshal(data, &mm) @@ -262,6 +282,11 @@ const ( ConnectionSummaryModelTypeAmazonS3Connection ConnectionSummaryModelTypeEnum = "AMAZON_S3_CONNECTION" ConnectionSummaryModelTypeBipConnection ConnectionSummaryModelTypeEnum = "BIP_CONNECTION" ConnectionSummaryModelTypeLakeConnection ConnectionSummaryModelTypeEnum = "LAKE_CONNECTION" + ConnectionSummaryModelTypeOraclePeoplesoftConnection ConnectionSummaryModelTypeEnum = "ORACLE_PEOPLESOFT_CONNECTION" + ConnectionSummaryModelTypeOracleEbsConnection ConnectionSummaryModelTypeEnum = "ORACLE_EBS_CONNECTION" + ConnectionSummaryModelTypeOracleSiebelConnection ConnectionSummaryModelTypeEnum = "ORACLE_SIEBEL_CONNECTION" + ConnectionSummaryModelTypeHdfsConnection ConnectionSummaryModelTypeEnum = "HDFS_CONNECTION" + ConnectionSummaryModelTypeMysqlHeatwaveConnection ConnectionSummaryModelTypeEnum = "MYSQL_HEATWAVE_CONNECTION" ConnectionSummaryModelTypeRestNoAuthConnection ConnectionSummaryModelTypeEnum = "REST_NO_AUTH_CONNECTION" ConnectionSummaryModelTypeRestBasicAuthConnection ConnectionSummaryModelTypeEnum = "REST_BASIC_AUTH_CONNECTION" ) @@ -277,6 +302,11 @@ var mappingConnectionSummaryModelTypeEnum = map[string]ConnectionSummaryModelTyp "AMAZON_S3_CONNECTION": ConnectionSummaryModelTypeAmazonS3Connection, "BIP_CONNECTION": ConnectionSummaryModelTypeBipConnection, "LAKE_CONNECTION": ConnectionSummaryModelTypeLakeConnection, + "ORACLE_PEOPLESOFT_CONNECTION": ConnectionSummaryModelTypeOraclePeoplesoftConnection, + "ORACLE_EBS_CONNECTION": ConnectionSummaryModelTypeOracleEbsConnection, + "ORACLE_SIEBEL_CONNECTION": ConnectionSummaryModelTypeOracleSiebelConnection, + "HDFS_CONNECTION": ConnectionSummaryModelTypeHdfsConnection, + "MYSQL_HEATWAVE_CONNECTION": ConnectionSummaryModelTypeMysqlHeatwaveConnection, "REST_NO_AUTH_CONNECTION": ConnectionSummaryModelTypeRestNoAuthConnection, "REST_BASIC_AUTH_CONNECTION": ConnectionSummaryModelTypeRestBasicAuthConnection, } @@ -292,6 +322,11 @@ var mappingConnectionSummaryModelTypeEnumLowerCase = map[string]ConnectionSummar "amazon_s3_connection": ConnectionSummaryModelTypeAmazonS3Connection, "bip_connection": ConnectionSummaryModelTypeBipConnection, "lake_connection": ConnectionSummaryModelTypeLakeConnection, + "oracle_peoplesoft_connection": ConnectionSummaryModelTypeOraclePeoplesoftConnection, + "oracle_ebs_connection": ConnectionSummaryModelTypeOracleEbsConnection, + "oracle_siebel_connection": ConnectionSummaryModelTypeOracleSiebelConnection, + "hdfs_connection": ConnectionSummaryModelTypeHdfsConnection, + "mysql_heatwave_connection": ConnectionSummaryModelTypeMysqlHeatwaveConnection, "rest_no_auth_connection": ConnectionSummaryModelTypeRestNoAuthConnection, "rest_basic_auth_connection": ConnectionSummaryModelTypeRestBasicAuthConnection, } @@ -318,6 +353,11 @@ func GetConnectionSummaryModelTypeEnumStringValues() []string { "AMAZON_S3_CONNECTION", "BIP_CONNECTION", "LAKE_CONNECTION", + "ORACLE_PEOPLESOFT_CONNECTION", + "ORACLE_EBS_CONNECTION", + "ORACLE_SIEBEL_CONNECTION", + "HDFS_CONNECTION", + "MYSQL_HEATWAVE_CONNECTION", "REST_NO_AUTH_CONNECTION", "REST_BASIC_AUTH_CONNECTION", } diff --git a/dataintegration/connection_summary_from_hdfs.go b/dataintegration/connection_summary_from_hdfs.go new file mode 100644 index 0000000000..98d6e14b5d --- /dev/null +++ b/dataintegration/connection_summary_from_hdfs.go @@ -0,0 +1,169 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionSummaryFromHdfs The connection summary details for the HDFS data asset. +type ConnectionSummaryFromHdfs struct { + + // The HDFS principal. + HdfsPrincipal *string `mandatory:"true" json:"hdfsPrincipal"` + + // The HDFS Data Node principal. + DataNodePrincipal *string `mandatory:"true" json:"dataNodePrincipal"` + + // The HDFS Name Node principal. + NameNodePrincipal *string `mandatory:"true" json:"nameNodePrincipal"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // HDFS Realm name. + Realm *string `mandatory:"false" json:"realm"` + + // The HDFS Key Distribution Center. + KeyDistributionCenter *string `mandatory:"false" json:"keyDistributionCenter"` + + KeyTabContent *SensitiveAttribute `mandatory:"false" json:"keyTabContent"` +} + +//GetKey returns Key +func (m ConnectionSummaryFromHdfs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionSummaryFromHdfs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionSummaryFromHdfs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionSummaryFromHdfs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionSummaryFromHdfs) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionSummaryFromHdfs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionSummaryFromHdfs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionSummaryFromHdfs) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionSummaryFromHdfs) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionSummaryFromHdfs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionSummaryFromHdfs) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionSummaryFromHdfs) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionSummaryFromHdfs) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionSummaryFromHdfs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionSummaryFromHdfs) 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 ConnectionSummaryFromHdfs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionSummaryFromHdfs ConnectionSummaryFromHdfs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionSummaryFromHdfs + }{ + "HDFS_CONNECTION", + (MarshalTypeConnectionSummaryFromHdfs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_summary_from_my_sql_heat_wave.go b/dataintegration/connection_summary_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..90805057a3 --- /dev/null +++ b/dataintegration/connection_summary_from_my_sql_heat_wave.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionSummaryFromMySqlHeatWave The connection details for a MYSQL HeatWave data asset. +type ConnectionSummaryFromMySqlHeatWave struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // The user name for the connection. + Username *string `mandatory:"false" json:"username"` + + // The password for the connection. + Password *string `mandatory:"false" json:"password"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionSummaryFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionSummaryFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionSummaryFromMySqlHeatWave) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionSummaryFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionSummaryFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionSummaryFromMySqlHeatWave) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionSummaryFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionSummaryFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionSummaryFromMySqlHeatWave) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionSummaryFromMySqlHeatWave) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionSummaryFromMySqlHeatWave) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionSummaryFromMySqlHeatWave) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionSummaryFromMySqlHeatWave) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionSummaryFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionSummaryFromMySqlHeatWave) 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 ConnectionSummaryFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionSummaryFromMySqlHeatWave ConnectionSummaryFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionSummaryFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_CONNECTION", + (MarshalTypeConnectionSummaryFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_summary_from_oracle_ebs.go b/dataintegration/connection_summary_from_oracle_ebs.go new file mode 100644 index 0000000000..028629083e --- /dev/null +++ b/dataintegration/connection_summary_from_oracle_ebs.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionSummaryFromOracleEbs The connection summary details for E-Business Suite data asset. +type ConnectionSummaryFromOracleEbs struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionSummaryFromOracleEbs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionSummaryFromOracleEbs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionSummaryFromOracleEbs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionSummaryFromOracleEbs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionSummaryFromOracleEbs) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionSummaryFromOracleEbs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionSummaryFromOracleEbs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionSummaryFromOracleEbs) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionSummaryFromOracleEbs) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionSummaryFromOracleEbs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionSummaryFromOracleEbs) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionSummaryFromOracleEbs) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionSummaryFromOracleEbs) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionSummaryFromOracleEbs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionSummaryFromOracleEbs) 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 ConnectionSummaryFromOracleEbs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionSummaryFromOracleEbs ConnectionSummaryFromOracleEbs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionSummaryFromOracleEbs + }{ + "ORACLE_EBS_CONNECTION", + (MarshalTypeConnectionSummaryFromOracleEbs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_summary_from_oracle_people_soft.go b/dataintegration/connection_summary_from_oracle_people_soft.go new file mode 100644 index 0000000000..63307b7ff1 --- /dev/null +++ b/dataintegration/connection_summary_from_oracle_people_soft.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionSummaryFromOraclePeopleSoft The connection summary details for an Oracle PeopleSoft data asset. +type ConnectionSummaryFromOraclePeopleSoft struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionSummaryFromOraclePeopleSoft) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionSummaryFromOraclePeopleSoft) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionSummaryFromOraclePeopleSoft) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionSummaryFromOraclePeopleSoft) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionSummaryFromOraclePeopleSoft) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionSummaryFromOraclePeopleSoft) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionSummaryFromOraclePeopleSoft) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionSummaryFromOraclePeopleSoft) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionSummaryFromOraclePeopleSoft) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionSummaryFromOraclePeopleSoft) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionSummaryFromOraclePeopleSoft) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionSummaryFromOraclePeopleSoft) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionSummaryFromOraclePeopleSoft) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionSummaryFromOraclePeopleSoft) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionSummaryFromOraclePeopleSoft) 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 ConnectionSummaryFromOraclePeopleSoft) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionSummaryFromOraclePeopleSoft ConnectionSummaryFromOraclePeopleSoft + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionSummaryFromOraclePeopleSoft + }{ + "ORACLE_PEOPLESOFT_CONNECTION", + (MarshalTypeConnectionSummaryFromOraclePeopleSoft)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/connection_summary_from_oracle_siebel.go b/dataintegration/connection_summary_from_oracle_siebel.go new file mode 100644 index 0000000000..6feb6d7d8c --- /dev/null +++ b/dataintegration/connection_summary_from_oracle_siebel.go @@ -0,0 +1,160 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionSummaryFromOracleSiebel The connection summary details for an Oracle Siebel data asset. +type ConnectionSummaryFromOracleSiebel struct { + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + PrimarySchema *Schema `mandatory:"false" json:"primarySchema"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + // The default property for the connection. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m ConnectionSummaryFromOracleSiebel) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m ConnectionSummaryFromOracleSiebel) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m ConnectionSummaryFromOracleSiebel) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m ConnectionSummaryFromOracleSiebel) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m ConnectionSummaryFromOracleSiebel) GetDescription() *string { + return m.Description +} + +//GetObjectVersion returns ObjectVersion +func (m ConnectionSummaryFromOracleSiebel) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetObjectStatus returns ObjectStatus +func (m ConnectionSummaryFromOracleSiebel) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m ConnectionSummaryFromOracleSiebel) GetIdentifier() *string { + return m.Identifier +} + +//GetPrimarySchema returns PrimarySchema +func (m ConnectionSummaryFromOracleSiebel) GetPrimarySchema() *Schema { + return m.PrimarySchema +} + +//GetConnectionProperties returns ConnectionProperties +func (m ConnectionSummaryFromOracleSiebel) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetIsDefault returns IsDefault +func (m ConnectionSummaryFromOracleSiebel) GetIsDefault() *bool { + return m.IsDefault +} + +//GetMetadata returns Metadata +func (m ConnectionSummaryFromOracleSiebel) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m ConnectionSummaryFromOracleSiebel) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m ConnectionSummaryFromOracleSiebel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionSummaryFromOracleSiebel) 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 ConnectionSummaryFromOracleSiebel) MarshalJSON() (buff []byte, e error) { + type MarshalTypeConnectionSummaryFromOracleSiebel ConnectionSummaryFromOracleSiebel + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeConnectionSummaryFromOracleSiebel + }{ + "ORACLE_SIEBEL_CONNECTION", + (MarshalTypeConnectionSummaryFromOracleSiebel)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_connection_details.go b/dataintegration/create_connection_details.go index 4bdacbaa06..06c09853aa 100644 --- a/dataintegration/create_connection_details.go +++ b/dataintegration/create_connection_details.go @@ -93,18 +93,14 @@ func (m *createconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa var err error switch m.ModelType { - case "MYSQL_CONNECTION": - mm := CreateConnectionFromMySql{} + case "ORACLE_SIEBEL_CONNECTION": + mm := CreateConnectionFromOracleSiebel{} err = json.Unmarshal(data, &mm) return mm, err case "AMAZON_S3_CONNECTION": mm := CreateConnectionFromAmazonS3{} err = json.Unmarshal(data, &mm) return mm, err - case "GENERIC_JDBC_CONNECTION": - mm := CreateConnectionFromJdbc{} - err = json.Unmarshal(data, &mm) - return mm, err case "BICC_CONNECTION": mm := CreateConnectionFromBicc{} err = json.Unmarshal(data, &mm) @@ -113,14 +109,42 @@ func (m *createconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa mm := CreateConnectionFromAtp{} err = json.Unmarshal(data, &mm) return mm, err - case "BIP_CONNECTION": - mm := CreateConnectionFromBip{} + case "HDFS_CONNECTION": + mm := CreateConnectionFromHdfs{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MYSQL_HEATWAVE_CONNECTION": + mm := CreateConnectionFromMySqlHeatWave{} err = json.Unmarshal(data, &mm) return mm, err case "REST_BASIC_AUTH_CONNECTION": mm := CreateConnectionFromRestBasicAuth{} err = json.Unmarshal(data, &mm) return mm, err + case "ORACLEDB_CONNECTION": + mm := CreateConnectionFromOracle{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_PEOPLESOFT_CONNECTION": + mm := CreateConnectionFromOraclePeopleSoft{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_EBS_CONNECTION": + mm := CreateConnectionFromOracleEbs{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MYSQL_CONNECTION": + mm := CreateConnectionFromMySql{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC_JDBC_CONNECTION": + mm := CreateConnectionFromJdbc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "BIP_CONNECTION": + mm := CreateConnectionFromBip{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLE_ADWC_CONNECTION": mm := CreateConnectionFromAdwc{} err = json.Unmarshal(data, &mm) @@ -129,10 +153,6 @@ func (m *createconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa mm := CreateConnectionFromRestNoAuth{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLEDB_CONNECTION": - mm := CreateConnectionFromOracle{} - err = json.Unmarshal(data, &mm) - return mm, err case "ORACLE_OBJECT_STORAGE_CONNECTION": mm := CreateConnectionFromObjectStorage{} err = json.Unmarshal(data, &mm) @@ -223,6 +243,11 @@ const ( CreateConnectionDetailsModelTypeAmazonS3Connection CreateConnectionDetailsModelTypeEnum = "AMAZON_S3_CONNECTION" CreateConnectionDetailsModelTypeBipConnection CreateConnectionDetailsModelTypeEnum = "BIP_CONNECTION" CreateConnectionDetailsModelTypeLakeConnection CreateConnectionDetailsModelTypeEnum = "LAKE_CONNECTION" + CreateConnectionDetailsModelTypeOraclePeoplesoftConnection CreateConnectionDetailsModelTypeEnum = "ORACLE_PEOPLESOFT_CONNECTION" + CreateConnectionDetailsModelTypeOracleEbsConnection CreateConnectionDetailsModelTypeEnum = "ORACLE_EBS_CONNECTION" + CreateConnectionDetailsModelTypeOracleSiebelConnection CreateConnectionDetailsModelTypeEnum = "ORACLE_SIEBEL_CONNECTION" + CreateConnectionDetailsModelTypeHdfsConnection CreateConnectionDetailsModelTypeEnum = "HDFS_CONNECTION" + CreateConnectionDetailsModelTypeMysqlHeatwaveConnection CreateConnectionDetailsModelTypeEnum = "MYSQL_HEATWAVE_CONNECTION" CreateConnectionDetailsModelTypeRestNoAuthConnection CreateConnectionDetailsModelTypeEnum = "REST_NO_AUTH_CONNECTION" CreateConnectionDetailsModelTypeRestBasicAuthConnection CreateConnectionDetailsModelTypeEnum = "REST_BASIC_AUTH_CONNECTION" ) @@ -238,6 +263,11 @@ var mappingCreateConnectionDetailsModelTypeEnum = map[string]CreateConnectionDet "AMAZON_S3_CONNECTION": CreateConnectionDetailsModelTypeAmazonS3Connection, "BIP_CONNECTION": CreateConnectionDetailsModelTypeBipConnection, "LAKE_CONNECTION": CreateConnectionDetailsModelTypeLakeConnection, + "ORACLE_PEOPLESOFT_CONNECTION": CreateConnectionDetailsModelTypeOraclePeoplesoftConnection, + "ORACLE_EBS_CONNECTION": CreateConnectionDetailsModelTypeOracleEbsConnection, + "ORACLE_SIEBEL_CONNECTION": CreateConnectionDetailsModelTypeOracleSiebelConnection, + "HDFS_CONNECTION": CreateConnectionDetailsModelTypeHdfsConnection, + "MYSQL_HEATWAVE_CONNECTION": CreateConnectionDetailsModelTypeMysqlHeatwaveConnection, "REST_NO_AUTH_CONNECTION": CreateConnectionDetailsModelTypeRestNoAuthConnection, "REST_BASIC_AUTH_CONNECTION": CreateConnectionDetailsModelTypeRestBasicAuthConnection, } @@ -253,6 +283,11 @@ var mappingCreateConnectionDetailsModelTypeEnumLowerCase = map[string]CreateConn "amazon_s3_connection": CreateConnectionDetailsModelTypeAmazonS3Connection, "bip_connection": CreateConnectionDetailsModelTypeBipConnection, "lake_connection": CreateConnectionDetailsModelTypeLakeConnection, + "oracle_peoplesoft_connection": CreateConnectionDetailsModelTypeOraclePeoplesoftConnection, + "oracle_ebs_connection": CreateConnectionDetailsModelTypeOracleEbsConnection, + "oracle_siebel_connection": CreateConnectionDetailsModelTypeOracleSiebelConnection, + "hdfs_connection": CreateConnectionDetailsModelTypeHdfsConnection, + "mysql_heatwave_connection": CreateConnectionDetailsModelTypeMysqlHeatwaveConnection, "rest_no_auth_connection": CreateConnectionDetailsModelTypeRestNoAuthConnection, "rest_basic_auth_connection": CreateConnectionDetailsModelTypeRestBasicAuthConnection, } @@ -279,6 +314,11 @@ func GetCreateConnectionDetailsModelTypeEnumStringValues() []string { "AMAZON_S3_CONNECTION", "BIP_CONNECTION", "LAKE_CONNECTION", + "ORACLE_PEOPLESOFT_CONNECTION", + "ORACLE_EBS_CONNECTION", + "ORACLE_SIEBEL_CONNECTION", + "HDFS_CONNECTION", + "MYSQL_HEATWAVE_CONNECTION", "REST_NO_AUTH_CONNECTION", "REST_BASIC_AUTH_CONNECTION", } diff --git a/dataintegration/create_connection_from_hdfs.go b/dataintegration/create_connection_from_hdfs.go new file mode 100644 index 0000000000..26eb2c0bcf --- /dev/null +++ b/dataintegration/create_connection_from_hdfs.go @@ -0,0 +1,138 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateConnectionFromHdfs The details to create the HDFS data asset connection. +type CreateConnectionFromHdfs struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The HDFS principal. + HdfsPrincipal *string `mandatory:"true" json:"hdfsPrincipal"` + + // The HDFS Data Node principal. + DataNodePrincipal *string `mandatory:"true" json:"dataNodePrincipal"` + + // The HDFS Name Node principal. + NameNodePrincipal *string `mandatory:"true" json:"nameNodePrincipal"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // HDFS Realm name. + Realm *string `mandatory:"false" json:"realm"` + + // The HDFS Key Distribution Center. + KeyDistributionCenter *string `mandatory:"false" json:"keyDistributionCenter"` + + KeyTabContent *SensitiveAttribute `mandatory:"false" json:"keyTabContent"` +} + +//GetKey returns Key +func (m CreateConnectionFromHdfs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateConnectionFromHdfs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m CreateConnectionFromHdfs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m CreateConnectionFromHdfs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateConnectionFromHdfs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateConnectionFromHdfs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateConnectionFromHdfs) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m CreateConnectionFromHdfs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateConnectionFromHdfs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateConnectionFromHdfs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateConnectionFromHdfs) 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 CreateConnectionFromHdfs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateConnectionFromHdfs CreateConnectionFromHdfs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateConnectionFromHdfs + }{ + "HDFS_CONNECTION", + (MarshalTypeCreateConnectionFromHdfs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_connection_from_my_sql_heat_wave.go b/dataintegration/create_connection_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..f5d8e79598 --- /dev/null +++ b/dataintegration/create_connection_from_my_sql_heat_wave.go @@ -0,0 +1,129 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateConnectionFromMySqlHeatWave The details to create a MYSQL HeatWave data asset connection. +type CreateConnectionFromMySqlHeatWave struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m CreateConnectionFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateConnectionFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m CreateConnectionFromMySqlHeatWave) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m CreateConnectionFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateConnectionFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateConnectionFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateConnectionFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m CreateConnectionFromMySqlHeatWave) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateConnectionFromMySqlHeatWave) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateConnectionFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateConnectionFromMySqlHeatWave) 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 CreateConnectionFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateConnectionFromMySqlHeatWave CreateConnectionFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateConnectionFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_CONNECTION", + (MarshalTypeCreateConnectionFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_connection_from_oracle_ebs.go b/dataintegration/create_connection_from_oracle_ebs.go new file mode 100644 index 0000000000..22143d9837 --- /dev/null +++ b/dataintegration/create_connection_from_oracle_ebs.go @@ -0,0 +1,129 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateConnectionFromOracleEbs The details to create E-Business Suite data asset connection. +type CreateConnectionFromOracleEbs struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m CreateConnectionFromOracleEbs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateConnectionFromOracleEbs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m CreateConnectionFromOracleEbs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m CreateConnectionFromOracleEbs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateConnectionFromOracleEbs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateConnectionFromOracleEbs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateConnectionFromOracleEbs) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m CreateConnectionFromOracleEbs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateConnectionFromOracleEbs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateConnectionFromOracleEbs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateConnectionFromOracleEbs) 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 CreateConnectionFromOracleEbs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateConnectionFromOracleEbs CreateConnectionFromOracleEbs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateConnectionFromOracleEbs + }{ + "ORACLE_EBS_CONNECTION", + (MarshalTypeCreateConnectionFromOracleEbs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_connection_from_oracle_people_soft.go b/dataintegration/create_connection_from_oracle_people_soft.go new file mode 100644 index 0000000000..2363ac9030 --- /dev/null +++ b/dataintegration/create_connection_from_oracle_people_soft.go @@ -0,0 +1,129 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateConnectionFromOraclePeopleSoft The details to create an Oracle PeopleSoft data asset connection. +type CreateConnectionFromOraclePeopleSoft struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m CreateConnectionFromOraclePeopleSoft) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateConnectionFromOraclePeopleSoft) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m CreateConnectionFromOraclePeopleSoft) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m CreateConnectionFromOraclePeopleSoft) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateConnectionFromOraclePeopleSoft) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateConnectionFromOraclePeopleSoft) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateConnectionFromOraclePeopleSoft) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m CreateConnectionFromOraclePeopleSoft) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateConnectionFromOraclePeopleSoft) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateConnectionFromOraclePeopleSoft) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateConnectionFromOraclePeopleSoft) 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 CreateConnectionFromOraclePeopleSoft) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateConnectionFromOraclePeopleSoft CreateConnectionFromOraclePeopleSoft + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateConnectionFromOraclePeopleSoft + }{ + "ORACLE_PEOPLESOFT_CONNECTION", + (MarshalTypeCreateConnectionFromOraclePeopleSoft)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_connection_from_oracle_siebel.go b/dataintegration/create_connection_from_oracle_siebel.go new file mode 100644 index 0000000000..d18f860db5 --- /dev/null +++ b/dataintegration/create_connection_from_oracle_siebel.go @@ -0,0 +1,129 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateConnectionFromOracleSiebel The details to create an Oracle Siebel data asset connection. +type CreateConnectionFromOracleSiebel struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m CreateConnectionFromOracleSiebel) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateConnectionFromOracleSiebel) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m CreateConnectionFromOracleSiebel) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m CreateConnectionFromOracleSiebel) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateConnectionFromOracleSiebel) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateConnectionFromOracleSiebel) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateConnectionFromOracleSiebel) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m CreateConnectionFromOracleSiebel) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateConnectionFromOracleSiebel) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateConnectionFromOracleSiebel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateConnectionFromOracleSiebel) 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 CreateConnectionFromOracleSiebel) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateConnectionFromOracleSiebel CreateConnectionFromOracleSiebel + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateConnectionFromOracleSiebel + }{ + "ORACLE_SIEBEL_CONNECTION", + (MarshalTypeCreateConnectionFromOracleSiebel)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_data_asset_details.go b/dataintegration/create_data_asset_details.go index fa26b9242f..19eaa8ed61 100644 --- a/dataintegration/create_data_asset_details.go +++ b/dataintegration/create_data_asset_details.go @@ -94,6 +94,30 @@ func (m *createdataassetdetails) UnmarshalPolymorphicJSON(data []byte) (interfac var err error switch m.ModelType { + case "HDFS_DATA_ASSET": + mm := CreateDataAssetFromHdfs{} + err = json.Unmarshal(data, &mm) + return mm, err + case "LAKE_DATA_ASSET": + mm := CreateDataAssetFromLake{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MYSQL_HEATWAVE_DATA_ASSET": + mm := CreateDataAssetFromMySqlHeatWave{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMAZON_S3_DATA_ASSET": + mm := CreateDataAssetFromAmazonS3{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REST_DATA_ASSET": + mm := CreateDataAssetFromRest{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_SIEBEL_DATA_ASSET": + mm := CreateDataAssetFromOracleSiebel{} + err = json.Unmarshal(data, &mm) + return mm, err case "GENERIC_JDBC_DATA_ASSET": mm := CreateDataAssetFromJdbc{} err = json.Unmarshal(data, &mm) @@ -102,10 +126,6 @@ func (m *createdataassetdetails) UnmarshalPolymorphicJSON(data []byte) (interfac mm := CreateDataAssetFromMySql{} err = json.Unmarshal(data, &mm) return mm, err - case "LAKE_DATA_ASSET": - mm := CreateDataAssetFromLake{} - err = json.Unmarshal(data, &mm) - return mm, err case "ORACLE_DATA_ASSET": mm := CreateDataAssetFromOracle{} err = json.Unmarshal(data, &mm) @@ -114,12 +134,12 @@ func (m *createdataassetdetails) UnmarshalPolymorphicJSON(data []byte) (interfac mm := CreateDataAssetFromAdwc{} err = json.Unmarshal(data, &mm) return mm, err - case "AMAZON_S3_DATA_ASSET": - mm := CreateDataAssetFromAmazonS3{} + case "ORACLE_EBS_DATA_ASSET": + mm := CreateDataAssetFromOracleEbs{} err = json.Unmarshal(data, &mm) return mm, err - case "REST_DATA_ASSET": - mm := CreateDataAssetFromRest{} + case "ORACLE_PEOPLESOFT_DATA_ASSET": + mm := CreateDataAssetFromOraclePeopleSoft{} err = json.Unmarshal(data, &mm) return mm, err case "FUSION_APP_DATA_ASSET": @@ -215,6 +235,11 @@ const ( CreateDataAssetDetailsModelTypeFusionAppDataAsset CreateDataAssetDetailsModelTypeEnum = "FUSION_APP_DATA_ASSET" CreateDataAssetDetailsModelTypeAmazonS3DataAsset CreateDataAssetDetailsModelTypeEnum = "AMAZON_S3_DATA_ASSET" CreateDataAssetDetailsModelTypeLakeDataAsset CreateDataAssetDetailsModelTypeEnum = "LAKE_DATA_ASSET" + CreateDataAssetDetailsModelTypeOraclePeoplesoftDataAsset CreateDataAssetDetailsModelTypeEnum = "ORACLE_PEOPLESOFT_DATA_ASSET" + CreateDataAssetDetailsModelTypeOracleSiebelDataAsset CreateDataAssetDetailsModelTypeEnum = "ORACLE_SIEBEL_DATA_ASSET" + CreateDataAssetDetailsModelTypeOracleEbsDataAsset CreateDataAssetDetailsModelTypeEnum = "ORACLE_EBS_DATA_ASSET" + CreateDataAssetDetailsModelTypeHdfsDataAsset CreateDataAssetDetailsModelTypeEnum = "HDFS_DATA_ASSET" + CreateDataAssetDetailsModelTypeMysqlHeatwaveDataAsset CreateDataAssetDetailsModelTypeEnum = "MYSQL_HEATWAVE_DATA_ASSET" CreateDataAssetDetailsModelTypeRestDataAsset CreateDataAssetDetailsModelTypeEnum = "REST_DATA_ASSET" ) @@ -228,6 +253,11 @@ var mappingCreateDataAssetDetailsModelTypeEnum = map[string]CreateDataAssetDetai "FUSION_APP_DATA_ASSET": CreateDataAssetDetailsModelTypeFusionAppDataAsset, "AMAZON_S3_DATA_ASSET": CreateDataAssetDetailsModelTypeAmazonS3DataAsset, "LAKE_DATA_ASSET": CreateDataAssetDetailsModelTypeLakeDataAsset, + "ORACLE_PEOPLESOFT_DATA_ASSET": CreateDataAssetDetailsModelTypeOraclePeoplesoftDataAsset, + "ORACLE_SIEBEL_DATA_ASSET": CreateDataAssetDetailsModelTypeOracleSiebelDataAsset, + "ORACLE_EBS_DATA_ASSET": CreateDataAssetDetailsModelTypeOracleEbsDataAsset, + "HDFS_DATA_ASSET": CreateDataAssetDetailsModelTypeHdfsDataAsset, + "MYSQL_HEATWAVE_DATA_ASSET": CreateDataAssetDetailsModelTypeMysqlHeatwaveDataAsset, "REST_DATA_ASSET": CreateDataAssetDetailsModelTypeRestDataAsset, } @@ -241,6 +271,11 @@ var mappingCreateDataAssetDetailsModelTypeEnumLowerCase = map[string]CreateDataA "fusion_app_data_asset": CreateDataAssetDetailsModelTypeFusionAppDataAsset, "amazon_s3_data_asset": CreateDataAssetDetailsModelTypeAmazonS3DataAsset, "lake_data_asset": CreateDataAssetDetailsModelTypeLakeDataAsset, + "oracle_peoplesoft_data_asset": CreateDataAssetDetailsModelTypeOraclePeoplesoftDataAsset, + "oracle_siebel_data_asset": CreateDataAssetDetailsModelTypeOracleSiebelDataAsset, + "oracle_ebs_data_asset": CreateDataAssetDetailsModelTypeOracleEbsDataAsset, + "hdfs_data_asset": CreateDataAssetDetailsModelTypeHdfsDataAsset, + "mysql_heatwave_data_asset": CreateDataAssetDetailsModelTypeMysqlHeatwaveDataAsset, "rest_data_asset": CreateDataAssetDetailsModelTypeRestDataAsset, } @@ -265,6 +300,11 @@ func GetCreateDataAssetDetailsModelTypeEnumStringValues() []string { "FUSION_APP_DATA_ASSET", "AMAZON_S3_DATA_ASSET", "LAKE_DATA_ASSET", + "ORACLE_PEOPLESOFT_DATA_ASSET", + "ORACLE_SIEBEL_DATA_ASSET", + "ORACLE_EBS_DATA_ASSET", + "HDFS_DATA_ASSET", + "MYSQL_HEATWAVE_DATA_ASSET", "REST_DATA_ASSET", } } diff --git a/dataintegration/create_data_asset_from_hdfs.go b/dataintegration/create_data_asset_from_hdfs.go new file mode 100644 index 0000000000..2e1be5f24c --- /dev/null +++ b/dataintegration/create_data_asset_from_hdfs.go @@ -0,0 +1,136 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDataAssetFromHdfs Details for the HDFS data asset type. +type CreateDataAssetFromHdfs struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The HDFS hostname. + Host *string `mandatory:"true" json:"host"` + + // The HDFS port. + Port *string `mandatory:"true" json:"port"` + + // The HDFS Protocol name. + Protocol *string `mandatory:"true" json:"protocol"` + + DefaultConnection *CreateConnectionFromHdfs `mandatory:"true" json:"defaultConnection"` + + // Currently not used on data asset creation. Reserved for future. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // Specifies whether certificate validation is needed + ValidateCertificate *bool `mandatory:"false" json:"validateCertificate"` +} + +//GetKey returns Key +func (m CreateDataAssetFromHdfs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateDataAssetFromHdfs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m CreateDataAssetFromHdfs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateDataAssetFromHdfs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateDataAssetFromHdfs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateDataAssetFromHdfs) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m CreateDataAssetFromHdfs) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m CreateDataAssetFromHdfs) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateDataAssetFromHdfs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateDataAssetFromHdfs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDataAssetFromHdfs) 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 CreateDataAssetFromHdfs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDataAssetFromHdfs CreateDataAssetFromHdfs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateDataAssetFromHdfs + }{ + "HDFS_DATA_ASSET", + (MarshalTypeCreateDataAssetFromHdfs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_data_asset_from_my_sql_heat_wave.go b/dataintegration/create_data_asset_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..4520cca1d1 --- /dev/null +++ b/dataintegration/create_data_asset_from_my_sql_heat_wave.go @@ -0,0 +1,133 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDataAssetFromMySqlHeatWave Details for the MYSQL HeatWave data asset type. +type CreateDataAssetFromMySqlHeatWave struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The MySql HeatWave host name. + Host *string `mandatory:"true" json:"host"` + + // The MySql HeatWave port number. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *CreateConnectionFromMySqlHeatWave `mandatory:"true" json:"defaultConnection"` + + // Currently not used on data asset creation. Reserved for future. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The MySql HeatWave service name for the database. + ServiceName *string `mandatory:"false" json:"serviceName"` +} + +//GetKey returns Key +func (m CreateDataAssetFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateDataAssetFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m CreateDataAssetFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateDataAssetFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateDataAssetFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateDataAssetFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m CreateDataAssetFromMySqlHeatWave) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m CreateDataAssetFromMySqlHeatWave) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateDataAssetFromMySqlHeatWave) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateDataAssetFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDataAssetFromMySqlHeatWave) 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 CreateDataAssetFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDataAssetFromMySqlHeatWave CreateDataAssetFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateDataAssetFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_DATA_ASSET", + (MarshalTypeCreateDataAssetFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_data_asset_from_oracle_ebs.go b/dataintegration/create_data_asset_from_oracle_ebs.go new file mode 100644 index 0000000000..68e19bd774 --- /dev/null +++ b/dataintegration/create_data_asset_from_oracle_ebs.go @@ -0,0 +1,143 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDataAssetFromOracleEbs Details for the E-Business Suite data asset type. +type CreateDataAssetFromOracleEbs struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The Oracle EBS hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle EBS port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *CreateConnectionFromOracleEbs `mandatory:"true" json:"defaultConnection"` + + // Currently not used on data asset creation. Reserved for future. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The service name for the data asset. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle EBS driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle EBS SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m CreateDataAssetFromOracleEbs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateDataAssetFromOracleEbs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m CreateDataAssetFromOracleEbs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateDataAssetFromOracleEbs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateDataAssetFromOracleEbs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateDataAssetFromOracleEbs) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m CreateDataAssetFromOracleEbs) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m CreateDataAssetFromOracleEbs) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateDataAssetFromOracleEbs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateDataAssetFromOracleEbs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDataAssetFromOracleEbs) 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 CreateDataAssetFromOracleEbs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDataAssetFromOracleEbs CreateDataAssetFromOracleEbs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateDataAssetFromOracleEbs + }{ + "ORACLE_EBS_DATA_ASSET", + (MarshalTypeCreateDataAssetFromOracleEbs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_data_asset_from_oracle_people_soft.go b/dataintegration/create_data_asset_from_oracle_people_soft.go new file mode 100644 index 0000000000..4b70327c30 --- /dev/null +++ b/dataintegration/create_data_asset_from_oracle_people_soft.go @@ -0,0 +1,143 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDataAssetFromOraclePeopleSoft Details for the Oracle PeopleSoft data asset type. +type CreateDataAssetFromOraclePeopleSoft struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The Oracle PeopleSoft hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle PeopleSoft port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *CreateConnectionFromOraclePeopleSoft `mandatory:"true" json:"defaultConnection"` + + // Currently not used on data asset creation. Reserved for future. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The service name for the data asset. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle PeopleSoft driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle PeopleSoft SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m CreateDataAssetFromOraclePeopleSoft) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateDataAssetFromOraclePeopleSoft) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m CreateDataAssetFromOraclePeopleSoft) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateDataAssetFromOraclePeopleSoft) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateDataAssetFromOraclePeopleSoft) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateDataAssetFromOraclePeopleSoft) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m CreateDataAssetFromOraclePeopleSoft) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m CreateDataAssetFromOraclePeopleSoft) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateDataAssetFromOraclePeopleSoft) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateDataAssetFromOraclePeopleSoft) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDataAssetFromOraclePeopleSoft) 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 CreateDataAssetFromOraclePeopleSoft) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDataAssetFromOraclePeopleSoft CreateDataAssetFromOraclePeopleSoft + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateDataAssetFromOraclePeopleSoft + }{ + "ORACLE_PEOPLESOFT_DATA_ASSET", + (MarshalTypeCreateDataAssetFromOraclePeopleSoft)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_data_asset_from_oracle_siebel.go b/dataintegration/create_data_asset_from_oracle_siebel.go new file mode 100644 index 0000000000..940014aa85 --- /dev/null +++ b/dataintegration/create_data_asset_from_oracle_siebel.go @@ -0,0 +1,143 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDataAssetFromOracleSiebel Details for the Oracle Siebel data asset type. +type CreateDataAssetFromOracleSiebel struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"true" json:"identifier"` + + // The Oracle Siebel hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle Siebel port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *CreateConnectionFromOracleSiebel `mandatory:"true" json:"defaultConnection"` + + // Currently not used on data asset creation. Reserved for future. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The service name for the data asset. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle Siebel driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle Siebel SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m CreateDataAssetFromOracleSiebel) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m CreateDataAssetFromOracleSiebel) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m CreateDataAssetFromOracleSiebel) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateDataAssetFromOracleSiebel) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m CreateDataAssetFromOracleSiebel) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m CreateDataAssetFromOracleSiebel) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m CreateDataAssetFromOracleSiebel) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m CreateDataAssetFromOracleSiebel) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m CreateDataAssetFromOracleSiebel) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m CreateDataAssetFromOracleSiebel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDataAssetFromOracleSiebel) 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 CreateDataAssetFromOracleSiebel) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDataAssetFromOracleSiebel CreateDataAssetFromOracleSiebel + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateDataAssetFromOracleSiebel + }{ + "ORACLE_SIEBEL_DATA_ASSET", + (MarshalTypeCreateDataAssetFromOracleSiebel)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/create_entity_shape_details.go b/dataintegration/create_entity_shape_details.go index 316edd1c6e..aeb1d950fb 100644 --- a/dataintegration/create_entity_shape_details.go +++ b/dataintegration/create_entity_shape_details.go @@ -50,6 +50,10 @@ func (m *createentityshapedetails) UnmarshalPolymorphicJSON(data []byte) (interf var err error switch m.ModelType { + case "OBJECT_ENTITY": + mm := CreateEntityShapeFromObject{} + err = json.Unmarshal(data, &mm) + return mm, err case "SQL_ENTITY": mm := CreateEntityShapeFromSql{} err = json.Unmarshal(data, &mm) @@ -85,18 +89,21 @@ type CreateEntityShapeDetailsModelTypeEnum string // Set of constants representing the allowable values for CreateEntityShapeDetailsModelTypeEnum const ( - CreateEntityShapeDetailsModelTypeFileEntity CreateEntityShapeDetailsModelTypeEnum = "FILE_ENTITY" - CreateEntityShapeDetailsModelTypeSqlEntity CreateEntityShapeDetailsModelTypeEnum = "SQL_ENTITY" + CreateEntityShapeDetailsModelTypeFileEntity CreateEntityShapeDetailsModelTypeEnum = "FILE_ENTITY" + CreateEntityShapeDetailsModelTypeSqlEntity CreateEntityShapeDetailsModelTypeEnum = "SQL_ENTITY" + CreateEntityShapeDetailsModelTypeObjectEntity CreateEntityShapeDetailsModelTypeEnum = "OBJECT_ENTITY" ) var mappingCreateEntityShapeDetailsModelTypeEnum = map[string]CreateEntityShapeDetailsModelTypeEnum{ - "FILE_ENTITY": CreateEntityShapeDetailsModelTypeFileEntity, - "SQL_ENTITY": CreateEntityShapeDetailsModelTypeSqlEntity, + "FILE_ENTITY": CreateEntityShapeDetailsModelTypeFileEntity, + "SQL_ENTITY": CreateEntityShapeDetailsModelTypeSqlEntity, + "OBJECT_ENTITY": CreateEntityShapeDetailsModelTypeObjectEntity, } var mappingCreateEntityShapeDetailsModelTypeEnumLowerCase = map[string]CreateEntityShapeDetailsModelTypeEnum{ - "file_entity": CreateEntityShapeDetailsModelTypeFileEntity, - "sql_entity": CreateEntityShapeDetailsModelTypeSqlEntity, + "file_entity": CreateEntityShapeDetailsModelTypeFileEntity, + "sql_entity": CreateEntityShapeDetailsModelTypeSqlEntity, + "object_entity": CreateEntityShapeDetailsModelTypeObjectEntity, } // GetCreateEntityShapeDetailsModelTypeEnumValues Enumerates the set of values for CreateEntityShapeDetailsModelTypeEnum @@ -113,6 +120,7 @@ func GetCreateEntityShapeDetailsModelTypeEnumStringValues() []string { return []string{ "FILE_ENTITY", "SQL_ENTITY", + "OBJECT_ENTITY", } } diff --git a/dataintegration/create_entity_shape_from_object.go b/dataintegration/create_entity_shape_from_object.go new file mode 100644 index 0000000000..82317d528d --- /dev/null +++ b/dataintegration/create_entity_shape_from_object.go @@ -0,0 +1,216 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateEntityShapeFromObject The application object entity details. +type CreateEntityShapeFromObject struct { + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"true" json:"name"` + + // The object key. + Key *string `mandatory:"false" json:"key"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Detailed description for the object. + Description *string `mandatory:"false" json:"description"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + Shape *Shape `mandatory:"false" json:"shape"` + + // The shape ID. + ShapeId *string `mandatory:"false" json:"shapeId"` + + // Specifies other type label. + OtherTypeLabel *string `mandatory:"false" json:"otherTypeLabel"` + + // An array of unique keys. + UniqueKeys []UniqueKey `mandatory:"false" json:"uniqueKeys"` + + // An array of foreign keys. + ForeignKeys []ForeignKey `mandatory:"false" json:"foreignKeys"` + + // The resource name. + ResourceName *string `mandatory:"false" json:"resourceName"` + + DataFormat *DataFormat `mandatory:"false" json:"dataFormat"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The entity type. + EntityType CreateEntityShapeFromObjectEntityTypeEnum `mandatory:"false" json:"entityType,omitempty"` +} + +func (m CreateEntityShapeFromObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateEntityShapeFromObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreateEntityShapeFromObjectEntityTypeEnum(string(m.EntityType)); !ok && m.EntityType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EntityType: %s. Supported values are: %s.", m.EntityType, strings.Join(GetCreateEntityShapeFromObjectEntityTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateEntityShapeFromObject) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateEntityShapeFromObject CreateEntityShapeFromObject + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeCreateEntityShapeFromObject + }{ + "OBJECT_ENTITY", + (MarshalTypeCreateEntityShapeFromObject)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *CreateEntityShapeFromObject) UnmarshalJSON(data []byte) (e error) { + model := struct { + Key *string `json:"key"` + ParentRef *ParentReference `json:"parentRef"` + Description *string `json:"description"` + ExternalKey *string `json:"externalKey"` + Shape *Shape `json:"shape"` + ShapeId *string `json:"shapeId"` + EntityType CreateEntityShapeFromObjectEntityTypeEnum `json:"entityType"` + OtherTypeLabel *string `json:"otherTypeLabel"` + UniqueKeys []uniquekey `json:"uniqueKeys"` + ForeignKeys []ForeignKey `json:"foreignKeys"` + ResourceName *string `json:"resourceName"` + DataFormat *DataFormat `json:"dataFormat"` + Identifier *string `json:"identifier"` + Name *string `json:"name"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Key = model.Key + + m.ParentRef = model.ParentRef + + m.Description = model.Description + + m.ExternalKey = model.ExternalKey + + m.Shape = model.Shape + + m.ShapeId = model.ShapeId + + m.EntityType = model.EntityType + + m.OtherTypeLabel = model.OtherTypeLabel + + m.UniqueKeys = make([]UniqueKey, len(model.UniqueKeys)) + for i, n := range model.UniqueKeys { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.UniqueKeys[i] = nn.(UniqueKey) + } else { + m.UniqueKeys[i] = nil + } + } + + m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) + for i, n := range model.ForeignKeys { + m.ForeignKeys[i] = n + } + + m.ResourceName = model.ResourceName + + m.DataFormat = model.DataFormat + + m.Identifier = model.Identifier + + m.Name = model.Name + + return +} + +// CreateEntityShapeFromObjectEntityTypeEnum Enum with underlying type: string +type CreateEntityShapeFromObjectEntityTypeEnum string + +// Set of constants representing the allowable values for CreateEntityShapeFromObjectEntityTypeEnum +const ( + CreateEntityShapeFromObjectEntityTypeTable CreateEntityShapeFromObjectEntityTypeEnum = "TABLE" + CreateEntityShapeFromObjectEntityTypeView CreateEntityShapeFromObjectEntityTypeEnum = "VIEW" + CreateEntityShapeFromObjectEntityTypeFile CreateEntityShapeFromObjectEntityTypeEnum = "FILE" + CreateEntityShapeFromObjectEntityTypeSql CreateEntityShapeFromObjectEntityTypeEnum = "SQL" + CreateEntityShapeFromObjectEntityTypeObject CreateEntityShapeFromObjectEntityTypeEnum = "OBJECT" +) + +var mappingCreateEntityShapeFromObjectEntityTypeEnum = map[string]CreateEntityShapeFromObjectEntityTypeEnum{ + "TABLE": CreateEntityShapeFromObjectEntityTypeTable, + "VIEW": CreateEntityShapeFromObjectEntityTypeView, + "FILE": CreateEntityShapeFromObjectEntityTypeFile, + "SQL": CreateEntityShapeFromObjectEntityTypeSql, + "OBJECT": CreateEntityShapeFromObjectEntityTypeObject, +} + +var mappingCreateEntityShapeFromObjectEntityTypeEnumLowerCase = map[string]CreateEntityShapeFromObjectEntityTypeEnum{ + "table": CreateEntityShapeFromObjectEntityTypeTable, + "view": CreateEntityShapeFromObjectEntityTypeView, + "file": CreateEntityShapeFromObjectEntityTypeFile, + "sql": CreateEntityShapeFromObjectEntityTypeSql, + "object": CreateEntityShapeFromObjectEntityTypeObject, +} + +// GetCreateEntityShapeFromObjectEntityTypeEnumValues Enumerates the set of values for CreateEntityShapeFromObjectEntityTypeEnum +func GetCreateEntityShapeFromObjectEntityTypeEnumValues() []CreateEntityShapeFromObjectEntityTypeEnum { + values := make([]CreateEntityShapeFromObjectEntityTypeEnum, 0) + for _, v := range mappingCreateEntityShapeFromObjectEntityTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateEntityShapeFromObjectEntityTypeEnumStringValues Enumerates the set of values in String for CreateEntityShapeFromObjectEntityTypeEnum +func GetCreateEntityShapeFromObjectEntityTypeEnumStringValues() []string { + return []string{ + "TABLE", + "VIEW", + "FILE", + "SQL", + "OBJECT", + } +} + +// GetMappingCreateEntityShapeFromObjectEntityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateEntityShapeFromObjectEntityTypeEnum(val string) (CreateEntityShapeFromObjectEntityTypeEnum, bool) { + enum, ok := mappingCreateEntityShapeFromObjectEntityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/create_export_request_details.go b/dataintegration/create_export_request_details.go new file mode 100644 index 0000000000..dda661f249 --- /dev/null +++ b/dataintegration/create_export_request_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateExportRequestDetails Details of export request. Export is supported using three ways. +// First, when objectKeys are provided, export of those objects take place. +// Second, when filter are provided, all the objects based on the filter provided are exported. +// Third, when neither objectKeys nor filters are provided, we export all the design objects for the workspace. +type CreateExportRequestDetails struct { + + // Name of the Object Storage bucket where the object will be exported. + BucketName *string `mandatory:"true" json:"bucketName"` + + // Name of the exported zip file. + FileName *string `mandatory:"false" json:"fileName"` + + // Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy) + ObjectStorageTenancyId *string `mandatory:"false" json:"objectStorageTenancyId"` + + // Region of the object storage (if using object storage of different region) + ObjectStorageRegion *string `mandatory:"false" json:"objectStorageRegion"` + + // Flag to control whether to overwrite the object if it is already present at the provided object storage location. + IsObjectOverwriteEnabled *bool `mandatory:"false" json:"isObjectOverwriteEnabled"` + + // Field is used to specify which object keys to export + ObjectKeys []string `mandatory:"false" json:"objectKeys"` + + // This field controls if the references will be exported along with the objects + AreReferencesIncluded *bool `mandatory:"false" json:"areReferencesIncluded"` + + // Filters for exported objects + Filters []string `mandatory:"false" json:"filters"` +} + +func (m CreateExportRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateExportRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/dataintegration/create_export_request_request_response.go b/dataintegration/create_export_request_request_response.go new file mode 100644 index 0000000000..d6d1e6db41 --- /dev/null +++ b/dataintegration/create_export_request_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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateExportRequestRequest wrapper for the CreateExportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/CreateExportRequest.go.html to see an example of how to use CreateExportRequestRequest. +type CreateExportRequestRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The details needed to export metadata object. + CreateExportRequestDetails `contributesTo:"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 `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. + 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 CreateExportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateExportRequestRequest) 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 CreateExportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateExportRequestRequest) 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 CreateExportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateExportRequestResponse wrapper for the CreateExportRequest operation +type CreateExportRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportRequest instance + ExportRequest `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"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateExportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateExportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/create_import_request_details.go b/dataintegration/create_import_request_details.go new file mode 100644 index 0000000000..c09f3f36c7 --- /dev/null +++ b/dataintegration/create_import_request_details.go @@ -0,0 +1,53 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateImportRequestDetails Details of import object. +type CreateImportRequestDetails struct { + + // Name of the Object Storage bucket where the object will be imported from. + BucketName *string `mandatory:"true" json:"bucketName"` + + // Name of the zip file to be imported. + FileName *string `mandatory:"true" json:"fileName"` + + // Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy) + ObjectStorageTenancyId *string `mandatory:"false" json:"objectStorageTenancyId"` + + // Region of the object storage (if using object storage of different region) + ObjectStorageRegion *string `mandatory:"false" json:"objectStorageRegion"` + + // Key of the object inside which all the objects will be imported + ObjectKeyForImport *string `mandatory:"false" json:"objectKeyForImport"` + + ImportConflictResolution *ImportConflictResolution `mandatory:"false" json:"importConflictResolution"` +} + +func (m CreateImportRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateImportRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/dataintegration/create_import_request_request_response.go b/dataintegration/create_import_request_request_response.go new file mode 100644 index 0000000000..89e901e5e2 --- /dev/null +++ b/dataintegration/create_import_request_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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateImportRequestRequest wrapper for the CreateImportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/CreateImportRequest.go.html to see an example of how to use CreateImportRequestRequest. +type CreateImportRequestRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The details needed to import metadata object. + CreateImportRequestDetails `contributesTo:"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 `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. + 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 CreateImportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateImportRequestRequest) 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 CreateImportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateImportRequestRequest) 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 CreateImportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateImportRequestResponse wrapper for the CreateImportRequest operation +type CreateImportRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ImportRequest instance + ImportRequest `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"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateImportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateImportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/data_asset.go b/dataintegration/data_asset.go index eb8bc26123..6e2b528977 100644 --- a/dataintegration/data_asset.go +++ b/dataintegration/data_asset.go @@ -120,12 +120,40 @@ func (m *dataasset) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { mm := DataAssetFromOracleDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AMAZON_S3_DATA_ASSET": + mm := DataAssetFromAmazonS3{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MYSQL_HEATWAVE_DATA_ASSET": + mm := DataAssetFromMySqlHeatWave{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MYSQL_DATA_ASSET": + mm := DataAssetFromMySql{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_PEOPLESOFT_DATA_ASSET": + mm := DataAssetFromOraclePeopleSoftDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_EBS_DATA_ASSET": + mm := DataAssetFromOracleEbsDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REST_DATA_ASSET": + mm := DataAssetFromRestDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLE_ADWC_DATA_ASSET": mm := DataAssetFromAdwcDetails{} err = json.Unmarshal(data, &mm) return mm, err - case "AMAZON_S3_DATA_ASSET": - mm := DataAssetFromAmazonS3{} + case "HDFS_DATA_ASSET": + mm := DataAssetFromHdfsDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_SIEBEL_DATA_ASSET": + mm := DataAssetFromOracleSiebelDetails{} err = json.Unmarshal(data, &mm) return mm, err case "ORACLE_OBJECT_STORAGE_DATA_ASSET": @@ -144,14 +172,6 @@ func (m *dataasset) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { mm := DataAssetFromAtpDetails{} err = json.Unmarshal(data, &mm) return mm, err - case "MYSQL_DATA_ASSET": - mm := DataAssetFromMySql{} - err = json.Unmarshal(data, &mm) - return mm, err - case "REST_DATA_ASSET": - mm := DataAssetFromRestDetails{} - err = json.Unmarshal(data, &mm) - return mm, err default: common.Logf("Recieved unsupported enum value for DataAsset: %s.", m.ModelType) return *m, nil @@ -253,6 +273,11 @@ const ( DataAssetModelTypeFusionAppDataAsset DataAssetModelTypeEnum = "FUSION_APP_DATA_ASSET" DataAssetModelTypeAmazonS3DataAsset DataAssetModelTypeEnum = "AMAZON_S3_DATA_ASSET" DataAssetModelTypeLakeDataAsset DataAssetModelTypeEnum = "LAKE_DATA_ASSET" + DataAssetModelTypeOraclePeoplesoftDataAsset DataAssetModelTypeEnum = "ORACLE_PEOPLESOFT_DATA_ASSET" + DataAssetModelTypeOracleSiebelDataAsset DataAssetModelTypeEnum = "ORACLE_SIEBEL_DATA_ASSET" + DataAssetModelTypeOracleEbsDataAsset DataAssetModelTypeEnum = "ORACLE_EBS_DATA_ASSET" + DataAssetModelTypeHdfsDataAsset DataAssetModelTypeEnum = "HDFS_DATA_ASSET" + DataAssetModelTypeMysqlHeatwaveDataAsset DataAssetModelTypeEnum = "MYSQL_HEATWAVE_DATA_ASSET" DataAssetModelTypeRestDataAsset DataAssetModelTypeEnum = "REST_DATA_ASSET" ) @@ -266,6 +291,11 @@ var mappingDataAssetModelTypeEnum = map[string]DataAssetModelTypeEnum{ "FUSION_APP_DATA_ASSET": DataAssetModelTypeFusionAppDataAsset, "AMAZON_S3_DATA_ASSET": DataAssetModelTypeAmazonS3DataAsset, "LAKE_DATA_ASSET": DataAssetModelTypeLakeDataAsset, + "ORACLE_PEOPLESOFT_DATA_ASSET": DataAssetModelTypeOraclePeoplesoftDataAsset, + "ORACLE_SIEBEL_DATA_ASSET": DataAssetModelTypeOracleSiebelDataAsset, + "ORACLE_EBS_DATA_ASSET": DataAssetModelTypeOracleEbsDataAsset, + "HDFS_DATA_ASSET": DataAssetModelTypeHdfsDataAsset, + "MYSQL_HEATWAVE_DATA_ASSET": DataAssetModelTypeMysqlHeatwaveDataAsset, "REST_DATA_ASSET": DataAssetModelTypeRestDataAsset, } @@ -279,6 +309,11 @@ var mappingDataAssetModelTypeEnumLowerCase = map[string]DataAssetModelTypeEnum{ "fusion_app_data_asset": DataAssetModelTypeFusionAppDataAsset, "amazon_s3_data_asset": DataAssetModelTypeAmazonS3DataAsset, "lake_data_asset": DataAssetModelTypeLakeDataAsset, + "oracle_peoplesoft_data_asset": DataAssetModelTypeOraclePeoplesoftDataAsset, + "oracle_siebel_data_asset": DataAssetModelTypeOracleSiebelDataAsset, + "oracle_ebs_data_asset": DataAssetModelTypeOracleEbsDataAsset, + "hdfs_data_asset": DataAssetModelTypeHdfsDataAsset, + "mysql_heatwave_data_asset": DataAssetModelTypeMysqlHeatwaveDataAsset, "rest_data_asset": DataAssetModelTypeRestDataAsset, } @@ -303,6 +338,11 @@ func GetDataAssetModelTypeEnumStringValues() []string { "FUSION_APP_DATA_ASSET", "AMAZON_S3_DATA_ASSET", "LAKE_DATA_ASSET", + "ORACLE_PEOPLESOFT_DATA_ASSET", + "ORACLE_SIEBEL_DATA_ASSET", + "ORACLE_EBS_DATA_ASSET", + "HDFS_DATA_ASSET", + "MYSQL_HEATWAVE_DATA_ASSET", "REST_DATA_ASSET", } } diff --git a/dataintegration/data_asset_from_hdfs_details.go b/dataintegration/data_asset_from_hdfs_details.go new file mode 100644 index 0000000000..b7571236d4 --- /dev/null +++ b/dataintegration/data_asset_from_hdfs_details.go @@ -0,0 +1,166 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetFromHdfsDetails Details for the HDFS data asset type. +type DataAssetFromHdfsDetails struct { + + // The HDFS hostname. + Host *string `mandatory:"true" json:"host"` + + // The HDFS port. + Port *string `mandatory:"true" json:"port"` + + // The HDFS Protocol name. + Protocol *string `mandatory:"true" json:"protocol"` + + DefaultConnection *ConnectionFromHdfsDetails `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // Specifies whether certificate validation is needed + ValidateCertificate *bool `mandatory:"false" json:"validateCertificate"` +} + +//GetKey returns Key +func (m DataAssetFromHdfsDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetFromHdfsDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetFromHdfsDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetFromHdfsDetails) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetFromHdfsDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetFromHdfsDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetFromHdfsDetails) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetFromHdfsDetails) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetFromHdfsDetails) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetFromHdfsDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetFromHdfsDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetFromHdfsDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m DataAssetFromHdfsDetails) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m DataAssetFromHdfsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetFromHdfsDetails) 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 DataAssetFromHdfsDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetFromHdfsDetails DataAssetFromHdfsDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetFromHdfsDetails + }{ + "HDFS_DATA_ASSET", + (MarshalTypeDataAssetFromHdfsDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_from_my_sql_heat_wave.go b/dataintegration/data_asset_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..7f6eff477f --- /dev/null +++ b/dataintegration/data_asset_from_my_sql_heat_wave.go @@ -0,0 +1,163 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetFromMySqlHeatWave Details for the MYSQL HeatWave data asset type. +type DataAssetFromMySqlHeatWave struct { + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // The MySql HeatWave host name. + Host *string `mandatory:"false" json:"host"` + + // The MySql HeatWave port number. + Port *string `mandatory:"false" json:"port"` + + // The MySql HeatWave service name for the database. + ServiceName *string `mandatory:"false" json:"serviceName"` + + DefaultConnection *ConnectionFromMySqlHeatWaveDetails `mandatory:"false" json:"defaultConnection"` +} + +//GetKey returns Key +func (m DataAssetFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetFromMySqlHeatWave) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetFromMySqlHeatWave) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetFromMySqlHeatWave) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetFromMySqlHeatWave) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetFromMySqlHeatWave) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetFromMySqlHeatWave) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m DataAssetFromMySqlHeatWave) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m DataAssetFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetFromMySqlHeatWave) 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 DataAssetFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetFromMySqlHeatWave DataAssetFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_DATA_ASSET", + (MarshalTypeDataAssetFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_from_oracle_ebs_details.go b/dataintegration/data_asset_from_oracle_ebs_details.go new file mode 100644 index 0000000000..29da740846 --- /dev/null +++ b/dataintegration/data_asset_from_oracle_ebs_details.go @@ -0,0 +1,173 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetFromOracleEbsDetails Details for the E-Business Suite data asset type. +type DataAssetFromOracleEbsDetails struct { + + // The Oracle EBS hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle EBS port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *ConnectionFromOracleEbsDetails `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // The Oracle EBS service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle EBS driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle EBS SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m DataAssetFromOracleEbsDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetFromOracleEbsDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetFromOracleEbsDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetFromOracleEbsDetails) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetFromOracleEbsDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetFromOracleEbsDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetFromOracleEbsDetails) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetFromOracleEbsDetails) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetFromOracleEbsDetails) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetFromOracleEbsDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetFromOracleEbsDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetFromOracleEbsDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m DataAssetFromOracleEbsDetails) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m DataAssetFromOracleEbsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetFromOracleEbsDetails) 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 DataAssetFromOracleEbsDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetFromOracleEbsDetails DataAssetFromOracleEbsDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetFromOracleEbsDetails + }{ + "ORACLE_EBS_DATA_ASSET", + (MarshalTypeDataAssetFromOracleEbsDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_from_oracle_people_soft_details.go b/dataintegration/data_asset_from_oracle_people_soft_details.go new file mode 100644 index 0000000000..0ec7e3dfaa --- /dev/null +++ b/dataintegration/data_asset_from_oracle_people_soft_details.go @@ -0,0 +1,173 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetFromOraclePeopleSoftDetails Details for the Oracle PeopleSoft data asset type. +type DataAssetFromOraclePeopleSoftDetails struct { + + // The Oracle PeopleSoft hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle PeopleSoft port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *ConnectionFromOraclePeopleSoftDetails `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // The Oracle PeopleSoft service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle PeopleSoft driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle PeopleSoft SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m DataAssetFromOraclePeopleSoftDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetFromOraclePeopleSoftDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetFromOraclePeopleSoftDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetFromOraclePeopleSoftDetails) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetFromOraclePeopleSoftDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetFromOraclePeopleSoftDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetFromOraclePeopleSoftDetails) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetFromOraclePeopleSoftDetails) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetFromOraclePeopleSoftDetails) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetFromOraclePeopleSoftDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetFromOraclePeopleSoftDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetFromOraclePeopleSoftDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m DataAssetFromOraclePeopleSoftDetails) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m DataAssetFromOraclePeopleSoftDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetFromOraclePeopleSoftDetails) 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 DataAssetFromOraclePeopleSoftDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetFromOraclePeopleSoftDetails DataAssetFromOraclePeopleSoftDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetFromOraclePeopleSoftDetails + }{ + "ORACLE_PEOPLESOFT_DATA_ASSET", + (MarshalTypeDataAssetFromOraclePeopleSoftDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_from_oracle_siebel_details.go b/dataintegration/data_asset_from_oracle_siebel_details.go new file mode 100644 index 0000000000..8ef531d35b --- /dev/null +++ b/dataintegration/data_asset_from_oracle_siebel_details.go @@ -0,0 +1,173 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetFromOracleSiebelDetails Details for the Oracle Siebel data asset type. +type DataAssetFromOracleSiebelDetails struct { + + // The Oracle Siebel hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle Siebel port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *ConnectionFromOracleSiebelDetails `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + KeyMap map[string]string `mandatory:"false" json:"keyMap"` + + // The Oracle Siebel service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle Siebel driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle Siebel SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m DataAssetFromOracleSiebelDetails) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetFromOracleSiebelDetails) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetFromOracleSiebelDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetFromOracleSiebelDetails) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetFromOracleSiebelDetails) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetFromOracleSiebelDetails) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetFromOracleSiebelDetails) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetFromOracleSiebelDetails) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetFromOracleSiebelDetails) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetFromOracleSiebelDetails) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetFromOracleSiebelDetails) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetFromOracleSiebelDetails) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +//GetKeyMap returns KeyMap +func (m DataAssetFromOracleSiebelDetails) GetKeyMap() map[string]string { + return m.KeyMap +} + +func (m DataAssetFromOracleSiebelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetFromOracleSiebelDetails) 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 DataAssetFromOracleSiebelDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetFromOracleSiebelDetails DataAssetFromOracleSiebelDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetFromOracleSiebelDetails + }{ + "ORACLE_SIEBEL_DATA_ASSET", + (MarshalTypeDataAssetFromOracleSiebelDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_summary.go b/dataintegration/data_asset_summary.go index cebaf0b1fa..5c46e075e7 100644 --- a/dataintegration/data_asset_summary.go +++ b/dataintegration/data_asset_summary.go @@ -107,26 +107,30 @@ func (m *dataassetsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, e var err error switch m.ModelType { - case "MYSQL_DATA_ASSET": - mm := DataAssetSummaryFromMySql{} + case "ORACLE_SIEBEL_DATA_ASSET": + mm := DataAssetSummaryFromOracleSiebel{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLE_ATP_DATA_ASSET": - mm := DataAssetSummaryFromAtp{} + case "MYSQL_HEATWAVE_DATA_ASSET": + mm := DataAssetSummaryFromMySqlHeatWave{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLE_ADWC_DATA_ASSET": - mm := DataAssetSummaryFromAdwc{} + case "MYSQL_DATA_ASSET": + mm := DataAssetSummaryFromMySql{} err = json.Unmarshal(data, &mm) return mm, err - case "GENERIC_JDBC_DATA_ASSET": - mm := DataAssetSummaryFromJdbc{} + case "HDFS_DATA_ASSET": + mm := DataAssetSummaryFromHdfs{} err = json.Unmarshal(data, &mm) return mm, err case "AMAZON_S3_DATA_ASSET": mm := DataAssetSummaryFromAmazonS3{} err = json.Unmarshal(data, &mm) return mm, err + case "ORACLE_PEOPLESOFT_DATA_ASSET": + mm := DataAssetSummaryFromOraclePeopleSoft{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLE_OBJECT_STORAGE_DATA_ASSET": mm := DataAssetSummaryFromObjectStorage{} err = json.Unmarshal(data, &mm) @@ -143,6 +147,22 @@ func (m *dataassetsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, e mm := DataAssetSummaryFromOracle{} err = json.Unmarshal(data, &mm) return mm, err + case "ORACLE_ATP_DATA_ASSET": + mm := DataAssetSummaryFromAtp{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_ADWC_DATA_ASSET": + mm := DataAssetSummaryFromAdwc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC_JDBC_DATA_ASSET": + mm := DataAssetSummaryFromJdbc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_EBS_DATA_ASSET": + mm := DataAssetSummaryFromOracleEbs{} + err = json.Unmarshal(data, &mm) + return mm, err case "FUSION_APP_DATA_ASSET": mm := DataAssetSummaryFromFusionApp{} err = json.Unmarshal(data, &mm) @@ -243,6 +263,11 @@ const ( DataAssetSummaryModelTypeFusionAppDataAsset DataAssetSummaryModelTypeEnum = "FUSION_APP_DATA_ASSET" DataAssetSummaryModelTypeAmazonS3DataAsset DataAssetSummaryModelTypeEnum = "AMAZON_S3_DATA_ASSET" DataAssetSummaryModelTypeLakeDataAsset DataAssetSummaryModelTypeEnum = "LAKE_DATA_ASSET" + DataAssetSummaryModelTypeOraclePeoplesoftDataAsset DataAssetSummaryModelTypeEnum = "ORACLE_PEOPLESOFT_DATA_ASSET" + DataAssetSummaryModelTypeOracleSiebelDataAsset DataAssetSummaryModelTypeEnum = "ORACLE_SIEBEL_DATA_ASSET" + DataAssetSummaryModelTypeOracleEbsDataAsset DataAssetSummaryModelTypeEnum = "ORACLE_EBS_DATA_ASSET" + DataAssetSummaryModelTypeHdfsDataAsset DataAssetSummaryModelTypeEnum = "HDFS_DATA_ASSET" + DataAssetSummaryModelTypeMysqlHeatwaveDataAsset DataAssetSummaryModelTypeEnum = "MYSQL_HEATWAVE_DATA_ASSET" DataAssetSummaryModelTypeRestDataAsset DataAssetSummaryModelTypeEnum = "REST_DATA_ASSET" ) @@ -256,6 +281,11 @@ var mappingDataAssetSummaryModelTypeEnum = map[string]DataAssetSummaryModelTypeE "FUSION_APP_DATA_ASSET": DataAssetSummaryModelTypeFusionAppDataAsset, "AMAZON_S3_DATA_ASSET": DataAssetSummaryModelTypeAmazonS3DataAsset, "LAKE_DATA_ASSET": DataAssetSummaryModelTypeLakeDataAsset, + "ORACLE_PEOPLESOFT_DATA_ASSET": DataAssetSummaryModelTypeOraclePeoplesoftDataAsset, + "ORACLE_SIEBEL_DATA_ASSET": DataAssetSummaryModelTypeOracleSiebelDataAsset, + "ORACLE_EBS_DATA_ASSET": DataAssetSummaryModelTypeOracleEbsDataAsset, + "HDFS_DATA_ASSET": DataAssetSummaryModelTypeHdfsDataAsset, + "MYSQL_HEATWAVE_DATA_ASSET": DataAssetSummaryModelTypeMysqlHeatwaveDataAsset, "REST_DATA_ASSET": DataAssetSummaryModelTypeRestDataAsset, } @@ -269,6 +299,11 @@ var mappingDataAssetSummaryModelTypeEnumLowerCase = map[string]DataAssetSummaryM "fusion_app_data_asset": DataAssetSummaryModelTypeFusionAppDataAsset, "amazon_s3_data_asset": DataAssetSummaryModelTypeAmazonS3DataAsset, "lake_data_asset": DataAssetSummaryModelTypeLakeDataAsset, + "oracle_peoplesoft_data_asset": DataAssetSummaryModelTypeOraclePeoplesoftDataAsset, + "oracle_siebel_data_asset": DataAssetSummaryModelTypeOracleSiebelDataAsset, + "oracle_ebs_data_asset": DataAssetSummaryModelTypeOracleEbsDataAsset, + "hdfs_data_asset": DataAssetSummaryModelTypeHdfsDataAsset, + "mysql_heatwave_data_asset": DataAssetSummaryModelTypeMysqlHeatwaveDataAsset, "rest_data_asset": DataAssetSummaryModelTypeRestDataAsset, } @@ -293,6 +328,11 @@ func GetDataAssetSummaryModelTypeEnumStringValues() []string { "FUSION_APP_DATA_ASSET", "AMAZON_S3_DATA_ASSET", "LAKE_DATA_ASSET", + "ORACLE_PEOPLESOFT_DATA_ASSET", + "ORACLE_SIEBEL_DATA_ASSET", + "ORACLE_EBS_DATA_ASSET", + "HDFS_DATA_ASSET", + "MYSQL_HEATWAVE_DATA_ASSET", "REST_DATA_ASSET", } } diff --git a/dataintegration/data_asset_summary_from_hdfs.go b/dataintegration/data_asset_summary_from_hdfs.go new file mode 100644 index 0000000000..5a8d9ed8e6 --- /dev/null +++ b/dataintegration/data_asset_summary_from_hdfs.go @@ -0,0 +1,158 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetSummaryFromHdfs Summary details for the HDFS data asset type. +type DataAssetSummaryFromHdfs struct { + + // The HDFS hostname. + Host *string `mandatory:"true" json:"host"` + + // The HDFS port. + Port *string `mandatory:"true" json:"port"` + + // The HDFS Protocol name. + Protocol *string `mandatory:"true" json:"protocol"` + + DefaultConnection *ConnectionSummaryFromHdfs `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // Specifies whether certificate validation is needed + ValidateCertificate *bool `mandatory:"false" json:"validateCertificate"` +} + +//GetKey returns Key +func (m DataAssetSummaryFromHdfs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetSummaryFromHdfs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetSummaryFromHdfs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetSummaryFromHdfs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetSummaryFromHdfs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetSummaryFromHdfs) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetSummaryFromHdfs) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetSummaryFromHdfs) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetSummaryFromHdfs) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetSummaryFromHdfs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetSummaryFromHdfs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetSummaryFromHdfs) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m DataAssetSummaryFromHdfs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetSummaryFromHdfs) 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 DataAssetSummaryFromHdfs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetSummaryFromHdfs DataAssetSummaryFromHdfs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetSummaryFromHdfs + }{ + "HDFS_DATA_ASSET", + (MarshalTypeDataAssetSummaryFromHdfs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_summary_from_my_sql_heat_wave.go b/dataintegration/data_asset_summary_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..a18a2b1ddf --- /dev/null +++ b/dataintegration/data_asset_summary_from_my_sql_heat_wave.go @@ -0,0 +1,155 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetSummaryFromMySqlHeatWave Summary details for the MYSQL HeatWave data asset type. +type DataAssetSummaryFromMySqlHeatWave struct { + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The MySql HeatWave host name. + Host *string `mandatory:"false" json:"host"` + + // The MySql HeatWave port number. + Port *string `mandatory:"false" json:"port"` + + // The MySql HeatWave service name for the database. + ServiceName *string `mandatory:"false" json:"serviceName"` + + DefaultConnection *ConnectionSummaryFromMySqlHeatWave `mandatory:"false" json:"defaultConnection"` +} + +//GetKey returns Key +func (m DataAssetSummaryFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetSummaryFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetSummaryFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetSummaryFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetSummaryFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetSummaryFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetSummaryFromMySqlHeatWave) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetSummaryFromMySqlHeatWave) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetSummaryFromMySqlHeatWave) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetSummaryFromMySqlHeatWave) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetSummaryFromMySqlHeatWave) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetSummaryFromMySqlHeatWave) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m DataAssetSummaryFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetSummaryFromMySqlHeatWave) 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 DataAssetSummaryFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetSummaryFromMySqlHeatWave DataAssetSummaryFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetSummaryFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_DATA_ASSET", + (MarshalTypeDataAssetSummaryFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_summary_from_oracle_ebs.go b/dataintegration/data_asset_summary_from_oracle_ebs.go new file mode 100644 index 0000000000..15fba95a01 --- /dev/null +++ b/dataintegration/data_asset_summary_from_oracle_ebs.go @@ -0,0 +1,165 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetSummaryFromOracleEbs Summary details for E-Business Suite data asset type. +type DataAssetSummaryFromOracleEbs struct { + + // The Oracle EBS hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle EBS port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *ConnectionSummaryFromOracleEbs `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The Oracle EBS service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle EBS driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle EBS SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m DataAssetSummaryFromOracleEbs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetSummaryFromOracleEbs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetSummaryFromOracleEbs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetSummaryFromOracleEbs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetSummaryFromOracleEbs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetSummaryFromOracleEbs) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetSummaryFromOracleEbs) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetSummaryFromOracleEbs) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetSummaryFromOracleEbs) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetSummaryFromOracleEbs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetSummaryFromOracleEbs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetSummaryFromOracleEbs) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m DataAssetSummaryFromOracleEbs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetSummaryFromOracleEbs) 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 DataAssetSummaryFromOracleEbs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetSummaryFromOracleEbs DataAssetSummaryFromOracleEbs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetSummaryFromOracleEbs + }{ + "ORACLE_EBS_DATA_ASSET", + (MarshalTypeDataAssetSummaryFromOracleEbs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_summary_from_oracle_people_soft.go b/dataintegration/data_asset_summary_from_oracle_people_soft.go new file mode 100644 index 0000000000..2cc59ff5d7 --- /dev/null +++ b/dataintegration/data_asset_summary_from_oracle_people_soft.go @@ -0,0 +1,165 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetSummaryFromOraclePeopleSoft Summary details for the Oracle PeopleSoft data asset type. +type DataAssetSummaryFromOraclePeopleSoft struct { + + // The Oracle PeopleSoft hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle PeopleSoft port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *ConnectionSummaryFromOraclePeopleSoft `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The Oracle PeopleSoft service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle PeopleSoft driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle PeopleSoft SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m DataAssetSummaryFromOraclePeopleSoft) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetSummaryFromOraclePeopleSoft) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetSummaryFromOraclePeopleSoft) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetSummaryFromOraclePeopleSoft) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetSummaryFromOraclePeopleSoft) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetSummaryFromOraclePeopleSoft) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetSummaryFromOraclePeopleSoft) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetSummaryFromOraclePeopleSoft) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetSummaryFromOraclePeopleSoft) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetSummaryFromOraclePeopleSoft) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetSummaryFromOraclePeopleSoft) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetSummaryFromOraclePeopleSoft) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m DataAssetSummaryFromOraclePeopleSoft) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetSummaryFromOraclePeopleSoft) 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 DataAssetSummaryFromOraclePeopleSoft) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetSummaryFromOraclePeopleSoft DataAssetSummaryFromOraclePeopleSoft + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetSummaryFromOraclePeopleSoft + }{ + "ORACLE_PEOPLESOFT_DATA_ASSET", + (MarshalTypeDataAssetSummaryFromOraclePeopleSoft)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_asset_summary_from_oracle_siebel.go b/dataintegration/data_asset_summary_from_oracle_siebel.go new file mode 100644 index 0000000000..f9e307eeba --- /dev/null +++ b/dataintegration/data_asset_summary_from_oracle_siebel.go @@ -0,0 +1,165 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataAssetSummaryFromOracleSiebel Summary details for the Oracle Siebel data asset type. +type DataAssetSummaryFromOracleSiebel struct { + + // The Oracle Siebel hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle Siebel port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *ConnectionSummaryFromOracleSiebel `mandatory:"true" json:"defaultConnection"` + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"false" json:"key"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + NativeTypeSystem *TypeSystem `mandatory:"false" json:"nativeTypeSystem"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The Oracle Siebel service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle Siebel driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle Siebel SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m DataAssetSummaryFromOracleSiebel) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m DataAssetSummaryFromOracleSiebel) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m DataAssetSummaryFromOracleSiebel) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m DataAssetSummaryFromOracleSiebel) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m DataAssetSummaryFromOracleSiebel) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetIdentifier returns Identifier +func (m DataAssetSummaryFromOracleSiebel) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m DataAssetSummaryFromOracleSiebel) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m DataAssetSummaryFromOracleSiebel) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetNativeTypeSystem returns NativeTypeSystem +func (m DataAssetSummaryFromOracleSiebel) GetNativeTypeSystem() *TypeSystem { + return m.NativeTypeSystem +} + +//GetObjectVersion returns ObjectVersion +func (m DataAssetSummaryFromOracleSiebel) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetParentRef returns ParentRef +func (m DataAssetSummaryFromOracleSiebel) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetMetadata returns Metadata +func (m DataAssetSummaryFromOracleSiebel) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m DataAssetSummaryFromOracleSiebel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataAssetSummaryFromOracleSiebel) 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 DataAssetSummaryFromOracleSiebel) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataAssetSummaryFromOracleSiebel DataAssetSummaryFromOracleSiebel + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataAssetSummaryFromOracleSiebel + }{ + "ORACLE_SIEBEL_DATA_ASSET", + (MarshalTypeDataAssetSummaryFromOracleSiebel)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/data_entity.go b/dataintegration/data_entity.go index a1a611ebb1..18dcff3868 100644 --- a/dataintegration/data_entity.go +++ b/dataintegration/data_entity.go @@ -61,6 +61,10 @@ func (m *dataentity) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) mm := DataEntityFromDataStore{} err = json.Unmarshal(data, &mm) return mm, err + case "OBJECT_ENTITY": + mm := DataEntityFromObject{} + err = json.Unmarshal(data, &mm) + return mm, err case "VIEW_ENTITY": mm := DataEntityFromView{} err = json.Unmarshal(data, &mm) @@ -113,6 +117,7 @@ const ( DataEntityModelTypeTableEntity DataEntityModelTypeEnum = "TABLE_ENTITY" DataEntityModelTypeFileEntity DataEntityModelTypeEnum = "FILE_ENTITY" DataEntityModelTypeSqlEntity DataEntityModelTypeEnum = "SQL_ENTITY" + DataEntityModelTypeObjectEntity DataEntityModelTypeEnum = "OBJECT_ENTITY" DataEntityModelTypeDataStoreEntity DataEntityModelTypeEnum = "DATA_STORE_ENTITY" DataEntityModelTypeDerivedEntity DataEntityModelTypeEnum = "DERIVED_ENTITY" ) @@ -122,6 +127,7 @@ var mappingDataEntityModelTypeEnum = map[string]DataEntityModelTypeEnum{ "TABLE_ENTITY": DataEntityModelTypeTableEntity, "FILE_ENTITY": DataEntityModelTypeFileEntity, "SQL_ENTITY": DataEntityModelTypeSqlEntity, + "OBJECT_ENTITY": DataEntityModelTypeObjectEntity, "DATA_STORE_ENTITY": DataEntityModelTypeDataStoreEntity, "DERIVED_ENTITY": DataEntityModelTypeDerivedEntity, } @@ -131,6 +137,7 @@ var mappingDataEntityModelTypeEnumLowerCase = map[string]DataEntityModelTypeEnum "table_entity": DataEntityModelTypeTableEntity, "file_entity": DataEntityModelTypeFileEntity, "sql_entity": DataEntityModelTypeSqlEntity, + "object_entity": DataEntityModelTypeObjectEntity, "data_store_entity": DataEntityModelTypeDataStoreEntity, "derived_entity": DataEntityModelTypeDerivedEntity, } @@ -151,6 +158,7 @@ func GetDataEntityModelTypeEnumStringValues() []string { "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", + "OBJECT_ENTITY", "DATA_STORE_ENTITY", "DERIVED_ENTITY", } diff --git a/dataintegration/data_entity_details.go b/dataintegration/data_entity_details.go index a7d5a1dab9..a73a198edf 100644 --- a/dataintegration/data_entity_details.go +++ b/dataintegration/data_entity_details.go @@ -66,6 +66,10 @@ func (m *dataentitydetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := DataEntityFromDataStoreEntityDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "OBJECT_ENTITY": + mm := DataEntityFromObjectEntityDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "TABLE_ENTITY": mm := DataEntityFromTableEntityDetails{} err = json.Unmarshal(data, &mm) @@ -101,6 +105,7 @@ const ( DataEntityDetailsModelTypeTableEntity DataEntityDetailsModelTypeEnum = "TABLE_ENTITY" DataEntityDetailsModelTypeFileEntity DataEntityDetailsModelTypeEnum = "FILE_ENTITY" DataEntityDetailsModelTypeSqlEntity DataEntityDetailsModelTypeEnum = "SQL_ENTITY" + DataEntityDetailsModelTypeObjectEntity DataEntityDetailsModelTypeEnum = "OBJECT_ENTITY" DataEntityDetailsModelTypeDataStoreEntity DataEntityDetailsModelTypeEnum = "DATA_STORE_ENTITY" ) @@ -109,6 +114,7 @@ var mappingDataEntityDetailsModelTypeEnum = map[string]DataEntityDetailsModelTyp "TABLE_ENTITY": DataEntityDetailsModelTypeTableEntity, "FILE_ENTITY": DataEntityDetailsModelTypeFileEntity, "SQL_ENTITY": DataEntityDetailsModelTypeSqlEntity, + "OBJECT_ENTITY": DataEntityDetailsModelTypeObjectEntity, "DATA_STORE_ENTITY": DataEntityDetailsModelTypeDataStoreEntity, } @@ -117,6 +123,7 @@ var mappingDataEntityDetailsModelTypeEnumLowerCase = map[string]DataEntityDetail "table_entity": DataEntityDetailsModelTypeTableEntity, "file_entity": DataEntityDetailsModelTypeFileEntity, "sql_entity": DataEntityDetailsModelTypeSqlEntity, + "object_entity": DataEntityDetailsModelTypeObjectEntity, "data_store_entity": DataEntityDetailsModelTypeDataStoreEntity, } @@ -136,6 +143,7 @@ func GetDataEntityDetailsModelTypeEnumStringValues() []string { "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", + "OBJECT_ENTITY", "DATA_STORE_ENTITY", } } diff --git a/dataintegration/data_entity_from_object.go b/dataintegration/data_entity_from_object.go new file mode 100644 index 0000000000..e7d2f970e8 --- /dev/null +++ b/dataintegration/data_entity_from_object.go @@ -0,0 +1,238 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataEntityFromObject The Application Object entity data entity details. +type DataEntityFromObject struct { + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The object key. + Key *string `mandatory:"false" json:"key"` + + // The object's model version. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // Detailed description for the object. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The external key for the object + ExternalKey *string `mandatory:"false" json:"externalKey"` + + Shape *Shape `mandatory:"false" json:"shape"` + + // The shape ID. + ShapeId *string `mandatory:"false" json:"shapeId"` + + // Specifies other type label. + OtherTypeLabel *string `mandatory:"false" json:"otherTypeLabel"` + + // An array of unique keys. + UniqueKeys []UniqueKey `mandatory:"false" json:"uniqueKeys"` + + // An array of foreign keys. + ForeignKeys []ForeignKey `mandatory:"false" json:"foreignKeys"` + + // The resource name. + ResourceName *string `mandatory:"false" json:"resourceName"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The entity type. + EntityType DataEntityFromObjectEntityTypeEnum `mandatory:"false" json:"entityType,omitempty"` +} + +//GetMetadata returns Metadata +func (m DataEntityFromObject) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m DataEntityFromObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataEntityFromObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDataEntityFromObjectEntityTypeEnum(string(m.EntityType)); !ok && m.EntityType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EntityType: %s. Supported values are: %s.", m.EntityType, strings.Join(GetDataEntityFromObjectEntityTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DataEntityFromObject) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataEntityFromObject DataEntityFromObject + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataEntityFromObject + }{ + "OBJECT_ENTITY", + (MarshalTypeDataEntityFromObject)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *DataEntityFromObject) UnmarshalJSON(data []byte) (e error) { + model := struct { + Metadata *ObjectMetadata `json:"metadata"` + Key *string `json:"key"` + ModelVersion *string `json:"modelVersion"` + ParentRef *ParentReference `json:"parentRef"` + Name *string `json:"name"` + Description *string `json:"description"` + ObjectVersion *int `json:"objectVersion"` + ExternalKey *string `json:"externalKey"` + Shape *Shape `json:"shape"` + ShapeId *string `json:"shapeId"` + EntityType DataEntityFromObjectEntityTypeEnum `json:"entityType"` + OtherTypeLabel *string `json:"otherTypeLabel"` + UniqueKeys []uniquekey `json:"uniqueKeys"` + ForeignKeys []ForeignKey `json:"foreignKeys"` + ResourceName *string `json:"resourceName"` + ObjectStatus *int `json:"objectStatus"` + Identifier *string `json:"identifier"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Metadata = model.Metadata + + m.Key = model.Key + + m.ModelVersion = model.ModelVersion + + m.ParentRef = model.ParentRef + + m.Name = model.Name + + m.Description = model.Description + + m.ObjectVersion = model.ObjectVersion + + m.ExternalKey = model.ExternalKey + + m.Shape = model.Shape + + m.ShapeId = model.ShapeId + + m.EntityType = model.EntityType + + m.OtherTypeLabel = model.OtherTypeLabel + + m.UniqueKeys = make([]UniqueKey, len(model.UniqueKeys)) + for i, n := range model.UniqueKeys { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.UniqueKeys[i] = nn.(UniqueKey) + } else { + m.UniqueKeys[i] = nil + } + } + + m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) + for i, n := range model.ForeignKeys { + m.ForeignKeys[i] = n + } + + m.ResourceName = model.ResourceName + + m.ObjectStatus = model.ObjectStatus + + m.Identifier = model.Identifier + + return +} + +// DataEntityFromObjectEntityTypeEnum Enum with underlying type: string +type DataEntityFromObjectEntityTypeEnum string + +// Set of constants representing the allowable values for DataEntityFromObjectEntityTypeEnum +const ( + DataEntityFromObjectEntityTypeTable DataEntityFromObjectEntityTypeEnum = "TABLE" + DataEntityFromObjectEntityTypeView DataEntityFromObjectEntityTypeEnum = "VIEW" + DataEntityFromObjectEntityTypeFile DataEntityFromObjectEntityTypeEnum = "FILE" + DataEntityFromObjectEntityTypeSql DataEntityFromObjectEntityTypeEnum = "SQL" + DataEntityFromObjectEntityTypeObject DataEntityFromObjectEntityTypeEnum = "OBJECT" +) + +var mappingDataEntityFromObjectEntityTypeEnum = map[string]DataEntityFromObjectEntityTypeEnum{ + "TABLE": DataEntityFromObjectEntityTypeTable, + "VIEW": DataEntityFromObjectEntityTypeView, + "FILE": DataEntityFromObjectEntityTypeFile, + "SQL": DataEntityFromObjectEntityTypeSql, + "OBJECT": DataEntityFromObjectEntityTypeObject, +} + +var mappingDataEntityFromObjectEntityTypeEnumLowerCase = map[string]DataEntityFromObjectEntityTypeEnum{ + "table": DataEntityFromObjectEntityTypeTable, + "view": DataEntityFromObjectEntityTypeView, + "file": DataEntityFromObjectEntityTypeFile, + "sql": DataEntityFromObjectEntityTypeSql, + "object": DataEntityFromObjectEntityTypeObject, +} + +// GetDataEntityFromObjectEntityTypeEnumValues Enumerates the set of values for DataEntityFromObjectEntityTypeEnum +func GetDataEntityFromObjectEntityTypeEnumValues() []DataEntityFromObjectEntityTypeEnum { + values := make([]DataEntityFromObjectEntityTypeEnum, 0) + for _, v := range mappingDataEntityFromObjectEntityTypeEnum { + values = append(values, v) + } + return values +} + +// GetDataEntityFromObjectEntityTypeEnumStringValues Enumerates the set of values in String for DataEntityFromObjectEntityTypeEnum +func GetDataEntityFromObjectEntityTypeEnumStringValues() []string { + return []string{ + "TABLE", + "VIEW", + "FILE", + "SQL", + "OBJECT", + } +} + +// GetMappingDataEntityFromObjectEntityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDataEntityFromObjectEntityTypeEnum(val string) (DataEntityFromObjectEntityTypeEnum, bool) { + enum, ok := mappingDataEntityFromObjectEntityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/data_entity_from_object_entity_details.go b/dataintegration/data_entity_from_object_entity_details.go new file mode 100644 index 0000000000..324250bfbb --- /dev/null +++ b/dataintegration/data_entity_from_object_entity_details.go @@ -0,0 +1,229 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataEntityFromObjectEntityDetails The application object entity data entity details. +type DataEntityFromObjectEntityDetails struct { + + // The object key. + Key *string `mandatory:"false" json:"key"` + + // The object's model version. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // Detailed description for the object. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The external key for the object + ExternalKey *string `mandatory:"false" json:"externalKey"` + + Shape *Shape `mandatory:"false" json:"shape"` + + // The shape ID. + ShapeId *string `mandatory:"false" json:"shapeId"` + + // Specifies other type labels. + OtherTypeLabel *string `mandatory:"false" json:"otherTypeLabel"` + + // An array of unique keys. + UniqueKeys []UniqueKey `mandatory:"false" json:"uniqueKeys"` + + // An array of foreign keys. + ForeignKeys []ForeignKey `mandatory:"false" json:"foreignKeys"` + + // The resource name. + ResourceName *string `mandatory:"false" json:"resourceName"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The entity type. + EntityType DataEntityFromObjectEntityDetailsEntityTypeEnum `mandatory:"false" json:"entityType,omitempty"` +} + +func (m DataEntityFromObjectEntityDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataEntityFromObjectEntityDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDataEntityFromObjectEntityDetailsEntityTypeEnum(string(m.EntityType)); !ok && m.EntityType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EntityType: %s. Supported values are: %s.", m.EntityType, strings.Join(GetDataEntityFromObjectEntityDetailsEntityTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DataEntityFromObjectEntityDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataEntityFromObjectEntityDetails DataEntityFromObjectEntityDetails + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataEntityFromObjectEntityDetails + }{ + "OBJECT_ENTITY", + (MarshalTypeDataEntityFromObjectEntityDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *DataEntityFromObjectEntityDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Key *string `json:"key"` + ModelVersion *string `json:"modelVersion"` + ParentRef *ParentReference `json:"parentRef"` + Name *string `json:"name"` + Description *string `json:"description"` + ObjectVersion *int `json:"objectVersion"` + ExternalKey *string `json:"externalKey"` + Shape *Shape `json:"shape"` + ShapeId *string `json:"shapeId"` + EntityType DataEntityFromObjectEntityDetailsEntityTypeEnum `json:"entityType"` + OtherTypeLabel *string `json:"otherTypeLabel"` + UniqueKeys []uniquekey `json:"uniqueKeys"` + ForeignKeys []ForeignKey `json:"foreignKeys"` + ResourceName *string `json:"resourceName"` + ObjectStatus *int `json:"objectStatus"` + Identifier *string `json:"identifier"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Key = model.Key + + m.ModelVersion = model.ModelVersion + + m.ParentRef = model.ParentRef + + m.Name = model.Name + + m.Description = model.Description + + m.ObjectVersion = model.ObjectVersion + + m.ExternalKey = model.ExternalKey + + m.Shape = model.Shape + + m.ShapeId = model.ShapeId + + m.EntityType = model.EntityType + + m.OtherTypeLabel = model.OtherTypeLabel + + m.UniqueKeys = make([]UniqueKey, len(model.UniqueKeys)) + for i, n := range model.UniqueKeys { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.UniqueKeys[i] = nn.(UniqueKey) + } else { + m.UniqueKeys[i] = nil + } + } + + m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) + for i, n := range model.ForeignKeys { + m.ForeignKeys[i] = n + } + + m.ResourceName = model.ResourceName + + m.ObjectStatus = model.ObjectStatus + + m.Identifier = model.Identifier + + return +} + +// DataEntityFromObjectEntityDetailsEntityTypeEnum Enum with underlying type: string +type DataEntityFromObjectEntityDetailsEntityTypeEnum string + +// Set of constants representing the allowable values for DataEntityFromObjectEntityDetailsEntityTypeEnum +const ( + DataEntityFromObjectEntityDetailsEntityTypeTable DataEntityFromObjectEntityDetailsEntityTypeEnum = "TABLE" + DataEntityFromObjectEntityDetailsEntityTypeView DataEntityFromObjectEntityDetailsEntityTypeEnum = "VIEW" + DataEntityFromObjectEntityDetailsEntityTypeFile DataEntityFromObjectEntityDetailsEntityTypeEnum = "FILE" + DataEntityFromObjectEntityDetailsEntityTypeSql DataEntityFromObjectEntityDetailsEntityTypeEnum = "SQL" + DataEntityFromObjectEntityDetailsEntityTypeObject DataEntityFromObjectEntityDetailsEntityTypeEnum = "OBJECT" +) + +var mappingDataEntityFromObjectEntityDetailsEntityTypeEnum = map[string]DataEntityFromObjectEntityDetailsEntityTypeEnum{ + "TABLE": DataEntityFromObjectEntityDetailsEntityTypeTable, + "VIEW": DataEntityFromObjectEntityDetailsEntityTypeView, + "FILE": DataEntityFromObjectEntityDetailsEntityTypeFile, + "SQL": DataEntityFromObjectEntityDetailsEntityTypeSql, + "OBJECT": DataEntityFromObjectEntityDetailsEntityTypeObject, +} + +var mappingDataEntityFromObjectEntityDetailsEntityTypeEnumLowerCase = map[string]DataEntityFromObjectEntityDetailsEntityTypeEnum{ + "table": DataEntityFromObjectEntityDetailsEntityTypeTable, + "view": DataEntityFromObjectEntityDetailsEntityTypeView, + "file": DataEntityFromObjectEntityDetailsEntityTypeFile, + "sql": DataEntityFromObjectEntityDetailsEntityTypeSql, + "object": DataEntityFromObjectEntityDetailsEntityTypeObject, +} + +// GetDataEntityFromObjectEntityDetailsEntityTypeEnumValues Enumerates the set of values for DataEntityFromObjectEntityDetailsEntityTypeEnum +func GetDataEntityFromObjectEntityDetailsEntityTypeEnumValues() []DataEntityFromObjectEntityDetailsEntityTypeEnum { + values := make([]DataEntityFromObjectEntityDetailsEntityTypeEnum, 0) + for _, v := range mappingDataEntityFromObjectEntityDetailsEntityTypeEnum { + values = append(values, v) + } + return values +} + +// GetDataEntityFromObjectEntityDetailsEntityTypeEnumStringValues Enumerates the set of values in String for DataEntityFromObjectEntityDetailsEntityTypeEnum +func GetDataEntityFromObjectEntityDetailsEntityTypeEnumStringValues() []string { + return []string{ + "TABLE", + "VIEW", + "FILE", + "SQL", + "OBJECT", + } +} + +// GetMappingDataEntityFromObjectEntityDetailsEntityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDataEntityFromObjectEntityDetailsEntityTypeEnum(val string) (DataEntityFromObjectEntityDetailsEntityTypeEnum, bool) { + enum, ok := mappingDataEntityFromObjectEntityDetailsEntityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/data_entity_summary.go b/dataintegration/data_entity_summary.go index 6756fd63a8..94786eba95 100644 --- a/dataintegration/data_entity_summary.go +++ b/dataintegration/data_entity_summary.go @@ -57,6 +57,10 @@ func (m *dataentitysummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := DataEntitySummaryFromFile{} err = json.Unmarshal(data, &mm) return mm, err + case "OBJECT_ENTITY": + mm := DataEntitySummaryFromObject{} + err = json.Unmarshal(data, &mm) + return mm, err case "TABLE_ENTITY": mm := DataEntitySummaryFromTable{} err = json.Unmarshal(data, &mm) @@ -109,6 +113,7 @@ const ( DataEntitySummaryModelTypeTableEntity DataEntitySummaryModelTypeEnum = "TABLE_ENTITY" DataEntitySummaryModelTypeFileEntity DataEntitySummaryModelTypeEnum = "FILE_ENTITY" DataEntitySummaryModelTypeSqlEntity DataEntitySummaryModelTypeEnum = "SQL_ENTITY" + DataEntitySummaryModelTypeObjectEntity DataEntitySummaryModelTypeEnum = "OBJECT_ENTITY" DataEntitySummaryModelTypeDataStoreEntity DataEntitySummaryModelTypeEnum = "DATA_STORE_ENTITY" ) @@ -117,6 +122,7 @@ var mappingDataEntitySummaryModelTypeEnum = map[string]DataEntitySummaryModelTyp "TABLE_ENTITY": DataEntitySummaryModelTypeTableEntity, "FILE_ENTITY": DataEntitySummaryModelTypeFileEntity, "SQL_ENTITY": DataEntitySummaryModelTypeSqlEntity, + "OBJECT_ENTITY": DataEntitySummaryModelTypeObjectEntity, "DATA_STORE_ENTITY": DataEntitySummaryModelTypeDataStoreEntity, } @@ -125,6 +131,7 @@ var mappingDataEntitySummaryModelTypeEnumLowerCase = map[string]DataEntitySummar "table_entity": DataEntitySummaryModelTypeTableEntity, "file_entity": DataEntitySummaryModelTypeFileEntity, "sql_entity": DataEntitySummaryModelTypeSqlEntity, + "object_entity": DataEntitySummaryModelTypeObjectEntity, "data_store_entity": DataEntitySummaryModelTypeDataStoreEntity, } @@ -144,6 +151,7 @@ func GetDataEntitySummaryModelTypeEnumStringValues() []string { "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", + "OBJECT_ENTITY", "DATA_STORE_ENTITY", } } diff --git a/dataintegration/data_entity_summary_from_object.go b/dataintegration/data_entity_summary_from_object.go new file mode 100644 index 0000000000..8b842e0a5e --- /dev/null +++ b/dataintegration/data_entity_summary_from_object.go @@ -0,0 +1,238 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataEntitySummaryFromObject The application object entity data entity details. +type DataEntitySummaryFromObject struct { + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The object key. + Key *string `mandatory:"false" json:"key"` + + // The object's model version. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // Detailed description for the object. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The external key for the object + ExternalKey *string `mandatory:"false" json:"externalKey"` + + Shape *Shape `mandatory:"false" json:"shape"` + + // The shape ID. + ShapeId *string `mandatory:"false" json:"shapeId"` + + // Specifies other type label. + OtherTypeLabel *string `mandatory:"false" json:"otherTypeLabel"` + + // An array of unique keys. + UniqueKeys []UniqueKey `mandatory:"false" json:"uniqueKeys"` + + // An array of foreign keys. + ForeignKeys []ForeignKey `mandatory:"false" json:"foreignKeys"` + + // The resource name. + ResourceName *string `mandatory:"false" json:"resourceName"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The entity type. + EntityType DataEntitySummaryFromObjectEntityTypeEnum `mandatory:"false" json:"entityType,omitempty"` +} + +//GetMetadata returns Metadata +func (m DataEntitySummaryFromObject) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m DataEntitySummaryFromObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DataEntitySummaryFromObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDataEntitySummaryFromObjectEntityTypeEnum(string(m.EntityType)); !ok && m.EntityType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EntityType: %s. Supported values are: %s.", m.EntityType, strings.Join(GetDataEntitySummaryFromObjectEntityTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DataEntitySummaryFromObject) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDataEntitySummaryFromObject DataEntitySummaryFromObject + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeDataEntitySummaryFromObject + }{ + "OBJECT_ENTITY", + (MarshalTypeDataEntitySummaryFromObject)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *DataEntitySummaryFromObject) UnmarshalJSON(data []byte) (e error) { + model := struct { + Metadata *ObjectMetadata `json:"metadata"` + Key *string `json:"key"` + ModelVersion *string `json:"modelVersion"` + ParentRef *ParentReference `json:"parentRef"` + Name *string `json:"name"` + Description *string `json:"description"` + ObjectVersion *int `json:"objectVersion"` + ExternalKey *string `json:"externalKey"` + Shape *Shape `json:"shape"` + ShapeId *string `json:"shapeId"` + EntityType DataEntitySummaryFromObjectEntityTypeEnum `json:"entityType"` + OtherTypeLabel *string `json:"otherTypeLabel"` + UniqueKeys []uniquekey `json:"uniqueKeys"` + ForeignKeys []ForeignKey `json:"foreignKeys"` + ResourceName *string `json:"resourceName"` + ObjectStatus *int `json:"objectStatus"` + Identifier *string `json:"identifier"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Metadata = model.Metadata + + m.Key = model.Key + + m.ModelVersion = model.ModelVersion + + m.ParentRef = model.ParentRef + + m.Name = model.Name + + m.Description = model.Description + + m.ObjectVersion = model.ObjectVersion + + m.ExternalKey = model.ExternalKey + + m.Shape = model.Shape + + m.ShapeId = model.ShapeId + + m.EntityType = model.EntityType + + m.OtherTypeLabel = model.OtherTypeLabel + + m.UniqueKeys = make([]UniqueKey, len(model.UniqueKeys)) + for i, n := range model.UniqueKeys { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.UniqueKeys[i] = nn.(UniqueKey) + } else { + m.UniqueKeys[i] = nil + } + } + + m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) + for i, n := range model.ForeignKeys { + m.ForeignKeys[i] = n + } + + m.ResourceName = model.ResourceName + + m.ObjectStatus = model.ObjectStatus + + m.Identifier = model.Identifier + + return +} + +// DataEntitySummaryFromObjectEntityTypeEnum Enum with underlying type: string +type DataEntitySummaryFromObjectEntityTypeEnum string + +// Set of constants representing the allowable values for DataEntitySummaryFromObjectEntityTypeEnum +const ( + DataEntitySummaryFromObjectEntityTypeTable DataEntitySummaryFromObjectEntityTypeEnum = "TABLE" + DataEntitySummaryFromObjectEntityTypeView DataEntitySummaryFromObjectEntityTypeEnum = "VIEW" + DataEntitySummaryFromObjectEntityTypeFile DataEntitySummaryFromObjectEntityTypeEnum = "FILE" + DataEntitySummaryFromObjectEntityTypeSql DataEntitySummaryFromObjectEntityTypeEnum = "SQL" + DataEntitySummaryFromObjectEntityTypeObject DataEntitySummaryFromObjectEntityTypeEnum = "OBJECT" +) + +var mappingDataEntitySummaryFromObjectEntityTypeEnum = map[string]DataEntitySummaryFromObjectEntityTypeEnum{ + "TABLE": DataEntitySummaryFromObjectEntityTypeTable, + "VIEW": DataEntitySummaryFromObjectEntityTypeView, + "FILE": DataEntitySummaryFromObjectEntityTypeFile, + "SQL": DataEntitySummaryFromObjectEntityTypeSql, + "OBJECT": DataEntitySummaryFromObjectEntityTypeObject, +} + +var mappingDataEntitySummaryFromObjectEntityTypeEnumLowerCase = map[string]DataEntitySummaryFromObjectEntityTypeEnum{ + "table": DataEntitySummaryFromObjectEntityTypeTable, + "view": DataEntitySummaryFromObjectEntityTypeView, + "file": DataEntitySummaryFromObjectEntityTypeFile, + "sql": DataEntitySummaryFromObjectEntityTypeSql, + "object": DataEntitySummaryFromObjectEntityTypeObject, +} + +// GetDataEntitySummaryFromObjectEntityTypeEnumValues Enumerates the set of values for DataEntitySummaryFromObjectEntityTypeEnum +func GetDataEntitySummaryFromObjectEntityTypeEnumValues() []DataEntitySummaryFromObjectEntityTypeEnum { + values := make([]DataEntitySummaryFromObjectEntityTypeEnum, 0) + for _, v := range mappingDataEntitySummaryFromObjectEntityTypeEnum { + values = append(values, v) + } + return values +} + +// GetDataEntitySummaryFromObjectEntityTypeEnumStringValues Enumerates the set of values in String for DataEntitySummaryFromObjectEntityTypeEnum +func GetDataEntitySummaryFromObjectEntityTypeEnumStringValues() []string { + return []string{ + "TABLE", + "VIEW", + "FILE", + "SQL", + "OBJECT", + } +} + +// GetMappingDataEntitySummaryFromObjectEntityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDataEntitySummaryFromObjectEntityTypeEnum(val string) (DataEntitySummaryFromObjectEntityTypeEnum, bool) { + enum, ok := mappingDataEntitySummaryFromObjectEntityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/dataintegration_client.go b/dataintegration/dataintegration_client.go index fe1ff41a5c..7228a59218 100644 --- a/dataintegration/dataintegration_client.go +++ b/dataintegration/dataintegration_client.go @@ -894,6 +894,68 @@ func (client DataIntegrationClient) createEntityShape(ctx context.Context, reque return response, err } +// CreateExportRequest Export Metadata Object +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/CreateExportRequest.go.html to see an example of how to use CreateExportRequest API. +func (client DataIntegrationClient) CreateExportRequest(ctx context.Context, request CreateExportRequestRequest) (response CreateExportRequestResponse, 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.createExportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateExportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateExportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateExportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateExportRequestResponse") + } + return +} + +// createExportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) createExportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/workspaces/{workspaceId}/exportRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateExportRequestResponse + 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, "DataIntegration", "CreateExportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateExternalPublication Publish a DataFlow in a OCI DataFlow application. // // See also @@ -1144,6 +1206,68 @@ func (client DataIntegrationClient) createFunctionLibrary(ctx context.Context, r return response, err } +// CreateImportRequest Import Metadata Object +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/CreateImportRequest.go.html to see an example of how to use CreateImportRequest API. +func (client DataIntegrationClient) CreateImportRequest(ctx context.Context, request CreateImportRequestRequest) (response CreateImportRequestResponse, 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.createImportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateImportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateImportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateImportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateImportRequestResponse") + } + return +} + +// createImportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) createImportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/workspaces/{workspaceId}/importRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateImportRequestResponse + 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, "DataIntegration", "CreateImportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreatePatch Creates a patch in an application. // // See also @@ -2458,6 +2582,63 @@ func (client DataIntegrationClient) deleteDisApplicationDetailedDescription(ctx return response, err } +// DeleteExportRequest Delete export object request using the specified identifier. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/DeleteExportRequest.go.html to see an example of how to use DeleteExportRequest API. +func (client DataIntegrationClient) DeleteExportRequest(ctx context.Context, request DeleteExportRequestRequest) (response DeleteExportRequestResponse, 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.deleteExportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteExportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteExportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteExportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteExportRequestResponse") + } + return +} + +// deleteExportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) deleteExportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workspaces/{workspaceId}/exportRequests/{exportRequestKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteExportRequestResponse + 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-integration/20200430/Workspace/DeleteExportRequest" + err = common.PostProcessServiceError(err, "DataIntegration", "DeleteExportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteExternalPublication Removes a published object using the specified identifier. // // See also @@ -2686,6 +2867,63 @@ func (client DataIntegrationClient) deleteFunctionLibrary(ctx context.Context, r return response, err } +// DeleteImportRequest Delete import object request using the specified identifier. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/DeleteImportRequest.go.html to see an example of how to use DeleteImportRequest API. +func (client DataIntegrationClient) DeleteImportRequest(ctx context.Context, request DeleteImportRequestRequest) (response DeleteImportRequestResponse, 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.deleteImportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteImportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteImportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteImportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteImportRequestResponse") + } + return +} + +// deleteImportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) deleteImportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workspaces/{workspaceId}/importRequests/{importRequestKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteImportRequestResponse + 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-integration/20200430/Workspace/DeleteImportRequest" + err = common.PostProcessServiceError(err, "DataIntegration", "DeleteImportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeletePatch Removes a patch using the specified identifier. // // See also @@ -3484,6 +3722,63 @@ func (client DataIntegrationClient) getApplicationDetailedDescription(ctx contex return response, err } +// GetCompositeState This endpoint can be used to get composite state for a given aggregator +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/GetCompositeState.go.html to see an example of how to use GetCompositeState API. +func (client DataIntegrationClient) GetCompositeState(ctx context.Context, request GetCompositeStateRequest) (response GetCompositeStateResponse, 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.getCompositeState, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCompositeStateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCompositeStateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCompositeStateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCompositeStateResponse") + } + return +} + +// getCompositeState implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) getCompositeState(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workspaces/{workspaceId}/applications/{applicationKey}/compositeState", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCompositeStateResponse + 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-integration/20200430/CompositeState/GetCompositeState" + err = common.PostProcessServiceError(err, "DataIntegration", "GetCompositeState", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetConnection Retrieves the connection details using the specified identifier. // // See also @@ -4112,6 +4407,63 @@ func (client DataIntegrationClient) getDisApplicationDetailedDescription(ctx con return response, err } +// GetExportRequest This endpoint can be used to get the summary/details of object being exported. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/GetExportRequest.go.html to see an example of how to use GetExportRequest API. +func (client DataIntegrationClient) GetExportRequest(ctx context.Context, request GetExportRequestRequest) (response GetExportRequestResponse, 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.getExportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetExportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetExportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetExportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExportRequestResponse") + } + return +} + +// getExportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) getExportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workspaces/{workspaceId}/exportRequests/{exportRequestKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetExportRequestResponse + 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-integration/20200430/ExportRequest/GetExportRequest" + err = common.PostProcessServiceError(err, "DataIntegration", "GetExportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetExternalPublication Retrieves a publshed object in an task using the specified identifier. // // See also @@ -4340,6 +4692,63 @@ func (client DataIntegrationClient) getFunctionLibrary(ctx context.Context, requ return response, err } +// GetImportRequest This endpoint can be used to get the summary/details of object being imported. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/GetImportRequest.go.html to see an example of how to use GetImportRequest API. +func (client DataIntegrationClient) GetImportRequest(ctx context.Context, request GetImportRequestRequest) (response GetImportRequestResponse, 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.getImportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetImportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetImportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetImportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetImportRequestResponse") + } + return +} + +// getImportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) getImportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workspaces/{workspaceId}/importRequests/{importRequestKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetImportRequestResponse + 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-integration/20200430/ImportRequest/GetImportRequest" + err = common.PostProcessServiceError(err, "DataIntegration", "GetImportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetPatch Retrieves a patch in an application using the specified identifier. // // See also @@ -6050,6 +6459,63 @@ func (client DataIntegrationClient) listDisApplications(ctx context.Context, req return response, err } +// ListExportRequests This endpoint can be used to get the list of export object requests. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/ListExportRequests.go.html to see an example of how to use ListExportRequests API. +func (client DataIntegrationClient) ListExportRequests(ctx context.Context, request ListExportRequestsRequest) (response ListExportRequestsResponse, 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.listExportRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListExportRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListExportRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListExportRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListExportRequestsResponse") + } + return +} + +// listExportRequests implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) listExportRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workspaces/{workspaceId}/exportRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListExportRequestsResponse + 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-integration/20200430/ExportRequestSummaryCollection/ListExportRequests" + err = common.PostProcessServiceError(err, "DataIntegration", "ListExportRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListExternalPublicationValidations Retrieves a lists of external publication validations in a workspace and provides options to filter the list. // // See also @@ -6278,6 +6744,63 @@ func (client DataIntegrationClient) listFunctionLibraries(ctx context.Context, r return response, err } +// ListImportRequests This endpoint can be used to get the list of import object requests. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/ListImportRequests.go.html to see an example of how to use ListImportRequests API. +func (client DataIntegrationClient) ListImportRequests(ctx context.Context, request ListImportRequestsRequest) (response ListImportRequestsResponse, 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.listImportRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListImportRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListImportRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListImportRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListImportRequestsResponse") + } + return +} + +// listImportRequests implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) listImportRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workspaces/{workspaceId}/importRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListImportRequestsResponse + 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-integration/20200430/ImportRequestSummaryCollection/ListImportRequests" + err = common.PostProcessServiceError(err, "DataIntegration", "ListImportRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListPatchChanges Retrieves a list of patches in an application and provides options to filter the list. // // See also @@ -8226,6 +8749,63 @@ func (client DataIntegrationClient) updateDisApplicationDetailedDescription(ctx return response, err } +// UpdateExportRequest Updates the status of a export object request. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/UpdateExportRequest.go.html to see an example of how to use UpdateExportRequest API. +func (client DataIntegrationClient) UpdateExportRequest(ctx context.Context, request UpdateExportRequestRequest) (response UpdateExportRequestResponse, 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.updateExportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateExportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateExportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateExportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateExportRequestResponse") + } + return +} + +// updateExportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) updateExportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/workspaces/{workspaceId}/exportRequests/{exportRequestKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateExportRequestResponse + 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-integration/20200430/Workspace/UpdateExportRequest" + err = common.PostProcessServiceError(err, "DataIntegration", "UpdateExportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateExternalPublication Updates the external publication object. // // See also @@ -8397,6 +8977,63 @@ func (client DataIntegrationClient) updateFunctionLibrary(ctx context.Context, r return response, err } +// UpdateImportRequest Updates the status of a import object request. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/UpdateImportRequest.go.html to see an example of how to use UpdateImportRequest API. +func (client DataIntegrationClient) UpdateImportRequest(ctx context.Context, request UpdateImportRequestRequest) (response UpdateImportRequestResponse, 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.updateImportRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateImportRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateImportRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateImportRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateImportRequestResponse") + } + return +} + +// updateImportRequest implements the OCIOperation interface (enables retrying operations) +func (client DataIntegrationClient) updateImportRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/workspaces/{workspaceId}/importRequests/{importRequestKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateImportRequestResponse + 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-integration/20200430/Workspace/UpdateImportRequest" + err = common.PostProcessServiceError(err, "DataIntegration", "UpdateImportRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdatePipeline Updates a specific pipeline. // // See also diff --git a/dataintegration/delete_export_request_request_response.go b/dataintegration/delete_export_request_request_response.go new file mode 100644 index 0000000000..d50cb9eb0b --- /dev/null +++ b/dataintegration/delete_export_request_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteExportRequestRequest wrapper for the DeleteExportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/DeleteExportRequest.go.html to see an example of how to use DeleteExportRequestRequest. +type DeleteExportRequestRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The key of the object export object request + ExportRequestKey *string `mandatory:"true" contributesTo:"path" name:"exportRequestKey"` + + // 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 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. + // When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. + 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 DeleteExportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteExportRequestRequest) 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 DeleteExportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteExportRequestRequest) 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 DeleteExportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteExportRequestResponse wrapper for the DeleteExportRequest operation +type DeleteExportRequestResponse 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 DeleteExportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteExportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/delete_import_request_request_response.go b/dataintegration/delete_import_request_request_response.go new file mode 100644 index 0000000000..fb9e4cb2ce --- /dev/null +++ b/dataintegration/delete_import_request_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteImportRequestRequest wrapper for the DeleteImportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/DeleteImportRequest.go.html to see an example of how to use DeleteImportRequestRequest. +type DeleteImportRequestRequest struct { + + // The key of the object export object request + ImportRequestKey *string `mandatory:"true" contributesTo:"path" name:"importRequestKey"` + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // 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 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. + // When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. + 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 DeleteImportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteImportRequestRequest) 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 DeleteImportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteImportRequestRequest) 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 DeleteImportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteImportRequestResponse wrapper for the DeleteImportRequest operation +type DeleteImportRequestResponse 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 DeleteImportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteImportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/entity_shape.go b/dataintegration/entity_shape.go index df9955c6d5..cf706bf08f 100644 --- a/dataintegration/entity_shape.go +++ b/dataintegration/entity_shape.go @@ -53,6 +53,10 @@ func (m *entityshape) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) var err error switch m.ModelType { + case "OBJECT_ENTITY": + mm := EntityShapeFromObject{} + err = json.Unmarshal(data, &mm) + return mm, err case "SQL_ENTITY": mm := EntityShapeFromSql{} err = json.Unmarshal(data, &mm) @@ -93,18 +97,21 @@ type EntityShapeModelTypeEnum string // Set of constants representing the allowable values for EntityShapeModelTypeEnum const ( - EntityShapeModelTypeFileEntity EntityShapeModelTypeEnum = "FILE_ENTITY" - EntityShapeModelTypeSqlEntity EntityShapeModelTypeEnum = "SQL_ENTITY" + EntityShapeModelTypeFileEntity EntityShapeModelTypeEnum = "FILE_ENTITY" + EntityShapeModelTypeSqlEntity EntityShapeModelTypeEnum = "SQL_ENTITY" + EntityShapeModelTypeObjectEntity EntityShapeModelTypeEnum = "OBJECT_ENTITY" ) var mappingEntityShapeModelTypeEnum = map[string]EntityShapeModelTypeEnum{ - "FILE_ENTITY": EntityShapeModelTypeFileEntity, - "SQL_ENTITY": EntityShapeModelTypeSqlEntity, + "FILE_ENTITY": EntityShapeModelTypeFileEntity, + "SQL_ENTITY": EntityShapeModelTypeSqlEntity, + "OBJECT_ENTITY": EntityShapeModelTypeObjectEntity, } var mappingEntityShapeModelTypeEnumLowerCase = map[string]EntityShapeModelTypeEnum{ - "file_entity": EntityShapeModelTypeFileEntity, - "sql_entity": EntityShapeModelTypeSqlEntity, + "file_entity": EntityShapeModelTypeFileEntity, + "sql_entity": EntityShapeModelTypeSqlEntity, + "object_entity": EntityShapeModelTypeObjectEntity, } // GetEntityShapeModelTypeEnumValues Enumerates the set of values for EntityShapeModelTypeEnum @@ -121,6 +128,7 @@ func GetEntityShapeModelTypeEnumStringValues() []string { return []string{ "FILE_ENTITY", "SQL_ENTITY", + "OBJECT_ENTITY", } } diff --git a/dataintegration/entity_shape_from_object.go b/dataintegration/entity_shape_from_object.go new file mode 100644 index 0000000000..3febb74e28 --- /dev/null +++ b/dataintegration/entity_shape_from_object.go @@ -0,0 +1,243 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EntityShapeFromObject The application object entity details. +type EntityShapeFromObject struct { + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + // The object key. + Key *string `mandatory:"false" json:"key"` + + // The object's model version. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // Detailed description for the object. + Description *string `mandatory:"false" json:"description"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + Shape *Shape `mandatory:"false" json:"shape"` + + // The shape ID. + ShapeId *string `mandatory:"false" json:"shapeId"` + + // Specifies other type label. + OtherTypeLabel *string `mandatory:"false" json:"otherTypeLabel"` + + // An array of unique keys. + UniqueKeys []UniqueKey `mandatory:"false" json:"uniqueKeys"` + + // An array of foreign keys. + ForeignKeys []ForeignKey `mandatory:"false" json:"foreignKeys"` + + // The resource name. + ResourceName *string `mandatory:"false" json:"resourceName"` + + DataFormat *DataFormat `mandatory:"false" json:"dataFormat"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The entity type. + EntityType EntityShapeFromObjectEntityTypeEnum `mandatory:"false" json:"entityType,omitempty"` +} + +//GetMetadata returns Metadata +func (m EntityShapeFromObject) GetMetadata() *ObjectMetadata { + return m.Metadata +} + +func (m EntityShapeFromObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EntityShapeFromObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingEntityShapeFromObjectEntityTypeEnum(string(m.EntityType)); !ok && m.EntityType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EntityType: %s. Supported values are: %s.", m.EntityType, strings.Join(GetEntityShapeFromObjectEntityTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m EntityShapeFromObject) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEntityShapeFromObject EntityShapeFromObject + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeEntityShapeFromObject + }{ + "OBJECT_ENTITY", + (MarshalTypeEntityShapeFromObject)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *EntityShapeFromObject) UnmarshalJSON(data []byte) (e error) { + model := struct { + Metadata *ObjectMetadata `json:"metadata"` + Key *string `json:"key"` + ModelVersion *string `json:"modelVersion"` + ParentRef *ParentReference `json:"parentRef"` + Name *string `json:"name"` + Description *string `json:"description"` + ObjectVersion *int `json:"objectVersion"` + ExternalKey *string `json:"externalKey"` + Shape *Shape `json:"shape"` + ShapeId *string `json:"shapeId"` + EntityType EntityShapeFromObjectEntityTypeEnum `json:"entityType"` + OtherTypeLabel *string `json:"otherTypeLabel"` + UniqueKeys []uniquekey `json:"uniqueKeys"` + ForeignKeys []ForeignKey `json:"foreignKeys"` + ResourceName *string `json:"resourceName"` + DataFormat *DataFormat `json:"dataFormat"` + ObjectStatus *int `json:"objectStatus"` + Identifier *string `json:"identifier"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Metadata = model.Metadata + + m.Key = model.Key + + m.ModelVersion = model.ModelVersion + + m.ParentRef = model.ParentRef + + m.Name = model.Name + + m.Description = model.Description + + m.ObjectVersion = model.ObjectVersion + + m.ExternalKey = model.ExternalKey + + m.Shape = model.Shape + + m.ShapeId = model.ShapeId + + m.EntityType = model.EntityType + + m.OtherTypeLabel = model.OtherTypeLabel + + m.UniqueKeys = make([]UniqueKey, len(model.UniqueKeys)) + for i, n := range model.UniqueKeys { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.UniqueKeys[i] = nn.(UniqueKey) + } else { + m.UniqueKeys[i] = nil + } + } + + m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) + for i, n := range model.ForeignKeys { + m.ForeignKeys[i] = n + } + + m.ResourceName = model.ResourceName + + m.DataFormat = model.DataFormat + + m.ObjectStatus = model.ObjectStatus + + m.Identifier = model.Identifier + + return +} + +// EntityShapeFromObjectEntityTypeEnum Enum with underlying type: string +type EntityShapeFromObjectEntityTypeEnum string + +// Set of constants representing the allowable values for EntityShapeFromObjectEntityTypeEnum +const ( + EntityShapeFromObjectEntityTypeTable EntityShapeFromObjectEntityTypeEnum = "TABLE" + EntityShapeFromObjectEntityTypeView EntityShapeFromObjectEntityTypeEnum = "VIEW" + EntityShapeFromObjectEntityTypeFile EntityShapeFromObjectEntityTypeEnum = "FILE" + EntityShapeFromObjectEntityTypeSql EntityShapeFromObjectEntityTypeEnum = "SQL" + EntityShapeFromObjectEntityTypeObject EntityShapeFromObjectEntityTypeEnum = "OBJECT" +) + +var mappingEntityShapeFromObjectEntityTypeEnum = map[string]EntityShapeFromObjectEntityTypeEnum{ + "TABLE": EntityShapeFromObjectEntityTypeTable, + "VIEW": EntityShapeFromObjectEntityTypeView, + "FILE": EntityShapeFromObjectEntityTypeFile, + "SQL": EntityShapeFromObjectEntityTypeSql, + "OBJECT": EntityShapeFromObjectEntityTypeObject, +} + +var mappingEntityShapeFromObjectEntityTypeEnumLowerCase = map[string]EntityShapeFromObjectEntityTypeEnum{ + "table": EntityShapeFromObjectEntityTypeTable, + "view": EntityShapeFromObjectEntityTypeView, + "file": EntityShapeFromObjectEntityTypeFile, + "sql": EntityShapeFromObjectEntityTypeSql, + "object": EntityShapeFromObjectEntityTypeObject, +} + +// GetEntityShapeFromObjectEntityTypeEnumValues Enumerates the set of values for EntityShapeFromObjectEntityTypeEnum +func GetEntityShapeFromObjectEntityTypeEnumValues() []EntityShapeFromObjectEntityTypeEnum { + values := make([]EntityShapeFromObjectEntityTypeEnum, 0) + for _, v := range mappingEntityShapeFromObjectEntityTypeEnum { + values = append(values, v) + } + return values +} + +// GetEntityShapeFromObjectEntityTypeEnumStringValues Enumerates the set of values in String for EntityShapeFromObjectEntityTypeEnum +func GetEntityShapeFromObjectEntityTypeEnumStringValues() []string { + return []string{ + "TABLE", + "VIEW", + "FILE", + "SQL", + "OBJECT", + } +} + +// GetMappingEntityShapeFromObjectEntityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingEntityShapeFromObjectEntityTypeEnum(val string) (EntityShapeFromObjectEntityTypeEnum, bool) { + enum, ok := mappingEntityShapeFromObjectEntityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/export_object_metadata_summary.go b/dataintegration/export_object_metadata_summary.go new file mode 100644 index 0000000000..6b01e59ad7 --- /dev/null +++ b/dataintegration/export_object_metadata_summary.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportObjectMetadataSummary Details of the exported object +type ExportObjectMetadataSummary struct { + + // Key of the object + Key *string `mandatory:"false" json:"key"` + + // Name of the object + Name *string `mandatory:"false" json:"name"` + + // Object identifier + Identifier *string `mandatory:"false" json:"identifier"` + + // Object type + ObjectType *string `mandatory:"false" json:"objectType"` + + // Object version + ObjectVersion *string `mandatory:"false" json:"objectVersion"` + + // Aggregator key + AggregatorKey *string `mandatory:"false" json:"aggregatorKey"` + + // Object name path + NamePath *string `mandatory:"false" json:"namePath"` + + // time at which this object was last updated. + TimeUpdatedInMillis *int64 `mandatory:"false" json:"timeUpdatedInMillis"` +} + +func (m ExportObjectMetadataSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportObjectMetadataSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/dataintegration/export_request.go b/dataintegration/export_request.go new file mode 100644 index 0000000000..d78ea5ba4a --- /dev/null +++ b/dataintegration/export_request.go @@ -0,0 +1,151 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportRequest Export metadata object response. +type ExportRequest struct { + + // Export object request key + Key *string `mandatory:"false" json:"key"` + + // The list of the objects to be exported + ObjectKeys []string `mandatory:"false" json:"objectKeys"` + + // The name of the Object Storage Bucket where the objects will be exported to + BucketName *string `mandatory:"false" json:"bucketName"` + + // Name of the exported zip file. + FileName *string `mandatory:"false" json:"fileName"` + + // Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy) + ObjectStorageTenancyId *string `mandatory:"false" json:"objectStorageTenancyId"` + + // Region of the object storage (if using object storage of different region) + ObjectStorageRegion *string `mandatory:"false" json:"objectStorageRegion"` + + // Controls if the references will be exported along with the objects + AreReferencesIncluded *bool `mandatory:"false" json:"areReferencesIncluded"` + + // Flag to control whether to overwrite the object if it is already present at the provided object storage location. + IsObjectOverwriteEnabled *bool `mandatory:"false" json:"isObjectOverwriteEnabled"` + + // Export multiple objects based on filters. + Filters []string `mandatory:"false" json:"filters"` + + // Export Objects request status. + Status ExportRequestStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Name of the user who initiated export request. + CreatedBy *string `mandatory:"false" json:"createdBy"` + + // Number of objects that are exported. + TotalExportedObjectCount *int `mandatory:"false" json:"totalExportedObjectCount"` + + // Time at which the request started getting processed. + TimeStartedInMillis *int64 `mandatory:"false" json:"timeStartedInMillis"` + + // Time at which the request was completely processed. + TimeEndedInMillis *int64 `mandatory:"false" json:"timeEndedInMillis"` + + // Contains key of the error + ErrorMessages map[string]string `mandatory:"false" json:"errorMessages"` + + // The array of exported object details. + ExportedItems []ExportObjectMetadataSummary `mandatory:"false" json:"exportedItems"` + + // The array of exported referenced objects. + ReferencedItems *string `mandatory:"false" json:"referencedItems"` + + // Name of the export request. + Name *string `mandatory:"false" json:"name"` +} + +func (m ExportRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExportRequestStatusEnum(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(GetExportRequestStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExportRequestStatusEnum Enum with underlying type: string +type ExportRequestStatusEnum string + +// Set of constants representing the allowable values for ExportRequestStatusEnum +const ( + ExportRequestStatusSuccessful ExportRequestStatusEnum = "SUCCESSFUL" + ExportRequestStatusFailed ExportRequestStatusEnum = "FAILED" + ExportRequestStatusInProgress ExportRequestStatusEnum = "IN_PROGRESS" + ExportRequestStatusTerminating ExportRequestStatusEnum = "TERMINATING" + ExportRequestStatusTerminated ExportRequestStatusEnum = "TERMINATED" + ExportRequestStatusQueued ExportRequestStatusEnum = "QUEUED" +) + +var mappingExportRequestStatusEnum = map[string]ExportRequestStatusEnum{ + "SUCCESSFUL": ExportRequestStatusSuccessful, + "FAILED": ExportRequestStatusFailed, + "IN_PROGRESS": ExportRequestStatusInProgress, + "TERMINATING": ExportRequestStatusTerminating, + "TERMINATED": ExportRequestStatusTerminated, + "QUEUED": ExportRequestStatusQueued, +} + +var mappingExportRequestStatusEnumLowerCase = map[string]ExportRequestStatusEnum{ + "successful": ExportRequestStatusSuccessful, + "failed": ExportRequestStatusFailed, + "in_progress": ExportRequestStatusInProgress, + "terminating": ExportRequestStatusTerminating, + "terminated": ExportRequestStatusTerminated, + "queued": ExportRequestStatusQueued, +} + +// GetExportRequestStatusEnumValues Enumerates the set of values for ExportRequestStatusEnum +func GetExportRequestStatusEnumValues() []ExportRequestStatusEnum { + values := make([]ExportRequestStatusEnum, 0) + for _, v := range mappingExportRequestStatusEnum { + values = append(values, v) + } + return values +} + +// GetExportRequestStatusEnumStringValues Enumerates the set of values in String for ExportRequestStatusEnum +func GetExportRequestStatusEnumStringValues() []string { + return []string{ + "SUCCESSFUL", + "FAILED", + "IN_PROGRESS", + "TERMINATING", + "TERMINATED", + "QUEUED", + } +} + +// GetMappingExportRequestStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExportRequestStatusEnum(val string) (ExportRequestStatusEnum, bool) { + enum, ok := mappingExportRequestStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/export_request_summary.go b/dataintegration/export_request_summary.go new file mode 100644 index 0000000000..f0808b76a1 --- /dev/null +++ b/dataintegration/export_request_summary.go @@ -0,0 +1,151 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportRequestSummary Export metadata object response summary. +type ExportRequestSummary struct { + + // Export object request key + Key *string `mandatory:"false" json:"key"` + + // The list of the objects to be exported + ObjectKeys []string `mandatory:"false" json:"objectKeys"` + + // The name of the Object Storage Bucket where the objects will be exported to + BucketName *string `mandatory:"false" json:"bucketName"` + + // Name of the exported zip file. + FileName *string `mandatory:"false" json:"fileName"` + + // Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy) + ObjectStorageTenancyId *string `mandatory:"false" json:"objectStorageTenancyId"` + + // Region of the object storage (if using object storage of different region) + ObjectStorageRegion *string `mandatory:"false" json:"objectStorageRegion"` + + // Controls if the references will be exported along with the objects + AreReferencesIncluded *bool `mandatory:"false" json:"areReferencesIncluded"` + + // Flag to control whether to overwrite the object if it is already present at the provided object storage location. + IsObjectOverwriteEnabled *bool `mandatory:"false" json:"isObjectOverwriteEnabled"` + + // Export multiple objects based on filters. + Filters []string `mandatory:"false" json:"filters"` + + // Export Objects request status. + Status ExportRequestSummaryStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Name of the user who initiated export request. + CreatedBy *string `mandatory:"false" json:"createdBy"` + + // Number of objects that are exported. + TotalExportedObjectCount *int `mandatory:"false" json:"totalExportedObjectCount"` + + // Time at which the request started getting processed. + TimeStartedInMillis *int64 `mandatory:"false" json:"timeStartedInMillis"` + + // Time at which the request was completely processed. + TimeEndedInMillis *int64 `mandatory:"false" json:"timeEndedInMillis"` + + // Contains key of the error + ErrorMessages map[string]string `mandatory:"false" json:"errorMessages"` + + // The array of exported object details. + ExportedItems []ExportObjectMetadataSummary `mandatory:"false" json:"exportedItems"` + + // The array of exported referenced objects. + ReferencedItems *string `mandatory:"false" json:"referencedItems"` + + // Name of the export request. + Name *string `mandatory:"false" json:"name"` +} + +func (m ExportRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExportRequestSummaryStatusEnum(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(GetExportRequestSummaryStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExportRequestSummaryStatusEnum Enum with underlying type: string +type ExportRequestSummaryStatusEnum string + +// Set of constants representing the allowable values for ExportRequestSummaryStatusEnum +const ( + ExportRequestSummaryStatusSuccessful ExportRequestSummaryStatusEnum = "SUCCESSFUL" + ExportRequestSummaryStatusFailed ExportRequestSummaryStatusEnum = "FAILED" + ExportRequestSummaryStatusInProgress ExportRequestSummaryStatusEnum = "IN_PROGRESS" + ExportRequestSummaryStatusTerminating ExportRequestSummaryStatusEnum = "TERMINATING" + ExportRequestSummaryStatusTerminated ExportRequestSummaryStatusEnum = "TERMINATED" + ExportRequestSummaryStatusQueued ExportRequestSummaryStatusEnum = "QUEUED" +) + +var mappingExportRequestSummaryStatusEnum = map[string]ExportRequestSummaryStatusEnum{ + "SUCCESSFUL": ExportRequestSummaryStatusSuccessful, + "FAILED": ExportRequestSummaryStatusFailed, + "IN_PROGRESS": ExportRequestSummaryStatusInProgress, + "TERMINATING": ExportRequestSummaryStatusTerminating, + "TERMINATED": ExportRequestSummaryStatusTerminated, + "QUEUED": ExportRequestSummaryStatusQueued, +} + +var mappingExportRequestSummaryStatusEnumLowerCase = map[string]ExportRequestSummaryStatusEnum{ + "successful": ExportRequestSummaryStatusSuccessful, + "failed": ExportRequestSummaryStatusFailed, + "in_progress": ExportRequestSummaryStatusInProgress, + "terminating": ExportRequestSummaryStatusTerminating, + "terminated": ExportRequestSummaryStatusTerminated, + "queued": ExportRequestSummaryStatusQueued, +} + +// GetExportRequestSummaryStatusEnumValues Enumerates the set of values for ExportRequestSummaryStatusEnum +func GetExportRequestSummaryStatusEnumValues() []ExportRequestSummaryStatusEnum { + values := make([]ExportRequestSummaryStatusEnum, 0) + for _, v := range mappingExportRequestSummaryStatusEnum { + values = append(values, v) + } + return values +} + +// GetExportRequestSummaryStatusEnumStringValues Enumerates the set of values in String for ExportRequestSummaryStatusEnum +func GetExportRequestSummaryStatusEnumStringValues() []string { + return []string{ + "SUCCESSFUL", + "FAILED", + "IN_PROGRESS", + "TERMINATING", + "TERMINATED", + "QUEUED", + } +} + +// GetMappingExportRequestSummaryStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExportRequestSummaryStatusEnum(val string) (ExportRequestSummaryStatusEnum, bool) { + enum, ok := mappingExportRequestSummaryStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/export_request_summary_collection.go b/dataintegration/export_request_summary_collection.go new file mode 100644 index 0000000000..2eb4b6d1c3 --- /dev/null +++ b/dataintegration/export_request_summary_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportRequestSummaryCollection This is the collection of export object requests. +type ExportRequestSummaryCollection struct { + + // The array of export object requests status summaries. + Items []ExportRequestSummary `mandatory:"true" json:"items"` +} + +func (m ExportRequestSummaryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportRequestSummaryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/dataintegration/get_composite_state_request_response.go b/dataintegration/get_composite_state_request_response.go new file mode 100644 index 0000000000..74681e3c0a --- /dev/null +++ b/dataintegration/get_composite_state_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCompositeStateRequest wrapper for the GetCompositeState operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/GetCompositeState.go.html to see an example of how to use GetCompositeStateRequest. +type GetCompositeStateRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The application key. + ApplicationKey *string `mandatory:"true" contributesTo:"path" name:"applicationKey"` + + // Unique key of the aggregator for which we want to get the Composite State + AggregatorKey *string `mandatory:"true" contributesTo:"query" name:"aggregatorKey"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCompositeStateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCompositeStateRequest) 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 GetCompositeStateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCompositeStateRequest) 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 GetCompositeStateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCompositeStateResponse wrapper for the GetCompositeState operation +type GetCompositeStateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CompositeState instance + CompositeState `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 GetCompositeStateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCompositeStateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/get_export_request_request_response.go b/dataintegration/get_export_request_request_response.go new file mode 100644 index 0000000000..ada4337136 --- /dev/null +++ b/dataintegration/get_export_request_request_response.go @@ -0,0 +1,98 @@ +// 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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetExportRequestRequest wrapper for the GetExportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/GetExportRequest.go.html to see an example of how to use GetExportRequestRequest. +type GetExportRequestRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The key of the object export object request + ExportRequestKey *string `mandatory:"true" contributesTo:"path" name:"exportRequestKey"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetExportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExportRequestRequest) 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 GetExportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExportRequestRequest) 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 GetExportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetExportRequestResponse wrapper for the GetExportRequest operation +type GetExportRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportRequest instance + ExportRequest `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 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"` +} + +func (response GetExportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/get_import_request_request_response.go b/dataintegration/get_import_request_request_response.go new file mode 100644 index 0000000000..54a2f3aa36 --- /dev/null +++ b/dataintegration/get_import_request_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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetImportRequestRequest wrapper for the GetImportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/GetImportRequest.go.html to see an example of how to use GetImportRequestRequest. +type GetImportRequestRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The key of the object export object request + ImportRequestKey *string `mandatory:"true" contributesTo:"path" name:"importRequestKey"` + + // 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"` + + // Sets the maximum number of results per page, or items to return in a paginated `List` call. 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 for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetImportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetImportRequestRequest) 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 GetImportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetImportRequestRequest) 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 GetImportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetImportRequestResponse wrapper for the GetImportRequest operation +type GetImportRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ImportRequest instances + ImportRequest `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 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"` +} + +func (response GetImportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetImportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/import_conflict_resolution.go b/dataintegration/import_conflict_resolution.go new file mode 100644 index 0000000000..a80b8f65bd --- /dev/null +++ b/dataintegration/import_conflict_resolution.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImportConflictResolution Import Objects Conflict resolution. +type ImportConflictResolution struct { + + // Import Objects Conflict resolution Type (RETAIN/DUPLICATE/REPLACE). + ImportConflictResolutionType ImportConflictResolutionImportConflictResolutionTypeEnum `mandatory:"true" json:"importConflictResolutionType"` + + // In case of DUPLICATE mode, prefix will be used to disambiguate the object. + DuplicatePrefix *string `mandatory:"false" json:"duplicatePrefix"` + + // In case of DUPLICATE mode, suffix will be used to disambiguate the object. + DuplicateSuffix *string `mandatory:"false" json:"duplicateSuffix"` +} + +func (m ImportConflictResolution) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImportConflictResolution) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingImportConflictResolutionImportConflictResolutionTypeEnum(string(m.ImportConflictResolutionType)); !ok && m.ImportConflictResolutionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ImportConflictResolutionType: %s. Supported values are: %s.", m.ImportConflictResolutionType, strings.Join(GetImportConflictResolutionImportConflictResolutionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ImportConflictResolutionImportConflictResolutionTypeEnum Enum with underlying type: string +type ImportConflictResolutionImportConflictResolutionTypeEnum string + +// Set of constants representing the allowable values for ImportConflictResolutionImportConflictResolutionTypeEnum +const ( + ImportConflictResolutionImportConflictResolutionTypeDuplicate ImportConflictResolutionImportConflictResolutionTypeEnum = "DUPLICATE" + ImportConflictResolutionImportConflictResolutionTypeReplace ImportConflictResolutionImportConflictResolutionTypeEnum = "REPLACE" + ImportConflictResolutionImportConflictResolutionTypeRetain ImportConflictResolutionImportConflictResolutionTypeEnum = "RETAIN" +) + +var mappingImportConflictResolutionImportConflictResolutionTypeEnum = map[string]ImportConflictResolutionImportConflictResolutionTypeEnum{ + "DUPLICATE": ImportConflictResolutionImportConflictResolutionTypeDuplicate, + "REPLACE": ImportConflictResolutionImportConflictResolutionTypeReplace, + "RETAIN": ImportConflictResolutionImportConflictResolutionTypeRetain, +} + +var mappingImportConflictResolutionImportConflictResolutionTypeEnumLowerCase = map[string]ImportConflictResolutionImportConflictResolutionTypeEnum{ + "duplicate": ImportConflictResolutionImportConflictResolutionTypeDuplicate, + "replace": ImportConflictResolutionImportConflictResolutionTypeReplace, + "retain": ImportConflictResolutionImportConflictResolutionTypeRetain, +} + +// GetImportConflictResolutionImportConflictResolutionTypeEnumValues Enumerates the set of values for ImportConflictResolutionImportConflictResolutionTypeEnum +func GetImportConflictResolutionImportConflictResolutionTypeEnumValues() []ImportConflictResolutionImportConflictResolutionTypeEnum { + values := make([]ImportConflictResolutionImportConflictResolutionTypeEnum, 0) + for _, v := range mappingImportConflictResolutionImportConflictResolutionTypeEnum { + values = append(values, v) + } + return values +} + +// GetImportConflictResolutionImportConflictResolutionTypeEnumStringValues Enumerates the set of values in String for ImportConflictResolutionImportConflictResolutionTypeEnum +func GetImportConflictResolutionImportConflictResolutionTypeEnumStringValues() []string { + return []string{ + "DUPLICATE", + "REPLACE", + "RETAIN", + } +} + +// GetMappingImportConflictResolutionImportConflictResolutionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImportConflictResolutionImportConflictResolutionTypeEnum(val string) (ImportConflictResolutionImportConflictResolutionTypeEnum, bool) { + enum, ok := mappingImportConflictResolutionImportConflictResolutionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/import_object_metadata_summary.go b/dataintegration/import_object_metadata_summary.go new file mode 100644 index 0000000000..f10867a387 --- /dev/null +++ b/dataintegration/import_object_metadata_summary.go @@ -0,0 +1,119 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImportObjectMetadataSummary Details of the objects to imported. +type ImportObjectMetadataSummary struct { + + // Old key of the object + OldKey *string `mandatory:"false" json:"oldKey"` + + // New key of the object + NewKey *string `mandatory:"false" json:"newKey"` + + // Name of the object + Name *string `mandatory:"false" json:"name"` + + // Object identifier + Identifier *string `mandatory:"false" json:"identifier"` + + // Object type + ObjectType *string `mandatory:"false" json:"objectType"` + + // Object version + ObjectVersion *string `mandatory:"false" json:"objectVersion"` + + // Aggregator key + AggregatorKey *string `mandatory:"false" json:"aggregatorKey"` + + // Object name path + NamePath *string `mandatory:"false" json:"namePath"` + + // time at which this object was last updated. + TimeUpdatedInMillis *int64 `mandatory:"false" json:"timeUpdatedInMillis"` + + // Object resolution action + ResolutionAction ImportObjectMetadataSummaryResolutionActionEnum `mandatory:"false" json:"resolutionAction,omitempty"` +} + +func (m ImportObjectMetadataSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImportObjectMetadataSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImportObjectMetadataSummaryResolutionActionEnum(string(m.ResolutionAction)); !ok && m.ResolutionAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResolutionAction: %s. Supported values are: %s.", m.ResolutionAction, strings.Join(GetImportObjectMetadataSummaryResolutionActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ImportObjectMetadataSummaryResolutionActionEnum Enum with underlying type: string +type ImportObjectMetadataSummaryResolutionActionEnum string + +// Set of constants representing the allowable values for ImportObjectMetadataSummaryResolutionActionEnum +const ( + ImportObjectMetadataSummaryResolutionActionCreated ImportObjectMetadataSummaryResolutionActionEnum = "CREATED" + ImportObjectMetadataSummaryResolutionActionRetained ImportObjectMetadataSummaryResolutionActionEnum = "RETAINED" + ImportObjectMetadataSummaryResolutionActionDuplicated ImportObjectMetadataSummaryResolutionActionEnum = "DUPLICATED" + ImportObjectMetadataSummaryResolutionActionReplaced ImportObjectMetadataSummaryResolutionActionEnum = "REPLACED" +) + +var mappingImportObjectMetadataSummaryResolutionActionEnum = map[string]ImportObjectMetadataSummaryResolutionActionEnum{ + "CREATED": ImportObjectMetadataSummaryResolutionActionCreated, + "RETAINED": ImportObjectMetadataSummaryResolutionActionRetained, + "DUPLICATED": ImportObjectMetadataSummaryResolutionActionDuplicated, + "REPLACED": ImportObjectMetadataSummaryResolutionActionReplaced, +} + +var mappingImportObjectMetadataSummaryResolutionActionEnumLowerCase = map[string]ImportObjectMetadataSummaryResolutionActionEnum{ + "created": ImportObjectMetadataSummaryResolutionActionCreated, + "retained": ImportObjectMetadataSummaryResolutionActionRetained, + "duplicated": ImportObjectMetadataSummaryResolutionActionDuplicated, + "replaced": ImportObjectMetadataSummaryResolutionActionReplaced, +} + +// GetImportObjectMetadataSummaryResolutionActionEnumValues Enumerates the set of values for ImportObjectMetadataSummaryResolutionActionEnum +func GetImportObjectMetadataSummaryResolutionActionEnumValues() []ImportObjectMetadataSummaryResolutionActionEnum { + values := make([]ImportObjectMetadataSummaryResolutionActionEnum, 0) + for _, v := range mappingImportObjectMetadataSummaryResolutionActionEnum { + values = append(values, v) + } + return values +} + +// GetImportObjectMetadataSummaryResolutionActionEnumStringValues Enumerates the set of values in String for ImportObjectMetadataSummaryResolutionActionEnum +func GetImportObjectMetadataSummaryResolutionActionEnumStringValues() []string { + return []string{ + "CREATED", + "RETAINED", + "DUPLICATED", + "REPLACED", + } +} + +// GetMappingImportObjectMetadataSummaryResolutionActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImportObjectMetadataSummaryResolutionActionEnum(val string) (ImportObjectMetadataSummaryResolutionActionEnum, bool) { + enum, ok := mappingImportObjectMetadataSummaryResolutionActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/import_request.go b/dataintegration/import_request.go new file mode 100644 index 0000000000..e233cf10c1 --- /dev/null +++ b/dataintegration/import_request.go @@ -0,0 +1,141 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImportRequest Import metadata object response. +type ImportRequest struct { + + // Import object request key + Key *string `mandatory:"false" json:"key"` + + // The name of the Object Storage Bucket where the objects will be imported from + BucketName *string `mandatory:"false" json:"bucketName"` + + // Name of the zip file from which objects will be imported. + FileName *string `mandatory:"false" json:"fileName"` + + // Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy) + ObjectStorageTenancyId *string `mandatory:"false" json:"objectStorageTenancyId"` + + // Region of the object storage (if using object storage of different region) + ObjectStorageRegion *string `mandatory:"false" json:"objectStorageRegion"` + + // Key of the object inside which all the objects will be imported + ObjectKeyForImport *string `mandatory:"false" json:"objectKeyForImport"` + + ImportConflictResolution *ImportConflictResolution `mandatory:"false" json:"importConflictResolution"` + + // Import Objects request status. + Status ImportRequestStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Name of the user who initiated import request. + CreatedBy *string `mandatory:"false" json:"createdBy"` + + // Number of objects that are imported. + TotalImportedObjectCount *int `mandatory:"false" json:"totalImportedObjectCount"` + + // Time at which the request started getting processed. + TimeStartedInMillis *int64 `mandatory:"false" json:"timeStartedInMillis"` + + // Time at which the request was completely processed. + TimeEndedInMillis *int64 `mandatory:"false" json:"timeEndedInMillis"` + + // Contains key of the error + ErrorMessages map[string]string `mandatory:"false" json:"errorMessages"` + + // The array of imported object details. + ImportedObjects []ImportObjectMetadataSummary `mandatory:"false" json:"importedObjects"` + + // Name of the import request. + Name *string `mandatory:"false" json:"name"` +} + +func (m ImportRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImportRequestStatusEnum(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(GetImportRequestStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ImportRequestStatusEnum Enum with underlying type: string +type ImportRequestStatusEnum string + +// Set of constants representing the allowable values for ImportRequestStatusEnum +const ( + ImportRequestStatusSuccessful ImportRequestStatusEnum = "SUCCESSFUL" + ImportRequestStatusFailed ImportRequestStatusEnum = "FAILED" + ImportRequestStatusInProgress ImportRequestStatusEnum = "IN_PROGRESS" + ImportRequestStatusTerminating ImportRequestStatusEnum = "TERMINATING" + ImportRequestStatusTerminated ImportRequestStatusEnum = "TERMINATED" + ImportRequestStatusQueued ImportRequestStatusEnum = "QUEUED" +) + +var mappingImportRequestStatusEnum = map[string]ImportRequestStatusEnum{ + "SUCCESSFUL": ImportRequestStatusSuccessful, + "FAILED": ImportRequestStatusFailed, + "IN_PROGRESS": ImportRequestStatusInProgress, + "TERMINATING": ImportRequestStatusTerminating, + "TERMINATED": ImportRequestStatusTerminated, + "QUEUED": ImportRequestStatusQueued, +} + +var mappingImportRequestStatusEnumLowerCase = map[string]ImportRequestStatusEnum{ + "successful": ImportRequestStatusSuccessful, + "failed": ImportRequestStatusFailed, + "in_progress": ImportRequestStatusInProgress, + "terminating": ImportRequestStatusTerminating, + "terminated": ImportRequestStatusTerminated, + "queued": ImportRequestStatusQueued, +} + +// GetImportRequestStatusEnumValues Enumerates the set of values for ImportRequestStatusEnum +func GetImportRequestStatusEnumValues() []ImportRequestStatusEnum { + values := make([]ImportRequestStatusEnum, 0) + for _, v := range mappingImportRequestStatusEnum { + values = append(values, v) + } + return values +} + +// GetImportRequestStatusEnumStringValues Enumerates the set of values in String for ImportRequestStatusEnum +func GetImportRequestStatusEnumStringValues() []string { + return []string{ + "SUCCESSFUL", + "FAILED", + "IN_PROGRESS", + "TERMINATING", + "TERMINATED", + "QUEUED", + } +} + +// GetMappingImportRequestStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImportRequestStatusEnum(val string) (ImportRequestStatusEnum, bool) { + enum, ok := mappingImportRequestStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/import_request_summary.go b/dataintegration/import_request_summary.go new file mode 100644 index 0000000000..e916547828 --- /dev/null +++ b/dataintegration/import_request_summary.go @@ -0,0 +1,141 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImportRequestSummary Import metadata object response summary. +type ImportRequestSummary struct { + + // Import object request key + Key *string `mandatory:"false" json:"key"` + + // The name of the Object Storage Bucket where the objects will be imported from + BucketName *string `mandatory:"false" json:"bucketName"` + + // Name of the zip file from which objects will be imported. + FileName *string `mandatory:"false" json:"fileName"` + + // Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy) + ObjectStorageTenancyId *string `mandatory:"false" json:"objectStorageTenancyId"` + + // Region of the object storage (if using object storage of different region) + ObjectStorageRegion *string `mandatory:"false" json:"objectStorageRegion"` + + // Key of the object inside which all the objects will be imported + ObjectKeyForImport *string `mandatory:"false" json:"objectKeyForImport"` + + ImportConflictResolution *ImportConflictResolution `mandatory:"false" json:"importConflictResolution"` + + // Import Objects request status. + Status ImportRequestSummaryStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Name of the user who initiated import request. + CreatedBy *string `mandatory:"false" json:"createdBy"` + + // Number of objects that are imported. + TotalImportedObjectCount *int `mandatory:"false" json:"totalImportedObjectCount"` + + // Time at which the request started getting processed. + TimeStartedInMillis *int64 `mandatory:"false" json:"timeStartedInMillis"` + + // Time at which the request was completely processed. + TimeEndedInMillis *int64 `mandatory:"false" json:"timeEndedInMillis"` + + // Contains key of the error + ErrorMessages map[string]string `mandatory:"false" json:"errorMessages"` + + // The array of imported object details. + ImportedObjects []ImportObjectMetadataSummary `mandatory:"false" json:"importedObjects"` + + // Name of the import request. + Name *string `mandatory:"false" json:"name"` +} + +func (m ImportRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImportRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImportRequestSummaryStatusEnum(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(GetImportRequestSummaryStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ImportRequestSummaryStatusEnum Enum with underlying type: string +type ImportRequestSummaryStatusEnum string + +// Set of constants representing the allowable values for ImportRequestSummaryStatusEnum +const ( + ImportRequestSummaryStatusSuccessful ImportRequestSummaryStatusEnum = "SUCCESSFUL" + ImportRequestSummaryStatusFailed ImportRequestSummaryStatusEnum = "FAILED" + ImportRequestSummaryStatusInProgress ImportRequestSummaryStatusEnum = "IN_PROGRESS" + ImportRequestSummaryStatusTerminating ImportRequestSummaryStatusEnum = "TERMINATING" + ImportRequestSummaryStatusTerminated ImportRequestSummaryStatusEnum = "TERMINATED" + ImportRequestSummaryStatusQueued ImportRequestSummaryStatusEnum = "QUEUED" +) + +var mappingImportRequestSummaryStatusEnum = map[string]ImportRequestSummaryStatusEnum{ + "SUCCESSFUL": ImportRequestSummaryStatusSuccessful, + "FAILED": ImportRequestSummaryStatusFailed, + "IN_PROGRESS": ImportRequestSummaryStatusInProgress, + "TERMINATING": ImportRequestSummaryStatusTerminating, + "TERMINATED": ImportRequestSummaryStatusTerminated, + "QUEUED": ImportRequestSummaryStatusQueued, +} + +var mappingImportRequestSummaryStatusEnumLowerCase = map[string]ImportRequestSummaryStatusEnum{ + "successful": ImportRequestSummaryStatusSuccessful, + "failed": ImportRequestSummaryStatusFailed, + "in_progress": ImportRequestSummaryStatusInProgress, + "terminating": ImportRequestSummaryStatusTerminating, + "terminated": ImportRequestSummaryStatusTerminated, + "queued": ImportRequestSummaryStatusQueued, +} + +// GetImportRequestSummaryStatusEnumValues Enumerates the set of values for ImportRequestSummaryStatusEnum +func GetImportRequestSummaryStatusEnumValues() []ImportRequestSummaryStatusEnum { + values := make([]ImportRequestSummaryStatusEnum, 0) + for _, v := range mappingImportRequestSummaryStatusEnum { + values = append(values, v) + } + return values +} + +// GetImportRequestSummaryStatusEnumStringValues Enumerates the set of values in String for ImportRequestSummaryStatusEnum +func GetImportRequestSummaryStatusEnumStringValues() []string { + return []string{ + "SUCCESSFUL", + "FAILED", + "IN_PROGRESS", + "TERMINATING", + "TERMINATED", + "QUEUED", + } +} + +// GetMappingImportRequestSummaryStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImportRequestSummaryStatusEnum(val string) (ImportRequestSummaryStatusEnum, bool) { + enum, ok := mappingImportRequestSummaryStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/import_request_summary_collection.go b/dataintegration/import_request_summary_collection.go new file mode 100644 index 0000000000..3040f2adff --- /dev/null +++ b/dataintegration/import_request_summary_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImportRequestSummaryCollection This is the collection of import object requests. +type ImportRequestSummaryCollection struct { + + // The array of import object requests status summaries. + Items []ImportRequestSummary `mandatory:"true" json:"items"` +} + +func (m ImportRequestSummaryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImportRequestSummaryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/dataintegration/list_export_requests_request_response.go b/dataintegration/list_export_requests_request_response.go new file mode 100644 index 0000000000..fd3661b969 --- /dev/null +++ b/dataintegration/list_export_requests_request_response.go @@ -0,0 +1,322 @@ +// 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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListExportRequestsRequest wrapper for the ListExportRequests operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/ListExportRequests.go.html to see an example of how to use ListExportRequestsRequest. +type ListExportRequestsRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // 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 value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Sets the maximum number of results per page, or items to return in a paginated `List` call. See List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Used to filter by the name of the object. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + SortOrder ListExportRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). + SortBy ListExportRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Specifies export status to use, either - ALL, SUCCESSFUL, IN_PROGRESS, QUEUED, FAILED . + ExportStatus ListExportRequestsExportStatusEnum `mandatory:"false" contributesTo:"query" name:"exportStatus" omitEmpty:"true"` + + // This parameter allows users to specify which view of the export object response to return. SUMMARY - Summary of the export object request will be returned. This is the default option when no value is specified. DETAILS - Details of export object request will be returned. This will include details of all the objects to be exported. + Projection ListExportRequestsProjectionEnum `mandatory:"false" contributesTo:"query" name:"projection" omitEmpty:"true"` + + // Specifies start time of a copy object request. + TimeStartedInMillis *int64 `mandatory:"false" contributesTo:"query" name:"timeStartedInMillis"` + + // Specifies end time of a copy object request. + TimeEndedInMillis *int64 `mandatory:"false" contributesTo:"query" name:"timeEndedInMillis"` + + // 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 ListExportRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListExportRequestsRequest) 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 ListExportRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListExportRequestsRequest) 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 ListExportRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListExportRequestsSortOrderEnum(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(GetListExportRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListExportRequestsSortByEnum(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(GetListExportRequestsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListExportRequestsExportStatusEnum(string(request.ExportStatus)); !ok && request.ExportStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportStatus: %s. Supported values are: %s.", request.ExportStatus, strings.Join(GetListExportRequestsExportStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListExportRequestsProjectionEnum(string(request.Projection)); !ok && request.Projection != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Projection: %s. Supported values are: %s.", request.Projection, strings.Join(GetListExportRequestsProjectionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListExportRequestsResponse wrapper for the ListExportRequests operation +type ListExportRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ExportRequestSummaryCollection instances + ExportRequestSummaryCollection `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 ListExportRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListExportRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListExportRequestsSortOrderEnum Enum with underlying type: string +type ListExportRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListExportRequestsSortOrderEnum +const ( + ListExportRequestsSortOrderAsc ListExportRequestsSortOrderEnum = "ASC" + ListExportRequestsSortOrderDesc ListExportRequestsSortOrderEnum = "DESC" +) + +var mappingListExportRequestsSortOrderEnum = map[string]ListExportRequestsSortOrderEnum{ + "ASC": ListExportRequestsSortOrderAsc, + "DESC": ListExportRequestsSortOrderDesc, +} + +var mappingListExportRequestsSortOrderEnumLowerCase = map[string]ListExportRequestsSortOrderEnum{ + "asc": ListExportRequestsSortOrderAsc, + "desc": ListExportRequestsSortOrderDesc, +} + +// GetListExportRequestsSortOrderEnumValues Enumerates the set of values for ListExportRequestsSortOrderEnum +func GetListExportRequestsSortOrderEnumValues() []ListExportRequestsSortOrderEnum { + values := make([]ListExportRequestsSortOrderEnum, 0) + for _, v := range mappingListExportRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListExportRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListExportRequestsSortOrderEnum +func GetListExportRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListExportRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExportRequestsSortOrderEnum(val string) (ListExportRequestsSortOrderEnum, bool) { + enum, ok := mappingListExportRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListExportRequestsSortByEnum Enum with underlying type: string +type ListExportRequestsSortByEnum string + +// Set of constants representing the allowable values for ListExportRequestsSortByEnum +const ( + ListExportRequestsSortByTimeCreated ListExportRequestsSortByEnum = "TIME_CREATED" + ListExportRequestsSortByDisplayName ListExportRequestsSortByEnum = "DISPLAY_NAME" + ListExportRequestsSortByTimeUpdated ListExportRequestsSortByEnum = "TIME_UPDATED" +) + +var mappingListExportRequestsSortByEnum = map[string]ListExportRequestsSortByEnum{ + "TIME_CREATED": ListExportRequestsSortByTimeCreated, + "DISPLAY_NAME": ListExportRequestsSortByDisplayName, + "TIME_UPDATED": ListExportRequestsSortByTimeUpdated, +} + +var mappingListExportRequestsSortByEnumLowerCase = map[string]ListExportRequestsSortByEnum{ + "time_created": ListExportRequestsSortByTimeCreated, + "display_name": ListExportRequestsSortByDisplayName, + "time_updated": ListExportRequestsSortByTimeUpdated, +} + +// GetListExportRequestsSortByEnumValues Enumerates the set of values for ListExportRequestsSortByEnum +func GetListExportRequestsSortByEnumValues() []ListExportRequestsSortByEnum { + values := make([]ListExportRequestsSortByEnum, 0) + for _, v := range mappingListExportRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListExportRequestsSortByEnumStringValues Enumerates the set of values in String for ListExportRequestsSortByEnum +func GetListExportRequestsSortByEnumStringValues() []string { + return []string{ + "TIME_CREATED", + "DISPLAY_NAME", + "TIME_UPDATED", + } +} + +// GetMappingListExportRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExportRequestsSortByEnum(val string) (ListExportRequestsSortByEnum, bool) { + enum, ok := mappingListExportRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListExportRequestsExportStatusEnum Enum with underlying type: string +type ListExportRequestsExportStatusEnum string + +// Set of constants representing the allowable values for ListExportRequestsExportStatusEnum +const ( + ListExportRequestsExportStatusInProgress ListExportRequestsExportStatusEnum = "IN_PROGRESS" + ListExportRequestsExportStatusSuccessful ListExportRequestsExportStatusEnum = "SUCCESSFUL" + ListExportRequestsExportStatusQueued ListExportRequestsExportStatusEnum = "QUEUED" + ListExportRequestsExportStatusTerminating ListExportRequestsExportStatusEnum = "TERMINATING" + ListExportRequestsExportStatusTerminated ListExportRequestsExportStatusEnum = "TERMINATED" + ListExportRequestsExportStatusFailed ListExportRequestsExportStatusEnum = "FAILED" +) + +var mappingListExportRequestsExportStatusEnum = map[string]ListExportRequestsExportStatusEnum{ + "IN_PROGRESS": ListExportRequestsExportStatusInProgress, + "SUCCESSFUL": ListExportRequestsExportStatusSuccessful, + "QUEUED": ListExportRequestsExportStatusQueued, + "TERMINATING": ListExportRequestsExportStatusTerminating, + "TERMINATED": ListExportRequestsExportStatusTerminated, + "FAILED": ListExportRequestsExportStatusFailed, +} + +var mappingListExportRequestsExportStatusEnumLowerCase = map[string]ListExportRequestsExportStatusEnum{ + "in_progress": ListExportRequestsExportStatusInProgress, + "successful": ListExportRequestsExportStatusSuccessful, + "queued": ListExportRequestsExportStatusQueued, + "terminating": ListExportRequestsExportStatusTerminating, + "terminated": ListExportRequestsExportStatusTerminated, + "failed": ListExportRequestsExportStatusFailed, +} + +// GetListExportRequestsExportStatusEnumValues Enumerates the set of values for ListExportRequestsExportStatusEnum +func GetListExportRequestsExportStatusEnumValues() []ListExportRequestsExportStatusEnum { + values := make([]ListExportRequestsExportStatusEnum, 0) + for _, v := range mappingListExportRequestsExportStatusEnum { + values = append(values, v) + } + return values +} + +// GetListExportRequestsExportStatusEnumStringValues Enumerates the set of values in String for ListExportRequestsExportStatusEnum +func GetListExportRequestsExportStatusEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "SUCCESSFUL", + "QUEUED", + "TERMINATING", + "TERMINATED", + "FAILED", + } +} + +// GetMappingListExportRequestsExportStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExportRequestsExportStatusEnum(val string) (ListExportRequestsExportStatusEnum, bool) { + enum, ok := mappingListExportRequestsExportStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListExportRequestsProjectionEnum Enum with underlying type: string +type ListExportRequestsProjectionEnum string + +// Set of constants representing the allowable values for ListExportRequestsProjectionEnum +const ( + ListExportRequestsProjectionSummary ListExportRequestsProjectionEnum = "SUMMARY" + ListExportRequestsProjectionDetails ListExportRequestsProjectionEnum = "DETAILS" +) + +var mappingListExportRequestsProjectionEnum = map[string]ListExportRequestsProjectionEnum{ + "SUMMARY": ListExportRequestsProjectionSummary, + "DETAILS": ListExportRequestsProjectionDetails, +} + +var mappingListExportRequestsProjectionEnumLowerCase = map[string]ListExportRequestsProjectionEnum{ + "summary": ListExportRequestsProjectionSummary, + "details": ListExportRequestsProjectionDetails, +} + +// GetListExportRequestsProjectionEnumValues Enumerates the set of values for ListExportRequestsProjectionEnum +func GetListExportRequestsProjectionEnumValues() []ListExportRequestsProjectionEnum { + values := make([]ListExportRequestsProjectionEnum, 0) + for _, v := range mappingListExportRequestsProjectionEnum { + values = append(values, v) + } + return values +} + +// GetListExportRequestsProjectionEnumStringValues Enumerates the set of values in String for ListExportRequestsProjectionEnum +func GetListExportRequestsProjectionEnumStringValues() []string { + return []string{ + "SUMMARY", + "DETAILS", + } +} + +// GetMappingListExportRequestsProjectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExportRequestsProjectionEnum(val string) (ListExportRequestsProjectionEnum, bool) { + enum, ok := mappingListExportRequestsProjectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/list_import_requests_request_response.go b/dataintegration/list_import_requests_request_response.go new file mode 100644 index 0000000000..3089aed503 --- /dev/null +++ b/dataintegration/list_import_requests_request_response.go @@ -0,0 +1,322 @@ +// 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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListImportRequestsRequest wrapper for the ListImportRequests operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/ListImportRequests.go.html to see an example of how to use ListImportRequestsRequest. +type ListImportRequestsRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // 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 value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Sets the maximum number of results per page, or items to return in a paginated `List` call. See List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Used to filter by the name of the object. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + SortOrder ListImportRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). + SortBy ListImportRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Specifies import status to use, either - ALL, SUCCESSFUL, IN_PROGRESS, QUEUED, FAILED . + ImportStatus ListImportRequestsImportStatusEnum `mandatory:"false" contributesTo:"query" name:"importStatus" omitEmpty:"true"` + + // This parameter allows users to specify which view of the import object response to return. SUMMARY - Summary of the import object request will be returned. This is the default option when no value is specified. DETAILS - Details of import object request will be returned. This will include details of all the objects to be exported. + Projection ListImportRequestsProjectionEnum `mandatory:"false" contributesTo:"query" name:"projection" omitEmpty:"true"` + + // Specifies start time of a copy object request. + TimeStartedInMillis *int64 `mandatory:"false" contributesTo:"query" name:"timeStartedInMillis"` + + // Specifies end time of a copy object request. + TimeEndedInMillis *int64 `mandatory:"false" contributesTo:"query" name:"timeEndedInMillis"` + + // 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 ListImportRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListImportRequestsRequest) 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 ListImportRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListImportRequestsRequest) 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 ListImportRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListImportRequestsSortOrderEnum(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(GetListImportRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListImportRequestsSortByEnum(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(GetListImportRequestsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListImportRequestsImportStatusEnum(string(request.ImportStatus)); !ok && request.ImportStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ImportStatus: %s. Supported values are: %s.", request.ImportStatus, strings.Join(GetListImportRequestsImportStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListImportRequestsProjectionEnum(string(request.Projection)); !ok && request.Projection != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Projection: %s. Supported values are: %s.", request.Projection, strings.Join(GetListImportRequestsProjectionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListImportRequestsResponse wrapper for the ListImportRequests operation +type ListImportRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ImportRequestSummaryCollection instances + ImportRequestSummaryCollection `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 ListImportRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListImportRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListImportRequestsSortOrderEnum Enum with underlying type: string +type ListImportRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListImportRequestsSortOrderEnum +const ( + ListImportRequestsSortOrderAsc ListImportRequestsSortOrderEnum = "ASC" + ListImportRequestsSortOrderDesc ListImportRequestsSortOrderEnum = "DESC" +) + +var mappingListImportRequestsSortOrderEnum = map[string]ListImportRequestsSortOrderEnum{ + "ASC": ListImportRequestsSortOrderAsc, + "DESC": ListImportRequestsSortOrderDesc, +} + +var mappingListImportRequestsSortOrderEnumLowerCase = map[string]ListImportRequestsSortOrderEnum{ + "asc": ListImportRequestsSortOrderAsc, + "desc": ListImportRequestsSortOrderDesc, +} + +// GetListImportRequestsSortOrderEnumValues Enumerates the set of values for ListImportRequestsSortOrderEnum +func GetListImportRequestsSortOrderEnumValues() []ListImportRequestsSortOrderEnum { + values := make([]ListImportRequestsSortOrderEnum, 0) + for _, v := range mappingListImportRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListImportRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListImportRequestsSortOrderEnum +func GetListImportRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListImportRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListImportRequestsSortOrderEnum(val string) (ListImportRequestsSortOrderEnum, bool) { + enum, ok := mappingListImportRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListImportRequestsSortByEnum Enum with underlying type: string +type ListImportRequestsSortByEnum string + +// Set of constants representing the allowable values for ListImportRequestsSortByEnum +const ( + ListImportRequestsSortByTimeCreated ListImportRequestsSortByEnum = "TIME_CREATED" + ListImportRequestsSortByDisplayName ListImportRequestsSortByEnum = "DISPLAY_NAME" + ListImportRequestsSortByTimeUpdated ListImportRequestsSortByEnum = "TIME_UPDATED" +) + +var mappingListImportRequestsSortByEnum = map[string]ListImportRequestsSortByEnum{ + "TIME_CREATED": ListImportRequestsSortByTimeCreated, + "DISPLAY_NAME": ListImportRequestsSortByDisplayName, + "TIME_UPDATED": ListImportRequestsSortByTimeUpdated, +} + +var mappingListImportRequestsSortByEnumLowerCase = map[string]ListImportRequestsSortByEnum{ + "time_created": ListImportRequestsSortByTimeCreated, + "display_name": ListImportRequestsSortByDisplayName, + "time_updated": ListImportRequestsSortByTimeUpdated, +} + +// GetListImportRequestsSortByEnumValues Enumerates the set of values for ListImportRequestsSortByEnum +func GetListImportRequestsSortByEnumValues() []ListImportRequestsSortByEnum { + values := make([]ListImportRequestsSortByEnum, 0) + for _, v := range mappingListImportRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListImportRequestsSortByEnumStringValues Enumerates the set of values in String for ListImportRequestsSortByEnum +func GetListImportRequestsSortByEnumStringValues() []string { + return []string{ + "TIME_CREATED", + "DISPLAY_NAME", + "TIME_UPDATED", + } +} + +// GetMappingListImportRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListImportRequestsSortByEnum(val string) (ListImportRequestsSortByEnum, bool) { + enum, ok := mappingListImportRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListImportRequestsImportStatusEnum Enum with underlying type: string +type ListImportRequestsImportStatusEnum string + +// Set of constants representing the allowable values for ListImportRequestsImportStatusEnum +const ( + ListImportRequestsImportStatusInProgress ListImportRequestsImportStatusEnum = "IN_PROGRESS" + ListImportRequestsImportStatusSuccessful ListImportRequestsImportStatusEnum = "SUCCESSFUL" + ListImportRequestsImportStatusQueued ListImportRequestsImportStatusEnum = "QUEUED" + ListImportRequestsImportStatusTerminating ListImportRequestsImportStatusEnum = "TERMINATING" + ListImportRequestsImportStatusTerminated ListImportRequestsImportStatusEnum = "TERMINATED" + ListImportRequestsImportStatusFailed ListImportRequestsImportStatusEnum = "FAILED" +) + +var mappingListImportRequestsImportStatusEnum = map[string]ListImportRequestsImportStatusEnum{ + "IN_PROGRESS": ListImportRequestsImportStatusInProgress, + "SUCCESSFUL": ListImportRequestsImportStatusSuccessful, + "QUEUED": ListImportRequestsImportStatusQueued, + "TERMINATING": ListImportRequestsImportStatusTerminating, + "TERMINATED": ListImportRequestsImportStatusTerminated, + "FAILED": ListImportRequestsImportStatusFailed, +} + +var mappingListImportRequestsImportStatusEnumLowerCase = map[string]ListImportRequestsImportStatusEnum{ + "in_progress": ListImportRequestsImportStatusInProgress, + "successful": ListImportRequestsImportStatusSuccessful, + "queued": ListImportRequestsImportStatusQueued, + "terminating": ListImportRequestsImportStatusTerminating, + "terminated": ListImportRequestsImportStatusTerminated, + "failed": ListImportRequestsImportStatusFailed, +} + +// GetListImportRequestsImportStatusEnumValues Enumerates the set of values for ListImportRequestsImportStatusEnum +func GetListImportRequestsImportStatusEnumValues() []ListImportRequestsImportStatusEnum { + values := make([]ListImportRequestsImportStatusEnum, 0) + for _, v := range mappingListImportRequestsImportStatusEnum { + values = append(values, v) + } + return values +} + +// GetListImportRequestsImportStatusEnumStringValues Enumerates the set of values in String for ListImportRequestsImportStatusEnum +func GetListImportRequestsImportStatusEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "SUCCESSFUL", + "QUEUED", + "TERMINATING", + "TERMINATED", + "FAILED", + } +} + +// GetMappingListImportRequestsImportStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListImportRequestsImportStatusEnum(val string) (ListImportRequestsImportStatusEnum, bool) { + enum, ok := mappingListImportRequestsImportStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListImportRequestsProjectionEnum Enum with underlying type: string +type ListImportRequestsProjectionEnum string + +// Set of constants representing the allowable values for ListImportRequestsProjectionEnum +const ( + ListImportRequestsProjectionSummary ListImportRequestsProjectionEnum = "SUMMARY" + ListImportRequestsProjectionDetails ListImportRequestsProjectionEnum = "DETAILS" +) + +var mappingListImportRequestsProjectionEnum = map[string]ListImportRequestsProjectionEnum{ + "SUMMARY": ListImportRequestsProjectionSummary, + "DETAILS": ListImportRequestsProjectionDetails, +} + +var mappingListImportRequestsProjectionEnumLowerCase = map[string]ListImportRequestsProjectionEnum{ + "summary": ListImportRequestsProjectionSummary, + "details": ListImportRequestsProjectionDetails, +} + +// GetListImportRequestsProjectionEnumValues Enumerates the set of values for ListImportRequestsProjectionEnum +func GetListImportRequestsProjectionEnumValues() []ListImportRequestsProjectionEnum { + values := make([]ListImportRequestsProjectionEnum, 0) + for _, v := range mappingListImportRequestsProjectionEnum { + values = append(values, v) + } + return values +} + +// GetListImportRequestsProjectionEnumStringValues Enumerates the set of values in String for ListImportRequestsProjectionEnum +func GetListImportRequestsProjectionEnumStringValues() []string { + return []string{ + "SUMMARY", + "DETAILS", + } +} + +// GetMappingListImportRequestsProjectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListImportRequestsProjectionEnum(val string) (ListImportRequestsProjectionEnum, bool) { + enum, ok := mappingListImportRequestsProjectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/runtime_operator.go b/dataintegration/runtime_operator.go index 839bd5de6a..ef5d5b05c7 100644 --- a/dataintegration/runtime_operator.go +++ b/dataintegration/runtime_operator.go @@ -10,6 +10,7 @@ package dataintegration import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -18,6 +19,9 @@ import ( // RuntimeOperator Runtime operator model which holds the runtime metadata of the task operator executed. type RuntimeOperator struct { + // The RuntimeOperator key. + Key *string `mandatory:"false" json:"key"` + // The TaskRun key. TaskRunKey *string `mandatory:"false" json:"taskRunKey"` @@ -30,18 +34,50 @@ type RuntimeOperator struct { // status Status RuntimeOperatorStatusEnum `mandatory:"false" json:"status,omitempty"` + // The type of the object. + ModelType *string `mandatory:"false" json:"modelType"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + // status ExecutionState RuntimeOperatorExecutionStateEnum `mandatory:"false" json:"executionState,omitempty"` // A list of parameters for the pipeline, this allows certain aspects of the pipeline to be configured when the pipeline is executed. Parameters []Parameter `mandatory:"false" json:"parameters"` + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + Operator Operator `mandatory:"false" json:"operator"` + // The configuration provider bindings. Inputs map[string]ParameterValue `mandatory:"false" json:"inputs"` // The configuration provider bindings. Outputs map[string]ParameterValue `mandatory:"false" json:"outputs"` + // The type of task run. + TaskType RuntimeOperatorTaskTypeEnum `mandatory:"false" json:"taskType,omitempty"` + + ConfigProvider *ConfigProvider `mandatory:"false" json:"configProvider"` + + // The type of Runtime Operator + OperatorType RuntimeOperatorOperatorTypeEnum `mandatory:"false" json:"operatorType,omitempty"` + // A map metrics for the task run. Metrics map[string]float32 `mandatory:"false" json:"metrics"` } @@ -62,12 +98,108 @@ func (m RuntimeOperator) ValidateEnumValue() (bool, error) { if _, ok := GetMappingRuntimeOperatorExecutionStateEnum(string(m.ExecutionState)); !ok && m.ExecutionState != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExecutionState: %s. Supported values are: %s.", m.ExecutionState, strings.Join(GetRuntimeOperatorExecutionStateEnumStringValues(), ","))) } + if _, ok := GetMappingRuntimeOperatorTaskTypeEnum(string(m.TaskType)); !ok && m.TaskType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TaskType: %s. Supported values are: %s.", m.TaskType, strings.Join(GetRuntimeOperatorTaskTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRuntimeOperatorOperatorTypeEnum(string(m.OperatorType)); !ok && m.OperatorType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperatorType: %s. Supported values are: %s.", m.OperatorType, strings.Join(GetRuntimeOperatorOperatorTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } return false, nil } +// UnmarshalJSON unmarshals from json +func (m *RuntimeOperator) UnmarshalJSON(data []byte) (e error) { + model := struct { + Key *string `json:"key"` + TaskRunKey *string `json:"taskRunKey"` + StartTimeInMillis *int64 `json:"startTimeInMillis"` + EndTimeInMillis *int64 `json:"endTimeInMillis"` + Status RuntimeOperatorStatusEnum `json:"status"` + ModelType *string `json:"modelType"` + ModelVersion *string `json:"modelVersion"` + ParentRef *ParentReference `json:"parentRef"` + Name *string `json:"name"` + ObjectVersion *int `json:"objectVersion"` + Identifier *string `json:"identifier"` + ExecutionState RuntimeOperatorExecutionStateEnum `json:"executionState"` + Parameters []Parameter `json:"parameters"` + ObjectStatus *int `json:"objectStatus"` + Metadata *ObjectMetadata `json:"metadata"` + Operator operator `json:"operator"` + Inputs map[string]ParameterValue `json:"inputs"` + Outputs map[string]ParameterValue `json:"outputs"` + TaskType RuntimeOperatorTaskTypeEnum `json:"taskType"` + ConfigProvider *ConfigProvider `json:"configProvider"` + OperatorType RuntimeOperatorOperatorTypeEnum `json:"operatorType"` + Metrics map[string]float32 `json:"metrics"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Key = model.Key + + m.TaskRunKey = model.TaskRunKey + + m.StartTimeInMillis = model.StartTimeInMillis + + m.EndTimeInMillis = model.EndTimeInMillis + + m.Status = model.Status + + m.ModelType = model.ModelType + + m.ModelVersion = model.ModelVersion + + m.ParentRef = model.ParentRef + + m.Name = model.Name + + m.ObjectVersion = model.ObjectVersion + + m.Identifier = model.Identifier + + m.ExecutionState = model.ExecutionState + + m.Parameters = make([]Parameter, len(model.Parameters)) + for i, n := range model.Parameters { + m.Parameters[i] = n + } + + m.ObjectStatus = model.ObjectStatus + + m.Metadata = model.Metadata + + nn, e = model.Operator.UnmarshalPolymorphicJSON(model.Operator.JsonData) + if e != nil { + return + } + if nn != nil { + m.Operator = nn.(Operator) + } else { + m.Operator = nil + } + + m.Inputs = model.Inputs + + m.Outputs = model.Outputs + + m.TaskType = model.TaskType + + m.ConfigProvider = model.ConfigProvider + + m.OperatorType = model.OperatorType + + m.Metrics = model.Metrics + + return +} + // RuntimeOperatorStatusEnum Enum with underlying type: string type RuntimeOperatorStatusEnum string @@ -142,6 +274,7 @@ const ( RuntimeOperatorExecutionStateError RuntimeOperatorExecutionStateEnum = "ERROR" RuntimeOperatorExecutionStateSkipped RuntimeOperatorExecutionStateEnum = "SKIPPED" RuntimeOperatorExecutionStateUnknown RuntimeOperatorExecutionStateEnum = "UNKNOWN" + RuntimeOperatorExecutionStateIgnored RuntimeOperatorExecutionStateEnum = "IGNORED" ) var mappingRuntimeOperatorExecutionStateEnum = map[string]RuntimeOperatorExecutionStateEnum{ @@ -152,6 +285,7 @@ var mappingRuntimeOperatorExecutionStateEnum = map[string]RuntimeOperatorExecuti "ERROR": RuntimeOperatorExecutionStateError, "SKIPPED": RuntimeOperatorExecutionStateSkipped, "UNKNOWN": RuntimeOperatorExecutionStateUnknown, + "IGNORED": RuntimeOperatorExecutionStateIgnored, } var mappingRuntimeOperatorExecutionStateEnumLowerCase = map[string]RuntimeOperatorExecutionStateEnum{ @@ -162,6 +296,7 @@ var mappingRuntimeOperatorExecutionStateEnumLowerCase = map[string]RuntimeOperat "error": RuntimeOperatorExecutionStateError, "skipped": RuntimeOperatorExecutionStateSkipped, "unknown": RuntimeOperatorExecutionStateUnknown, + "ignored": RuntimeOperatorExecutionStateIgnored, } // GetRuntimeOperatorExecutionStateEnumValues Enumerates the set of values for RuntimeOperatorExecutionStateEnum @@ -183,6 +318,7 @@ func GetRuntimeOperatorExecutionStateEnumStringValues() []string { "ERROR", "SKIPPED", "UNKNOWN", + "IGNORED", } } @@ -191,3 +327,135 @@ func GetMappingRuntimeOperatorExecutionStateEnum(val string) (RuntimeOperatorExe enum, ok := mappingRuntimeOperatorExecutionStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// RuntimeOperatorTaskTypeEnum Enum with underlying type: string +type RuntimeOperatorTaskTypeEnum string + +// Set of constants representing the allowable values for RuntimeOperatorTaskTypeEnum +const ( + RuntimeOperatorTaskTypeIntegrationTask RuntimeOperatorTaskTypeEnum = "INTEGRATION_TASK" + RuntimeOperatorTaskTypeDataLoaderTask RuntimeOperatorTaskTypeEnum = "DATA_LOADER_TASK" + RuntimeOperatorTaskTypePipelineTask RuntimeOperatorTaskTypeEnum = "PIPELINE_TASK" + RuntimeOperatorTaskTypeSqlTask RuntimeOperatorTaskTypeEnum = "SQL_TASK" + RuntimeOperatorTaskTypeOciDataflowTask RuntimeOperatorTaskTypeEnum = "OCI_DATAFLOW_TASK" + RuntimeOperatorTaskTypeRestTask RuntimeOperatorTaskTypeEnum = "REST_TASK" +) + +var mappingRuntimeOperatorTaskTypeEnum = map[string]RuntimeOperatorTaskTypeEnum{ + "INTEGRATION_TASK": RuntimeOperatorTaskTypeIntegrationTask, + "DATA_LOADER_TASK": RuntimeOperatorTaskTypeDataLoaderTask, + "PIPELINE_TASK": RuntimeOperatorTaskTypePipelineTask, + "SQL_TASK": RuntimeOperatorTaskTypeSqlTask, + "OCI_DATAFLOW_TASK": RuntimeOperatorTaskTypeOciDataflowTask, + "REST_TASK": RuntimeOperatorTaskTypeRestTask, +} + +var mappingRuntimeOperatorTaskTypeEnumLowerCase = map[string]RuntimeOperatorTaskTypeEnum{ + "integration_task": RuntimeOperatorTaskTypeIntegrationTask, + "data_loader_task": RuntimeOperatorTaskTypeDataLoaderTask, + "pipeline_task": RuntimeOperatorTaskTypePipelineTask, + "sql_task": RuntimeOperatorTaskTypeSqlTask, + "oci_dataflow_task": RuntimeOperatorTaskTypeOciDataflowTask, + "rest_task": RuntimeOperatorTaskTypeRestTask, +} + +// GetRuntimeOperatorTaskTypeEnumValues Enumerates the set of values for RuntimeOperatorTaskTypeEnum +func GetRuntimeOperatorTaskTypeEnumValues() []RuntimeOperatorTaskTypeEnum { + values := make([]RuntimeOperatorTaskTypeEnum, 0) + for _, v := range mappingRuntimeOperatorTaskTypeEnum { + values = append(values, v) + } + return values +} + +// GetRuntimeOperatorTaskTypeEnumStringValues Enumerates the set of values in String for RuntimeOperatorTaskTypeEnum +func GetRuntimeOperatorTaskTypeEnumStringValues() []string { + return []string{ + "INTEGRATION_TASK", + "DATA_LOADER_TASK", + "PIPELINE_TASK", + "SQL_TASK", + "OCI_DATAFLOW_TASK", + "REST_TASK", + } +} + +// GetMappingRuntimeOperatorTaskTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRuntimeOperatorTaskTypeEnum(val string) (RuntimeOperatorTaskTypeEnum, bool) { + enum, ok := mappingRuntimeOperatorTaskTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// RuntimeOperatorOperatorTypeEnum Enum with underlying type: string +type RuntimeOperatorOperatorTypeEnum string + +// Set of constants representing the allowable values for RuntimeOperatorOperatorTypeEnum +const ( + RuntimeOperatorOperatorTypeBashOperator RuntimeOperatorOperatorTypeEnum = "BASH_OPERATOR" + RuntimeOperatorOperatorTypeTaskOperator RuntimeOperatorOperatorTypeEnum = "TASK_OPERATOR" + RuntimeOperatorOperatorTypeRestOperator RuntimeOperatorOperatorTypeEnum = "REST_OPERATOR" + RuntimeOperatorOperatorTypeStartOperator RuntimeOperatorOperatorTypeEnum = "START_OPERATOR" + RuntimeOperatorOperatorTypeEndOperator RuntimeOperatorOperatorTypeEnum = "END_OPERATOR" + RuntimeOperatorOperatorTypeExpressionOperator RuntimeOperatorOperatorTypeEnum = "EXPRESSION_OPERATOR" + RuntimeOperatorOperatorTypeMergeOperator RuntimeOperatorOperatorTypeEnum = "MERGE_OPERATOR" + RuntimeOperatorOperatorTypeDecisionOperator RuntimeOperatorOperatorTypeEnum = "DECISION_OPERATOR" + RuntimeOperatorOperatorTypeLoopOperator RuntimeOperatorOperatorTypeEnum = "LOOP_OPERATOR" + RuntimeOperatorOperatorTypeActualEndOperator RuntimeOperatorOperatorTypeEnum = "ACTUAL_END_OPERATOR" +) + +var mappingRuntimeOperatorOperatorTypeEnum = map[string]RuntimeOperatorOperatorTypeEnum{ + "BASH_OPERATOR": RuntimeOperatorOperatorTypeBashOperator, + "TASK_OPERATOR": RuntimeOperatorOperatorTypeTaskOperator, + "REST_OPERATOR": RuntimeOperatorOperatorTypeRestOperator, + "START_OPERATOR": RuntimeOperatorOperatorTypeStartOperator, + "END_OPERATOR": RuntimeOperatorOperatorTypeEndOperator, + "EXPRESSION_OPERATOR": RuntimeOperatorOperatorTypeExpressionOperator, + "MERGE_OPERATOR": RuntimeOperatorOperatorTypeMergeOperator, + "DECISION_OPERATOR": RuntimeOperatorOperatorTypeDecisionOperator, + "LOOP_OPERATOR": RuntimeOperatorOperatorTypeLoopOperator, + "ACTUAL_END_OPERATOR": RuntimeOperatorOperatorTypeActualEndOperator, +} + +var mappingRuntimeOperatorOperatorTypeEnumLowerCase = map[string]RuntimeOperatorOperatorTypeEnum{ + "bash_operator": RuntimeOperatorOperatorTypeBashOperator, + "task_operator": RuntimeOperatorOperatorTypeTaskOperator, + "rest_operator": RuntimeOperatorOperatorTypeRestOperator, + "start_operator": RuntimeOperatorOperatorTypeStartOperator, + "end_operator": RuntimeOperatorOperatorTypeEndOperator, + "expression_operator": RuntimeOperatorOperatorTypeExpressionOperator, + "merge_operator": RuntimeOperatorOperatorTypeMergeOperator, + "decision_operator": RuntimeOperatorOperatorTypeDecisionOperator, + "loop_operator": RuntimeOperatorOperatorTypeLoopOperator, + "actual_end_operator": RuntimeOperatorOperatorTypeActualEndOperator, +} + +// GetRuntimeOperatorOperatorTypeEnumValues Enumerates the set of values for RuntimeOperatorOperatorTypeEnum +func GetRuntimeOperatorOperatorTypeEnumValues() []RuntimeOperatorOperatorTypeEnum { + values := make([]RuntimeOperatorOperatorTypeEnum, 0) + for _, v := range mappingRuntimeOperatorOperatorTypeEnum { + values = append(values, v) + } + return values +} + +// GetRuntimeOperatorOperatorTypeEnumStringValues Enumerates the set of values in String for RuntimeOperatorOperatorTypeEnum +func GetRuntimeOperatorOperatorTypeEnumStringValues() []string { + return []string{ + "BASH_OPERATOR", + "TASK_OPERATOR", + "REST_OPERATOR", + "START_OPERATOR", + "END_OPERATOR", + "EXPRESSION_OPERATOR", + "MERGE_OPERATOR", + "DECISION_OPERATOR", + "LOOP_OPERATOR", + "ACTUAL_END_OPERATOR", + } +} + +// GetMappingRuntimeOperatorOperatorTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRuntimeOperatorOperatorTypeEnum(val string) (RuntimeOperatorOperatorTypeEnum, bool) { + enum, ok := mappingRuntimeOperatorOperatorTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/runtime_operator_summary.go b/dataintegration/runtime_operator_summary.go index 8df631e4f6..139b74cd79 100644 --- a/dataintegration/runtime_operator_summary.go +++ b/dataintegration/runtime_operator_summary.go @@ -10,6 +10,7 @@ package dataintegration import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -18,6 +19,9 @@ import ( // RuntimeOperatorSummary The information about RuntimeOperator. type RuntimeOperatorSummary struct { + // The RuntimeOperator key. + Key *string `mandatory:"false" json:"key"` + // The TaskRun key. TaskRunKey *string `mandatory:"false" json:"taskRunKey"` @@ -30,18 +34,50 @@ type RuntimeOperatorSummary struct { // status Status RuntimeOperatorSummaryStatusEnum `mandatory:"false" json:"status,omitempty"` + // The type of the object. + ModelType *string `mandatory:"false" json:"modelType"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"false" json:"objectVersion"` + + // Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + // status ExecutionState RuntimeOperatorSummaryExecutionStateEnum `mandatory:"false" json:"executionState,omitempty"` // A list of parameters for the pipeline, this allows certain aspects of the pipeline to be configured when the pipeline is executed. Parameters []Parameter `mandatory:"false" json:"parameters"` + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + Metadata *ObjectMetadata `mandatory:"false" json:"metadata"` + + Operator Operator `mandatory:"false" json:"operator"` + // The configuration provider bindings. Inputs map[string]ParameterValue `mandatory:"false" json:"inputs"` // The configuration provider bindings. Outputs map[string]ParameterValue `mandatory:"false" json:"outputs"` + // The type of task run. + TaskType RuntimeOperatorSummaryTaskTypeEnum `mandatory:"false" json:"taskType,omitempty"` + + ConfigProvider *ConfigProvider `mandatory:"false" json:"configProvider"` + + // The type of Runtime Operator + OperatorType RuntimeOperatorSummaryOperatorTypeEnum `mandatory:"false" json:"operatorType,omitempty"` + // A map metrics for the task run. Metrics map[string]float32 `mandatory:"false" json:"metrics"` } @@ -62,12 +98,108 @@ func (m RuntimeOperatorSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingRuntimeOperatorSummaryExecutionStateEnum(string(m.ExecutionState)); !ok && m.ExecutionState != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExecutionState: %s. Supported values are: %s.", m.ExecutionState, strings.Join(GetRuntimeOperatorSummaryExecutionStateEnumStringValues(), ","))) } + if _, ok := GetMappingRuntimeOperatorSummaryTaskTypeEnum(string(m.TaskType)); !ok && m.TaskType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TaskType: %s. Supported values are: %s.", m.TaskType, strings.Join(GetRuntimeOperatorSummaryTaskTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRuntimeOperatorSummaryOperatorTypeEnum(string(m.OperatorType)); !ok && m.OperatorType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperatorType: %s. Supported values are: %s.", m.OperatorType, strings.Join(GetRuntimeOperatorSummaryOperatorTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } return false, nil } +// UnmarshalJSON unmarshals from json +func (m *RuntimeOperatorSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + Key *string `json:"key"` + TaskRunKey *string `json:"taskRunKey"` + StartTimeInMillis *int64 `json:"startTimeInMillis"` + EndTimeInMillis *int64 `json:"endTimeInMillis"` + Status RuntimeOperatorSummaryStatusEnum `json:"status"` + ModelType *string `json:"modelType"` + ModelVersion *string `json:"modelVersion"` + ParentRef *ParentReference `json:"parentRef"` + Name *string `json:"name"` + ObjectVersion *int `json:"objectVersion"` + Identifier *string `json:"identifier"` + ExecutionState RuntimeOperatorSummaryExecutionStateEnum `json:"executionState"` + Parameters []Parameter `json:"parameters"` + ObjectStatus *int `json:"objectStatus"` + Metadata *ObjectMetadata `json:"metadata"` + Operator operator `json:"operator"` + Inputs map[string]ParameterValue `json:"inputs"` + Outputs map[string]ParameterValue `json:"outputs"` + TaskType RuntimeOperatorSummaryTaskTypeEnum `json:"taskType"` + ConfigProvider *ConfigProvider `json:"configProvider"` + OperatorType RuntimeOperatorSummaryOperatorTypeEnum `json:"operatorType"` + Metrics map[string]float32 `json:"metrics"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Key = model.Key + + m.TaskRunKey = model.TaskRunKey + + m.StartTimeInMillis = model.StartTimeInMillis + + m.EndTimeInMillis = model.EndTimeInMillis + + m.Status = model.Status + + m.ModelType = model.ModelType + + m.ModelVersion = model.ModelVersion + + m.ParentRef = model.ParentRef + + m.Name = model.Name + + m.ObjectVersion = model.ObjectVersion + + m.Identifier = model.Identifier + + m.ExecutionState = model.ExecutionState + + m.Parameters = make([]Parameter, len(model.Parameters)) + for i, n := range model.Parameters { + m.Parameters[i] = n + } + + m.ObjectStatus = model.ObjectStatus + + m.Metadata = model.Metadata + + nn, e = model.Operator.UnmarshalPolymorphicJSON(model.Operator.JsonData) + if e != nil { + return + } + if nn != nil { + m.Operator = nn.(Operator) + } else { + m.Operator = nil + } + + m.Inputs = model.Inputs + + m.Outputs = model.Outputs + + m.TaskType = model.TaskType + + m.ConfigProvider = model.ConfigProvider + + m.OperatorType = model.OperatorType + + m.Metrics = model.Metrics + + return +} + // RuntimeOperatorSummaryStatusEnum Enum with underlying type: string type RuntimeOperatorSummaryStatusEnum string @@ -142,6 +274,7 @@ const ( RuntimeOperatorSummaryExecutionStateError RuntimeOperatorSummaryExecutionStateEnum = "ERROR" RuntimeOperatorSummaryExecutionStateSkipped RuntimeOperatorSummaryExecutionStateEnum = "SKIPPED" RuntimeOperatorSummaryExecutionStateUnknown RuntimeOperatorSummaryExecutionStateEnum = "UNKNOWN" + RuntimeOperatorSummaryExecutionStateIgnored RuntimeOperatorSummaryExecutionStateEnum = "IGNORED" ) var mappingRuntimeOperatorSummaryExecutionStateEnum = map[string]RuntimeOperatorSummaryExecutionStateEnum{ @@ -152,6 +285,7 @@ var mappingRuntimeOperatorSummaryExecutionStateEnum = map[string]RuntimeOperator "ERROR": RuntimeOperatorSummaryExecutionStateError, "SKIPPED": RuntimeOperatorSummaryExecutionStateSkipped, "UNKNOWN": RuntimeOperatorSummaryExecutionStateUnknown, + "IGNORED": RuntimeOperatorSummaryExecutionStateIgnored, } var mappingRuntimeOperatorSummaryExecutionStateEnumLowerCase = map[string]RuntimeOperatorSummaryExecutionStateEnum{ @@ -162,6 +296,7 @@ var mappingRuntimeOperatorSummaryExecutionStateEnumLowerCase = map[string]Runtim "error": RuntimeOperatorSummaryExecutionStateError, "skipped": RuntimeOperatorSummaryExecutionStateSkipped, "unknown": RuntimeOperatorSummaryExecutionStateUnknown, + "ignored": RuntimeOperatorSummaryExecutionStateIgnored, } // GetRuntimeOperatorSummaryExecutionStateEnumValues Enumerates the set of values for RuntimeOperatorSummaryExecutionStateEnum @@ -183,6 +318,7 @@ func GetRuntimeOperatorSummaryExecutionStateEnumStringValues() []string { "ERROR", "SKIPPED", "UNKNOWN", + "IGNORED", } } @@ -191,3 +327,135 @@ func GetMappingRuntimeOperatorSummaryExecutionStateEnum(val string) (RuntimeOper enum, ok := mappingRuntimeOperatorSummaryExecutionStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// RuntimeOperatorSummaryTaskTypeEnum Enum with underlying type: string +type RuntimeOperatorSummaryTaskTypeEnum string + +// Set of constants representing the allowable values for RuntimeOperatorSummaryTaskTypeEnum +const ( + RuntimeOperatorSummaryTaskTypeIntegrationTask RuntimeOperatorSummaryTaskTypeEnum = "INTEGRATION_TASK" + RuntimeOperatorSummaryTaskTypeDataLoaderTask RuntimeOperatorSummaryTaskTypeEnum = "DATA_LOADER_TASK" + RuntimeOperatorSummaryTaskTypePipelineTask RuntimeOperatorSummaryTaskTypeEnum = "PIPELINE_TASK" + RuntimeOperatorSummaryTaskTypeSqlTask RuntimeOperatorSummaryTaskTypeEnum = "SQL_TASK" + RuntimeOperatorSummaryTaskTypeOciDataflowTask RuntimeOperatorSummaryTaskTypeEnum = "OCI_DATAFLOW_TASK" + RuntimeOperatorSummaryTaskTypeRestTask RuntimeOperatorSummaryTaskTypeEnum = "REST_TASK" +) + +var mappingRuntimeOperatorSummaryTaskTypeEnum = map[string]RuntimeOperatorSummaryTaskTypeEnum{ + "INTEGRATION_TASK": RuntimeOperatorSummaryTaskTypeIntegrationTask, + "DATA_LOADER_TASK": RuntimeOperatorSummaryTaskTypeDataLoaderTask, + "PIPELINE_TASK": RuntimeOperatorSummaryTaskTypePipelineTask, + "SQL_TASK": RuntimeOperatorSummaryTaskTypeSqlTask, + "OCI_DATAFLOW_TASK": RuntimeOperatorSummaryTaskTypeOciDataflowTask, + "REST_TASK": RuntimeOperatorSummaryTaskTypeRestTask, +} + +var mappingRuntimeOperatorSummaryTaskTypeEnumLowerCase = map[string]RuntimeOperatorSummaryTaskTypeEnum{ + "integration_task": RuntimeOperatorSummaryTaskTypeIntegrationTask, + "data_loader_task": RuntimeOperatorSummaryTaskTypeDataLoaderTask, + "pipeline_task": RuntimeOperatorSummaryTaskTypePipelineTask, + "sql_task": RuntimeOperatorSummaryTaskTypeSqlTask, + "oci_dataflow_task": RuntimeOperatorSummaryTaskTypeOciDataflowTask, + "rest_task": RuntimeOperatorSummaryTaskTypeRestTask, +} + +// GetRuntimeOperatorSummaryTaskTypeEnumValues Enumerates the set of values for RuntimeOperatorSummaryTaskTypeEnum +func GetRuntimeOperatorSummaryTaskTypeEnumValues() []RuntimeOperatorSummaryTaskTypeEnum { + values := make([]RuntimeOperatorSummaryTaskTypeEnum, 0) + for _, v := range mappingRuntimeOperatorSummaryTaskTypeEnum { + values = append(values, v) + } + return values +} + +// GetRuntimeOperatorSummaryTaskTypeEnumStringValues Enumerates the set of values in String for RuntimeOperatorSummaryTaskTypeEnum +func GetRuntimeOperatorSummaryTaskTypeEnumStringValues() []string { + return []string{ + "INTEGRATION_TASK", + "DATA_LOADER_TASK", + "PIPELINE_TASK", + "SQL_TASK", + "OCI_DATAFLOW_TASK", + "REST_TASK", + } +} + +// GetMappingRuntimeOperatorSummaryTaskTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRuntimeOperatorSummaryTaskTypeEnum(val string) (RuntimeOperatorSummaryTaskTypeEnum, bool) { + enum, ok := mappingRuntimeOperatorSummaryTaskTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// RuntimeOperatorSummaryOperatorTypeEnum Enum with underlying type: string +type RuntimeOperatorSummaryOperatorTypeEnum string + +// Set of constants representing the allowable values for RuntimeOperatorSummaryOperatorTypeEnum +const ( + RuntimeOperatorSummaryOperatorTypeBashOperator RuntimeOperatorSummaryOperatorTypeEnum = "BASH_OPERATOR" + RuntimeOperatorSummaryOperatorTypeTaskOperator RuntimeOperatorSummaryOperatorTypeEnum = "TASK_OPERATOR" + RuntimeOperatorSummaryOperatorTypeRestOperator RuntimeOperatorSummaryOperatorTypeEnum = "REST_OPERATOR" + RuntimeOperatorSummaryOperatorTypeStartOperator RuntimeOperatorSummaryOperatorTypeEnum = "START_OPERATOR" + RuntimeOperatorSummaryOperatorTypeEndOperator RuntimeOperatorSummaryOperatorTypeEnum = "END_OPERATOR" + RuntimeOperatorSummaryOperatorTypeExpressionOperator RuntimeOperatorSummaryOperatorTypeEnum = "EXPRESSION_OPERATOR" + RuntimeOperatorSummaryOperatorTypeMergeOperator RuntimeOperatorSummaryOperatorTypeEnum = "MERGE_OPERATOR" + RuntimeOperatorSummaryOperatorTypeDecisionOperator RuntimeOperatorSummaryOperatorTypeEnum = "DECISION_OPERATOR" + RuntimeOperatorSummaryOperatorTypeLoopOperator RuntimeOperatorSummaryOperatorTypeEnum = "LOOP_OPERATOR" + RuntimeOperatorSummaryOperatorTypeActualEndOperator RuntimeOperatorSummaryOperatorTypeEnum = "ACTUAL_END_OPERATOR" +) + +var mappingRuntimeOperatorSummaryOperatorTypeEnum = map[string]RuntimeOperatorSummaryOperatorTypeEnum{ + "BASH_OPERATOR": RuntimeOperatorSummaryOperatorTypeBashOperator, + "TASK_OPERATOR": RuntimeOperatorSummaryOperatorTypeTaskOperator, + "REST_OPERATOR": RuntimeOperatorSummaryOperatorTypeRestOperator, + "START_OPERATOR": RuntimeOperatorSummaryOperatorTypeStartOperator, + "END_OPERATOR": RuntimeOperatorSummaryOperatorTypeEndOperator, + "EXPRESSION_OPERATOR": RuntimeOperatorSummaryOperatorTypeExpressionOperator, + "MERGE_OPERATOR": RuntimeOperatorSummaryOperatorTypeMergeOperator, + "DECISION_OPERATOR": RuntimeOperatorSummaryOperatorTypeDecisionOperator, + "LOOP_OPERATOR": RuntimeOperatorSummaryOperatorTypeLoopOperator, + "ACTUAL_END_OPERATOR": RuntimeOperatorSummaryOperatorTypeActualEndOperator, +} + +var mappingRuntimeOperatorSummaryOperatorTypeEnumLowerCase = map[string]RuntimeOperatorSummaryOperatorTypeEnum{ + "bash_operator": RuntimeOperatorSummaryOperatorTypeBashOperator, + "task_operator": RuntimeOperatorSummaryOperatorTypeTaskOperator, + "rest_operator": RuntimeOperatorSummaryOperatorTypeRestOperator, + "start_operator": RuntimeOperatorSummaryOperatorTypeStartOperator, + "end_operator": RuntimeOperatorSummaryOperatorTypeEndOperator, + "expression_operator": RuntimeOperatorSummaryOperatorTypeExpressionOperator, + "merge_operator": RuntimeOperatorSummaryOperatorTypeMergeOperator, + "decision_operator": RuntimeOperatorSummaryOperatorTypeDecisionOperator, + "loop_operator": RuntimeOperatorSummaryOperatorTypeLoopOperator, + "actual_end_operator": RuntimeOperatorSummaryOperatorTypeActualEndOperator, +} + +// GetRuntimeOperatorSummaryOperatorTypeEnumValues Enumerates the set of values for RuntimeOperatorSummaryOperatorTypeEnum +func GetRuntimeOperatorSummaryOperatorTypeEnumValues() []RuntimeOperatorSummaryOperatorTypeEnum { + values := make([]RuntimeOperatorSummaryOperatorTypeEnum, 0) + for _, v := range mappingRuntimeOperatorSummaryOperatorTypeEnum { + values = append(values, v) + } + return values +} + +// GetRuntimeOperatorSummaryOperatorTypeEnumStringValues Enumerates the set of values in String for RuntimeOperatorSummaryOperatorTypeEnum +func GetRuntimeOperatorSummaryOperatorTypeEnumStringValues() []string { + return []string{ + "BASH_OPERATOR", + "TASK_OPERATOR", + "REST_OPERATOR", + "START_OPERATOR", + "END_OPERATOR", + "EXPRESSION_OPERATOR", + "MERGE_OPERATOR", + "DECISION_OPERATOR", + "LOOP_OPERATOR", + "ACTUAL_END_OPERATOR", + } +} + +// GetMappingRuntimeOperatorSummaryOperatorTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRuntimeOperatorSummaryOperatorTypeEnum(val string) (RuntimeOperatorSummaryOperatorTypeEnum, bool) { + enum, ok := mappingRuntimeOperatorSummaryOperatorTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/state.go b/dataintegration/state.go new file mode 100644 index 0000000000..bef89925e2 --- /dev/null +++ b/dataintegration/state.go @@ -0,0 +1,44 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// State State stored in All States Map of Composite State +type State struct { + + // A simple name for the State. + Name *string `mandatory:"false" json:"name"` + + ParameterValue *ParameterValue `mandatory:"false" json:"parameterValue"` + + // To store a date value for the State we use dateValue attribute. + TimeValue *common.SDKTime `mandatory:"false" json:"timeValue"` +} + +func (m State) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m State) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/dataintegration/update_connection_details.go b/dataintegration/update_connection_details.go index 3fa8078275..a376ed1555 100644 --- a/dataintegration/update_connection_details.go +++ b/dataintegration/update_connection_details.go @@ -102,8 +102,8 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa mm := UpdateConnectionFromLake{} err = json.Unmarshal(data, &mm) return mm, err - case "GENERIC_JDBC_CONNECTION": - mm := UpdateConnectionFromJdbc{} + case "ORACLE_EBS_CONNECTION": + mm := UpdateConnectionFromOracleEbs{} err = json.Unmarshal(data, &mm) return mm, err case "ORACLE_OBJECT_STORAGE_CONNECTION": @@ -118,24 +118,20 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa mm := UpdateConnectionFromRestNoAuth{} err = json.Unmarshal(data, &mm) return mm, err - case "AMAZON_S3_CONNECTION": - mm := UpdateConnectionFromAmazonS3{} - err = json.Unmarshal(data, &mm) - return mm, err - case "ORACLE_ATP_CONNECTION": - mm := UpdateConnectionFromAtp{} + case "HDFS_CONNECTION": + mm := UpdateConnectionFromHdfs{} err = json.Unmarshal(data, &mm) return mm, err case "REST_BASIC_AUTH_CONNECTION": mm := UpdateConnectionFromRestBasicAuth{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLEDB_CONNECTION": - mm := UpdateConnectionFromOracle{} + case "ORACLE_SIEBEL_CONNECTION": + mm := UpdateConnectionFromOracleSiebel{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLE_ADWC_CONNECTION": - mm := UpdateConnectionFromAdwc{} + case "MYSQL_HEATWAVE_CONNECTION": + mm := UpdateConnectionFromMySqlHeatWave{} err = json.Unmarshal(data, &mm) return mm, err case "BIP_CONNECTION": @@ -146,6 +142,30 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa mm := UpdateConnectionFromMySql{} err = json.Unmarshal(data, &mm) return mm, err + case "GENERIC_JDBC_CONNECTION": + mm := UpdateConnectionFromJdbc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMAZON_S3_CONNECTION": + mm := UpdateConnectionFromAmazonS3{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_ATP_CONNECTION": + mm := UpdateConnectionFromAtp{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLEDB_CONNECTION": + mm := UpdateConnectionFromOracle{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_ADWC_CONNECTION": + mm := UpdateConnectionFromAdwc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_PEOPLESOFT_CONNECTION": + mm := UpdateConnectionFromOraclePeopleSoft{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for UpdateConnectionDetails: %s.", m.ModelType) return *m, nil @@ -233,6 +253,11 @@ const ( UpdateConnectionDetailsModelTypeAmazonS3Connection UpdateConnectionDetailsModelTypeEnum = "AMAZON_S3_CONNECTION" UpdateConnectionDetailsModelTypeBipConnection UpdateConnectionDetailsModelTypeEnum = "BIP_CONNECTION" UpdateConnectionDetailsModelTypeLakeConnection UpdateConnectionDetailsModelTypeEnum = "LAKE_CONNECTION" + UpdateConnectionDetailsModelTypeOraclePeoplesoftConnection UpdateConnectionDetailsModelTypeEnum = "ORACLE_PEOPLESOFT_CONNECTION" + UpdateConnectionDetailsModelTypeOracleEbsConnection UpdateConnectionDetailsModelTypeEnum = "ORACLE_EBS_CONNECTION" + UpdateConnectionDetailsModelTypeOracleSiebelConnection UpdateConnectionDetailsModelTypeEnum = "ORACLE_SIEBEL_CONNECTION" + UpdateConnectionDetailsModelTypeHdfsConnection UpdateConnectionDetailsModelTypeEnum = "HDFS_CONNECTION" + UpdateConnectionDetailsModelTypeMysqlHeatwaveConnection UpdateConnectionDetailsModelTypeEnum = "MYSQL_HEATWAVE_CONNECTION" UpdateConnectionDetailsModelTypeRestNoAuthConnection UpdateConnectionDetailsModelTypeEnum = "REST_NO_AUTH_CONNECTION" UpdateConnectionDetailsModelTypeRestBasicAuthConnection UpdateConnectionDetailsModelTypeEnum = "REST_BASIC_AUTH_CONNECTION" ) @@ -248,6 +273,11 @@ var mappingUpdateConnectionDetailsModelTypeEnum = map[string]UpdateConnectionDet "AMAZON_S3_CONNECTION": UpdateConnectionDetailsModelTypeAmazonS3Connection, "BIP_CONNECTION": UpdateConnectionDetailsModelTypeBipConnection, "LAKE_CONNECTION": UpdateConnectionDetailsModelTypeLakeConnection, + "ORACLE_PEOPLESOFT_CONNECTION": UpdateConnectionDetailsModelTypeOraclePeoplesoftConnection, + "ORACLE_EBS_CONNECTION": UpdateConnectionDetailsModelTypeOracleEbsConnection, + "ORACLE_SIEBEL_CONNECTION": UpdateConnectionDetailsModelTypeOracleSiebelConnection, + "HDFS_CONNECTION": UpdateConnectionDetailsModelTypeHdfsConnection, + "MYSQL_HEATWAVE_CONNECTION": UpdateConnectionDetailsModelTypeMysqlHeatwaveConnection, "REST_NO_AUTH_CONNECTION": UpdateConnectionDetailsModelTypeRestNoAuthConnection, "REST_BASIC_AUTH_CONNECTION": UpdateConnectionDetailsModelTypeRestBasicAuthConnection, } @@ -263,6 +293,11 @@ var mappingUpdateConnectionDetailsModelTypeEnumLowerCase = map[string]UpdateConn "amazon_s3_connection": UpdateConnectionDetailsModelTypeAmazonS3Connection, "bip_connection": UpdateConnectionDetailsModelTypeBipConnection, "lake_connection": UpdateConnectionDetailsModelTypeLakeConnection, + "oracle_peoplesoft_connection": UpdateConnectionDetailsModelTypeOraclePeoplesoftConnection, + "oracle_ebs_connection": UpdateConnectionDetailsModelTypeOracleEbsConnection, + "oracle_siebel_connection": UpdateConnectionDetailsModelTypeOracleSiebelConnection, + "hdfs_connection": UpdateConnectionDetailsModelTypeHdfsConnection, + "mysql_heatwave_connection": UpdateConnectionDetailsModelTypeMysqlHeatwaveConnection, "rest_no_auth_connection": UpdateConnectionDetailsModelTypeRestNoAuthConnection, "rest_basic_auth_connection": UpdateConnectionDetailsModelTypeRestBasicAuthConnection, } @@ -289,6 +324,11 @@ func GetUpdateConnectionDetailsModelTypeEnumStringValues() []string { "AMAZON_S3_CONNECTION", "BIP_CONNECTION", "LAKE_CONNECTION", + "ORACLE_PEOPLESOFT_CONNECTION", + "ORACLE_EBS_CONNECTION", + "ORACLE_SIEBEL_CONNECTION", + "HDFS_CONNECTION", + "MYSQL_HEATWAVE_CONNECTION", "REST_NO_AUTH_CONNECTION", "REST_BASIC_AUTH_CONNECTION", } diff --git a/dataintegration/update_connection_from_hdfs.go b/dataintegration/update_connection_from_hdfs.go new file mode 100644 index 0000000000..b490ce20c9 --- /dev/null +++ b/dataintegration/update_connection_from_hdfs.go @@ -0,0 +1,146 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateConnectionFromHdfs The details to update the HDFS data asset connection. +type UpdateConnectionFromHdfs struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The HDFS principal. + HdfsPrincipal *string `mandatory:"true" json:"hdfsPrincipal"` + + // The HDFS Data Node principal. + DataNodePrincipal *string `mandatory:"true" json:"dataNodePrincipal"` + + // The HDFS Name Node principal. + NameNodePrincipal *string `mandatory:"true" json:"nameNodePrincipal"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // HDFS Realm name. + Realm *string `mandatory:"false" json:"realm"` + + // The HDFS Key Distribution Center. + KeyDistributionCenter *string `mandatory:"false" json:"keyDistributionCenter"` + + KeyTabContent *SensitiveAttribute `mandatory:"false" json:"keyTabContent"` +} + +//GetKey returns Key +func (m UpdateConnectionFromHdfs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateConnectionFromHdfs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m UpdateConnectionFromHdfs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m UpdateConnectionFromHdfs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateConnectionFromHdfs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateConnectionFromHdfs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateConnectionFromHdfs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateConnectionFromHdfs) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m UpdateConnectionFromHdfs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateConnectionFromHdfs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateConnectionFromHdfs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateConnectionFromHdfs) 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 UpdateConnectionFromHdfs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateConnectionFromHdfs UpdateConnectionFromHdfs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateConnectionFromHdfs + }{ + "HDFS_CONNECTION", + (MarshalTypeUpdateConnectionFromHdfs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_connection_from_my_sql_heat_wave.go b/dataintegration/update_connection_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..d435e078d3 --- /dev/null +++ b/dataintegration/update_connection_from_my_sql_heat_wave.go @@ -0,0 +1,137 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateConnectionFromMySqlHeatWave The details to update a MYSQL HeatWave data asset connection. +type UpdateConnectionFromMySqlHeatWave struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m UpdateConnectionFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateConnectionFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m UpdateConnectionFromMySqlHeatWave) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m UpdateConnectionFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateConnectionFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateConnectionFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateConnectionFromMySqlHeatWave) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateConnectionFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m UpdateConnectionFromMySqlHeatWave) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateConnectionFromMySqlHeatWave) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateConnectionFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateConnectionFromMySqlHeatWave) 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 UpdateConnectionFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateConnectionFromMySqlHeatWave UpdateConnectionFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateConnectionFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_CONNECTION", + (MarshalTypeUpdateConnectionFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_connection_from_oracle_ebs.go b/dataintegration/update_connection_from_oracle_ebs.go new file mode 100644 index 0000000000..2d3ae31530 --- /dev/null +++ b/dataintegration/update_connection_from_oracle_ebs.go @@ -0,0 +1,137 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateConnectionFromOracleEbs The details to update E-Business Suite data asset connection. +type UpdateConnectionFromOracleEbs struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m UpdateConnectionFromOracleEbs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateConnectionFromOracleEbs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m UpdateConnectionFromOracleEbs) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m UpdateConnectionFromOracleEbs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateConnectionFromOracleEbs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateConnectionFromOracleEbs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateConnectionFromOracleEbs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateConnectionFromOracleEbs) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m UpdateConnectionFromOracleEbs) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateConnectionFromOracleEbs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateConnectionFromOracleEbs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateConnectionFromOracleEbs) 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 UpdateConnectionFromOracleEbs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateConnectionFromOracleEbs UpdateConnectionFromOracleEbs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateConnectionFromOracleEbs + }{ + "ORACLE_EBS_CONNECTION", + (MarshalTypeUpdateConnectionFromOracleEbs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_connection_from_oracle_people_soft.go b/dataintegration/update_connection_from_oracle_people_soft.go new file mode 100644 index 0000000000..f9fe31bdc3 --- /dev/null +++ b/dataintegration/update_connection_from_oracle_people_soft.go @@ -0,0 +1,137 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateConnectionFromOraclePeopleSoft The details to update an Oracle PeopleSoft data asset connection. +type UpdateConnectionFromOraclePeopleSoft struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m UpdateConnectionFromOraclePeopleSoft) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateConnectionFromOraclePeopleSoft) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m UpdateConnectionFromOraclePeopleSoft) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m UpdateConnectionFromOraclePeopleSoft) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateConnectionFromOraclePeopleSoft) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateConnectionFromOraclePeopleSoft) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateConnectionFromOraclePeopleSoft) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateConnectionFromOraclePeopleSoft) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m UpdateConnectionFromOraclePeopleSoft) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateConnectionFromOraclePeopleSoft) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateConnectionFromOraclePeopleSoft) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateConnectionFromOraclePeopleSoft) 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 UpdateConnectionFromOraclePeopleSoft) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateConnectionFromOraclePeopleSoft UpdateConnectionFromOraclePeopleSoft + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateConnectionFromOraclePeopleSoft + }{ + "ORACLE_PEOPLESOFT_CONNECTION", + (MarshalTypeUpdateConnectionFromOraclePeopleSoft)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_connection_from_oracle_siebel.go b/dataintegration/update_connection_from_oracle_siebel.go new file mode 100644 index 0000000000..4bae74d0bb --- /dev/null +++ b/dataintegration/update_connection_from_oracle_siebel.go @@ -0,0 +1,137 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateConnectionFromOracleSiebel The details to update an Oracle Siebel data asset connection. +type UpdateConnectionFromOracleSiebel struct { + + // Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The user name for the connection. + Username *string `mandatory:"true" json:"username"` + + // The password for the connection. + Password *string `mandatory:"true" json:"password"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + ParentRef *ParentReference `mandatory:"false" json:"parentRef"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // User-defined description for the connection. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The properties for the connection. + ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + PasswordSecret *SensitiveAttribute `mandatory:"false" json:"passwordSecret"` +} + +//GetKey returns Key +func (m UpdateConnectionFromOracleSiebel) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateConnectionFromOracleSiebel) GetModelVersion() *string { + return m.ModelVersion +} + +//GetParentRef returns ParentRef +func (m UpdateConnectionFromOracleSiebel) GetParentRef() *ParentReference { + return m.ParentRef +} + +//GetName returns Name +func (m UpdateConnectionFromOracleSiebel) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateConnectionFromOracleSiebel) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateConnectionFromOracleSiebel) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateConnectionFromOracleSiebel) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateConnectionFromOracleSiebel) GetIdentifier() *string { + return m.Identifier +} + +//GetConnectionProperties returns ConnectionProperties +func (m UpdateConnectionFromOracleSiebel) GetConnectionProperties() []ConnectionProperty { + return m.ConnectionProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateConnectionFromOracleSiebel) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateConnectionFromOracleSiebel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateConnectionFromOracleSiebel) 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 UpdateConnectionFromOracleSiebel) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateConnectionFromOracleSiebel UpdateConnectionFromOracleSiebel + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateConnectionFromOracleSiebel + }{ + "ORACLE_SIEBEL_CONNECTION", + (MarshalTypeUpdateConnectionFromOracleSiebel)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_data_asset_details.go b/dataintegration/update_data_asset_details.go index f6c5c08130..9cdce4327b 100644 --- a/dataintegration/update_data_asset_details.go +++ b/dataintegration/update_data_asset_details.go @@ -103,16 +103,24 @@ func (m *updatedataassetdetails) UnmarshalPolymorphicJSON(data []byte) (interfac mm := UpdateDataAssetFromRest{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLE_ATP_DATA_ASSET": - mm := UpdateDataAssetFromAtp{} + case "MYSQL_HEATWAVE_DATA_ASSET": + mm := UpdateDataAssetFromMySqlHeatWave{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_EBS_DATA_ASSET": + mm := UpdateDataAssetFromOracleEbs{} err = json.Unmarshal(data, &mm) return mm, err case "ORACLE_ADWC_DATA_ASSET": mm := UpdateDataAssetFromAdwc{} err = json.Unmarshal(data, &mm) return mm, err - case "GENERIC_JDBC_DATA_ASSET": - mm := UpdateDataAssetFromJdbc{} + case "HDFS_DATA_ASSET": + mm := UpdateDataAssetFromHdfs{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_PEOPLESOFT_DATA_ASSET": + mm := UpdateDataAssetFromOraclePeopleSoft{} err = json.Unmarshal(data, &mm) return mm, err case "ORACLE_OBJECT_STORAGE_DATA_ASSET": @@ -123,22 +131,34 @@ func (m *updatedataassetdetails) UnmarshalPolymorphicJSON(data []byte) (interfac mm := UpdateDataAssetFromAmazonS3{} err = json.Unmarshal(data, &mm) return mm, err - case "FUSION_APP_DATA_ASSET": - mm := UpdateDataAssetFromFusionApp{} - err = json.Unmarshal(data, &mm) - return mm, err case "MYSQL_DATA_ASSET": mm := UpdateDataAssetFromMySql{} err = json.Unmarshal(data, &mm) return mm, err - case "ORACLE_DATA_ASSET": - mm := UpdateDataAssetFromOracle{} + case "ORACLE_SIEBEL_DATA_ASSET": + mm := UpdateDataAssetFromOracleSiebel{} err = json.Unmarshal(data, &mm) return mm, err case "LAKE_DATA_ASSET": mm := UpdateDataAssetFromLake{} err = json.Unmarshal(data, &mm) return mm, err + case "ORACLE_ATP_DATA_ASSET": + mm := UpdateDataAssetFromAtp{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC_JDBC_DATA_ASSET": + mm := UpdateDataAssetFromJdbc{} + err = json.Unmarshal(data, &mm) + return mm, err + case "FUSION_APP_DATA_ASSET": + mm := UpdateDataAssetFromFusionApp{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_DATA_ASSET": + mm := UpdateDataAssetFromOracle{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for UpdateDataAssetDetails: %s.", m.ModelType) return *m, nil @@ -225,6 +245,11 @@ const ( UpdateDataAssetDetailsModelTypeFusionAppDataAsset UpdateDataAssetDetailsModelTypeEnum = "FUSION_APP_DATA_ASSET" UpdateDataAssetDetailsModelTypeAmazonS3DataAsset UpdateDataAssetDetailsModelTypeEnum = "AMAZON_S3_DATA_ASSET" UpdateDataAssetDetailsModelTypeLakeDataAsset UpdateDataAssetDetailsModelTypeEnum = "LAKE_DATA_ASSET" + UpdateDataAssetDetailsModelTypeOraclePeoplesoftDataAsset UpdateDataAssetDetailsModelTypeEnum = "ORACLE_PEOPLESOFT_DATA_ASSET" + UpdateDataAssetDetailsModelTypeOracleSiebelDataAsset UpdateDataAssetDetailsModelTypeEnum = "ORACLE_SIEBEL_DATA_ASSET" + UpdateDataAssetDetailsModelTypeOracleEbsDataAsset UpdateDataAssetDetailsModelTypeEnum = "ORACLE_EBS_DATA_ASSET" + UpdateDataAssetDetailsModelTypeHdfsDataAsset UpdateDataAssetDetailsModelTypeEnum = "HDFS_DATA_ASSET" + UpdateDataAssetDetailsModelTypeMysqlHeatwaveDataAsset UpdateDataAssetDetailsModelTypeEnum = "MYSQL_HEATWAVE_DATA_ASSET" UpdateDataAssetDetailsModelTypeRestDataAsset UpdateDataAssetDetailsModelTypeEnum = "REST_DATA_ASSET" ) @@ -238,6 +263,11 @@ var mappingUpdateDataAssetDetailsModelTypeEnum = map[string]UpdateDataAssetDetai "FUSION_APP_DATA_ASSET": UpdateDataAssetDetailsModelTypeFusionAppDataAsset, "AMAZON_S3_DATA_ASSET": UpdateDataAssetDetailsModelTypeAmazonS3DataAsset, "LAKE_DATA_ASSET": UpdateDataAssetDetailsModelTypeLakeDataAsset, + "ORACLE_PEOPLESOFT_DATA_ASSET": UpdateDataAssetDetailsModelTypeOraclePeoplesoftDataAsset, + "ORACLE_SIEBEL_DATA_ASSET": UpdateDataAssetDetailsModelTypeOracleSiebelDataAsset, + "ORACLE_EBS_DATA_ASSET": UpdateDataAssetDetailsModelTypeOracleEbsDataAsset, + "HDFS_DATA_ASSET": UpdateDataAssetDetailsModelTypeHdfsDataAsset, + "MYSQL_HEATWAVE_DATA_ASSET": UpdateDataAssetDetailsModelTypeMysqlHeatwaveDataAsset, "REST_DATA_ASSET": UpdateDataAssetDetailsModelTypeRestDataAsset, } @@ -251,6 +281,11 @@ var mappingUpdateDataAssetDetailsModelTypeEnumLowerCase = map[string]UpdateDataA "fusion_app_data_asset": UpdateDataAssetDetailsModelTypeFusionAppDataAsset, "amazon_s3_data_asset": UpdateDataAssetDetailsModelTypeAmazonS3DataAsset, "lake_data_asset": UpdateDataAssetDetailsModelTypeLakeDataAsset, + "oracle_peoplesoft_data_asset": UpdateDataAssetDetailsModelTypeOraclePeoplesoftDataAsset, + "oracle_siebel_data_asset": UpdateDataAssetDetailsModelTypeOracleSiebelDataAsset, + "oracle_ebs_data_asset": UpdateDataAssetDetailsModelTypeOracleEbsDataAsset, + "hdfs_data_asset": UpdateDataAssetDetailsModelTypeHdfsDataAsset, + "mysql_heatwave_data_asset": UpdateDataAssetDetailsModelTypeMysqlHeatwaveDataAsset, "rest_data_asset": UpdateDataAssetDetailsModelTypeRestDataAsset, } @@ -275,6 +310,11 @@ func GetUpdateDataAssetDetailsModelTypeEnumStringValues() []string { "FUSION_APP_DATA_ASSET", "AMAZON_S3_DATA_ASSET", "LAKE_DATA_ASSET", + "ORACLE_PEOPLESOFT_DATA_ASSET", + "ORACLE_SIEBEL_DATA_ASSET", + "ORACLE_EBS_DATA_ASSET", + "HDFS_DATA_ASSET", + "MYSQL_HEATWAVE_DATA_ASSET", "REST_DATA_ASSET", } } diff --git a/dataintegration/update_data_asset_from_hdfs.go b/dataintegration/update_data_asset_from_hdfs.go new file mode 100644 index 0000000000..2d86064b66 --- /dev/null +++ b/dataintegration/update_data_asset_from_hdfs.go @@ -0,0 +1,144 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDataAssetFromHdfs Details for the HDFS data asset type. +type UpdateDataAssetFromHdfs struct { + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The HDFS hostname. + Host *string `mandatory:"true" json:"host"` + + // The HDFS port. + Port *string `mandatory:"true" json:"port"` + + // The HDFS Protocol name. + Protocol *string `mandatory:"true" json:"protocol"` + + DefaultConnection *UpdateConnectionFromHdfs `mandatory:"true" json:"defaultConnection"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // Specifies whether certificate validation is needed + ValidateCertificate *bool `mandatory:"false" json:"validateCertificate"` +} + +//GetKey returns Key +func (m UpdateDataAssetFromHdfs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateDataAssetFromHdfs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m UpdateDataAssetFromHdfs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateDataAssetFromHdfs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateDataAssetFromHdfs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateDataAssetFromHdfs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateDataAssetFromHdfs) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m UpdateDataAssetFromHdfs) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m UpdateDataAssetFromHdfs) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateDataAssetFromHdfs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateDataAssetFromHdfs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDataAssetFromHdfs) 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 UpdateDataAssetFromHdfs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDataAssetFromHdfs UpdateDataAssetFromHdfs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateDataAssetFromHdfs + }{ + "HDFS_DATA_ASSET", + (MarshalTypeUpdateDataAssetFromHdfs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_data_asset_from_my_sql_heat_wave.go b/dataintegration/update_data_asset_from_my_sql_heat_wave.go new file mode 100644 index 0000000000..1c9cdac537 --- /dev/null +++ b/dataintegration/update_data_asset_from_my_sql_heat_wave.go @@ -0,0 +1,141 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDataAssetFromMySqlHeatWave Details for the MYSQL HeatWave data asset type. +type UpdateDataAssetFromMySqlHeatWave struct { + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The MySql HeatWave host name. + Host *string `mandatory:"true" json:"host"` + + // The MySql HeatWave port number. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *UpdateConnectionFromMySqlHeatWave `mandatory:"true" json:"defaultConnection"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The MySql HeatWave service name for the database. + ServiceName *string `mandatory:"false" json:"serviceName"` +} + +//GetKey returns Key +func (m UpdateDataAssetFromMySqlHeatWave) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateDataAssetFromMySqlHeatWave) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m UpdateDataAssetFromMySqlHeatWave) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateDataAssetFromMySqlHeatWave) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateDataAssetFromMySqlHeatWave) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateDataAssetFromMySqlHeatWave) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateDataAssetFromMySqlHeatWave) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m UpdateDataAssetFromMySqlHeatWave) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m UpdateDataAssetFromMySqlHeatWave) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateDataAssetFromMySqlHeatWave) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateDataAssetFromMySqlHeatWave) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDataAssetFromMySqlHeatWave) 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 UpdateDataAssetFromMySqlHeatWave) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDataAssetFromMySqlHeatWave UpdateDataAssetFromMySqlHeatWave + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateDataAssetFromMySqlHeatWave + }{ + "MYSQL_HEATWAVE_DATA_ASSET", + (MarshalTypeUpdateDataAssetFromMySqlHeatWave)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_data_asset_from_oracle_ebs.go b/dataintegration/update_data_asset_from_oracle_ebs.go new file mode 100644 index 0000000000..b4ba2099e4 --- /dev/null +++ b/dataintegration/update_data_asset_from_oracle_ebs.go @@ -0,0 +1,151 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDataAssetFromOracleEbs Details for the E-Business Suite data asset type. +type UpdateDataAssetFromOracleEbs struct { + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The Oracle EBS hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle EBS port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *UpdateConnectionFromOracleEbs `mandatory:"true" json:"defaultConnection"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The Oracle EBS service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle EBS driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle EBS SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m UpdateDataAssetFromOracleEbs) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateDataAssetFromOracleEbs) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m UpdateDataAssetFromOracleEbs) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateDataAssetFromOracleEbs) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateDataAssetFromOracleEbs) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateDataAssetFromOracleEbs) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateDataAssetFromOracleEbs) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m UpdateDataAssetFromOracleEbs) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m UpdateDataAssetFromOracleEbs) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateDataAssetFromOracleEbs) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateDataAssetFromOracleEbs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDataAssetFromOracleEbs) 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 UpdateDataAssetFromOracleEbs) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDataAssetFromOracleEbs UpdateDataAssetFromOracleEbs + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateDataAssetFromOracleEbs + }{ + "ORACLE_EBS_DATA_ASSET", + (MarshalTypeUpdateDataAssetFromOracleEbs)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_data_asset_from_oracle_people_soft.go b/dataintegration/update_data_asset_from_oracle_people_soft.go new file mode 100644 index 0000000000..ecbf56d9c0 --- /dev/null +++ b/dataintegration/update_data_asset_from_oracle_people_soft.go @@ -0,0 +1,151 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDataAssetFromOraclePeopleSoft Details for the Oracle PeopleSoft data asset type. +type UpdateDataAssetFromOraclePeopleSoft struct { + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The Oracle PeopleSoft hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle PeopleSoft port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *UpdateConnectionFromOraclePeopleSoft `mandatory:"true" json:"defaultConnection"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The Oracle PeopleSoft service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle PeopleSoft driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle PeopleSoft SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m UpdateDataAssetFromOraclePeopleSoft) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateDataAssetFromOraclePeopleSoft) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m UpdateDataAssetFromOraclePeopleSoft) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateDataAssetFromOraclePeopleSoft) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateDataAssetFromOraclePeopleSoft) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateDataAssetFromOraclePeopleSoft) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateDataAssetFromOraclePeopleSoft) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m UpdateDataAssetFromOraclePeopleSoft) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m UpdateDataAssetFromOraclePeopleSoft) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateDataAssetFromOraclePeopleSoft) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateDataAssetFromOraclePeopleSoft) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDataAssetFromOraclePeopleSoft) 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 UpdateDataAssetFromOraclePeopleSoft) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDataAssetFromOraclePeopleSoft UpdateDataAssetFromOraclePeopleSoft + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateDataAssetFromOraclePeopleSoft + }{ + "ORACLE_PEOPLESOFT_DATA_ASSET", + (MarshalTypeUpdateDataAssetFromOraclePeopleSoft)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_data_asset_from_oracle_siebel.go b/dataintegration/update_data_asset_from_oracle_siebel.go new file mode 100644 index 0000000000..021b7ccd70 --- /dev/null +++ b/dataintegration/update_data_asset_from_oracle_siebel.go @@ -0,0 +1,151 @@ +// 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 Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDataAssetFromOracleSiebel Details for the Oracle Siebel data asset type. +type UpdateDataAssetFromOracleSiebel struct { + + // Generated key that can be used in API calls to identify data asset. + Key *string `mandatory:"true" json:"key"` + + // The version of the object that is used to track changes in the object instance. + ObjectVersion *int `mandatory:"true" json:"objectVersion"` + + // The Oracle Siebel hostname. + Host *string `mandatory:"true" json:"host"` + + // The Oracle Siebel port. + Port *string `mandatory:"true" json:"port"` + + DefaultConnection *UpdateConnectionFromOracleSiebel `mandatory:"true" json:"defaultConnection"` + + // The model version of an object. + ModelVersion *string `mandatory:"false" json:"modelVersion"` + + // Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + Name *string `mandatory:"false" json:"name"` + + // The user-defined description of the data asset. + Description *string `mandatory:"false" json:"description"` + + // The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + ObjectStatus *int `mandatory:"false" json:"objectStatus"` + + // Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + Identifier *string `mandatory:"false" json:"identifier"` + + // The external key for the object. + ExternalKey *string `mandatory:"false" json:"externalKey"` + + // Additional properties for the data asset. + AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` + + RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + + // The Oracle Siebel service name. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // The Oracle Siebel driver class. + DriverClass *string `mandatory:"false" json:"driverClass"` + + // The Oracle Siebel SID. + Sid *string `mandatory:"false" json:"sid"` + + WalletSecret *SensitiveAttribute `mandatory:"false" json:"walletSecret"` + + WalletPasswordSecret *SensitiveAttribute `mandatory:"false" json:"walletPasswordSecret"` +} + +//GetKey returns Key +func (m UpdateDataAssetFromOracleSiebel) GetKey() *string { + return m.Key +} + +//GetModelVersion returns ModelVersion +func (m UpdateDataAssetFromOracleSiebel) GetModelVersion() *string { + return m.ModelVersion +} + +//GetName returns Name +func (m UpdateDataAssetFromOracleSiebel) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m UpdateDataAssetFromOracleSiebel) GetDescription() *string { + return m.Description +} + +//GetObjectStatus returns ObjectStatus +func (m UpdateDataAssetFromOracleSiebel) GetObjectStatus() *int { + return m.ObjectStatus +} + +//GetObjectVersion returns ObjectVersion +func (m UpdateDataAssetFromOracleSiebel) GetObjectVersion() *int { + return m.ObjectVersion +} + +//GetIdentifier returns Identifier +func (m UpdateDataAssetFromOracleSiebel) GetIdentifier() *string { + return m.Identifier +} + +//GetExternalKey returns ExternalKey +func (m UpdateDataAssetFromOracleSiebel) GetExternalKey() *string { + return m.ExternalKey +} + +//GetAssetProperties returns AssetProperties +func (m UpdateDataAssetFromOracleSiebel) GetAssetProperties() map[string]string { + return m.AssetProperties +} + +//GetRegistryMetadata returns RegistryMetadata +func (m UpdateDataAssetFromOracleSiebel) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + +func (m UpdateDataAssetFromOracleSiebel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDataAssetFromOracleSiebel) 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 UpdateDataAssetFromOracleSiebel) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDataAssetFromOracleSiebel UpdateDataAssetFromOracleSiebel + s := struct { + DiscriminatorParam string `json:"modelType"` + MarshalTypeUpdateDataAssetFromOracleSiebel + }{ + "ORACLE_SIEBEL_DATA_ASSET", + (MarshalTypeUpdateDataAssetFromOracleSiebel)(m), + } + + return json.Marshal(&s) +} diff --git a/dataintegration/update_export_request_details.go b/dataintegration/update_export_request_details.go new file mode 100644 index 0000000000..cdb8d666b2 --- /dev/null +++ b/dataintegration/update_export_request_details.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateExportRequestDetails Properties used in export object request update operations. +type UpdateExportRequestDetails struct { + + // The status of the object. + Status UpdateExportRequestDetailsStatusEnum `mandatory:"false" json:"status,omitempty"` +} + +func (m UpdateExportRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateExportRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateExportRequestDetailsStatusEnum(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(GetUpdateExportRequestDetailsStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateExportRequestDetailsStatusEnum Enum with underlying type: string +type UpdateExportRequestDetailsStatusEnum string + +// Set of constants representing the allowable values for UpdateExportRequestDetailsStatusEnum +const ( + UpdateExportRequestDetailsStatusTerminating UpdateExportRequestDetailsStatusEnum = "TERMINATING" +) + +var mappingUpdateExportRequestDetailsStatusEnum = map[string]UpdateExportRequestDetailsStatusEnum{ + "TERMINATING": UpdateExportRequestDetailsStatusTerminating, +} + +var mappingUpdateExportRequestDetailsStatusEnumLowerCase = map[string]UpdateExportRequestDetailsStatusEnum{ + "terminating": UpdateExportRequestDetailsStatusTerminating, +} + +// GetUpdateExportRequestDetailsStatusEnumValues Enumerates the set of values for UpdateExportRequestDetailsStatusEnum +func GetUpdateExportRequestDetailsStatusEnumValues() []UpdateExportRequestDetailsStatusEnum { + values := make([]UpdateExportRequestDetailsStatusEnum, 0) + for _, v := range mappingUpdateExportRequestDetailsStatusEnum { + values = append(values, v) + } + return values +} + +// GetUpdateExportRequestDetailsStatusEnumStringValues Enumerates the set of values in String for UpdateExportRequestDetailsStatusEnum +func GetUpdateExportRequestDetailsStatusEnumStringValues() []string { + return []string{ + "TERMINATING", + } +} + +// GetMappingUpdateExportRequestDetailsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateExportRequestDetailsStatusEnum(val string) (UpdateExportRequestDetailsStatusEnum, bool) { + enum, ok := mappingUpdateExportRequestDetailsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/update_export_request_request_response.go b/dataintegration/update_export_request_request_response.go new file mode 100644 index 0000000000..574026caa0 --- /dev/null +++ b/dataintegration/update_export_request_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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateExportRequestRequest wrapper for the UpdateExportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/UpdateExportRequest.go.html to see an example of how to use UpdateExportRequestRequest. +type UpdateExportRequestRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The key of the object export object request + ExportRequestKey *string `mandatory:"true" contributesTo:"path" name:"exportRequestKey"` + + // The details needed to update the status of a export object request. + UpdateExportRequestDetails `contributesTo:"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 `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. + // When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. + 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 UpdateExportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateExportRequestRequest) 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 UpdateExportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateExportRequestRequest) 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 UpdateExportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateExportRequestResponse wrapper for the UpdateExportRequest operation +type UpdateExportRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExportRequest instance + ExportRequest `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 UpdateExportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateExportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/dataintegration/update_import_request_details.go b/dataintegration/update_import_request_details.go new file mode 100644 index 0000000000..ba17a4a30d --- /dev/null +++ b/dataintegration/update_import_request_details.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Integration API +// +// Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see Data Integration (https://docs.oracle.com/iaas/data-integration/home.htm). +// + +package dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateImportRequestDetails Properties used in import object request update operations. +type UpdateImportRequestDetails struct { + + // The status of the object. + Status UpdateImportRequestDetailsStatusEnum `mandatory:"false" json:"status,omitempty"` +} + +func (m UpdateImportRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateImportRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateImportRequestDetailsStatusEnum(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(GetUpdateImportRequestDetailsStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateImportRequestDetailsStatusEnum Enum with underlying type: string +type UpdateImportRequestDetailsStatusEnum string + +// Set of constants representing the allowable values for UpdateImportRequestDetailsStatusEnum +const ( + UpdateImportRequestDetailsStatusTerminating UpdateImportRequestDetailsStatusEnum = "TERMINATING" +) + +var mappingUpdateImportRequestDetailsStatusEnum = map[string]UpdateImportRequestDetailsStatusEnum{ + "TERMINATING": UpdateImportRequestDetailsStatusTerminating, +} + +var mappingUpdateImportRequestDetailsStatusEnumLowerCase = map[string]UpdateImportRequestDetailsStatusEnum{ + "terminating": UpdateImportRequestDetailsStatusTerminating, +} + +// GetUpdateImportRequestDetailsStatusEnumValues Enumerates the set of values for UpdateImportRequestDetailsStatusEnum +func GetUpdateImportRequestDetailsStatusEnumValues() []UpdateImportRequestDetailsStatusEnum { + values := make([]UpdateImportRequestDetailsStatusEnum, 0) + for _, v := range mappingUpdateImportRequestDetailsStatusEnum { + values = append(values, v) + } + return values +} + +// GetUpdateImportRequestDetailsStatusEnumStringValues Enumerates the set of values in String for UpdateImportRequestDetailsStatusEnum +func GetUpdateImportRequestDetailsStatusEnumStringValues() []string { + return []string{ + "TERMINATING", + } +} + +// GetMappingUpdateImportRequestDetailsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateImportRequestDetailsStatusEnum(val string) (UpdateImportRequestDetailsStatusEnum, bool) { + enum, ok := mappingUpdateImportRequestDetailsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/dataintegration/update_import_request_request_response.go b/dataintegration/update_import_request_request_response.go new file mode 100644 index 0000000000..d7e93b3703 --- /dev/null +++ b/dataintegration/update_import_request_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 dataintegration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateImportRequestRequest wrapper for the UpdateImportRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/dataintegration/UpdateImportRequest.go.html to see an example of how to use UpdateImportRequestRequest. +type UpdateImportRequestRequest struct { + + // The workspace ID. + WorkspaceId *string `mandatory:"true" contributesTo:"path" name:"workspaceId"` + + // The key of the object export object request + ImportRequestKey *string `mandatory:"true" contributesTo:"path" name:"importRequestKey"` + + // The details needed to update the status of a import object request. + UpdateImportRequestDetails `contributesTo:"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 `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. + // When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. + 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 UpdateImportRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateImportRequestRequest) 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 UpdateImportRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateImportRequestRequest) 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 UpdateImportRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateImportRequestResponse wrapper for the UpdateImportRequest operation +type UpdateImportRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ImportRequest instance + ImportRequest `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 UpdateImportRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateImportRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go b/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go index 87ffaf0ab3..3fc3693314 100644 --- a/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go +++ b/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go @@ -144,7 +144,7 @@ func (client LifecycleEnvironmentClient) attachManagedInstancesToLifecycleStage( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleStage/AttachManagedInstancesToLifecycleStage" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "AttachManagedInstancesToLifecycleStage", apiReferenceLink) return response, err } @@ -207,7 +207,7 @@ func (client LifecycleEnvironmentClient) createLifecycleEnvironment(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleEnvironment/CreateLifecycleEnvironment" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "CreateLifecycleEnvironment", apiReferenceLink) return response, err } @@ -265,7 +265,7 @@ func (client LifecycleEnvironmentClient) deleteLifecycleEnvironment(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleEnvironment/DeleteLifecycleEnvironment" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "DeleteLifecycleEnvironment", apiReferenceLink) return response, err } @@ -328,7 +328,7 @@ func (client LifecycleEnvironmentClient) detachManagedInstancesFromLifecycleStag defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleStage/DetachManagedInstancesFromLifecycleStage" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "DetachManagedInstancesFromLifecycleStage", apiReferenceLink) return response, err } @@ -386,7 +386,7 @@ func (client LifecycleEnvironmentClient) getLifecycleEnvironment(ctx context.Con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleEnvironment/GetLifecycleEnvironment" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "GetLifecycleEnvironment", apiReferenceLink) return response, err } @@ -444,7 +444,7 @@ func (client LifecycleEnvironmentClient) getLifecycleStage(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleStage/GetLifecycleStage" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "GetLifecycleStage", apiReferenceLink) return response, err } @@ -503,7 +503,7 @@ func (client LifecycleEnvironmentClient) listLifecycleEnvironments(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleEnvironment/ListLifecycleEnvironments" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "ListLifecycleEnvironments", apiReferenceLink) return response, err } @@ -562,7 +562,7 @@ func (client LifecycleEnvironmentClient) listLifecycleStageInstalledPackages(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleStage/ListLifecycleStageInstalledPackages" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "ListLifecycleStageInstalledPackages", apiReferenceLink) return response, err } @@ -621,7 +621,7 @@ func (client LifecycleEnvironmentClient) listLifecycleStages(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleStage/ListLifecycleStages" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "ListLifecycleStages", apiReferenceLink) return response, err } @@ -685,7 +685,7 @@ func (client LifecycleEnvironmentClient) promoteSoftwareSourceToLifecycleStage(c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleStage/PromoteSoftwareSourceToLifecycleStage" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "PromoteSoftwareSourceToLifecycleStage", apiReferenceLink) return response, err } @@ -743,7 +743,7 @@ func (client LifecycleEnvironmentClient) updateLifecycleEnvironment(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/LifecycleEnvironment/UpdateLifecycleEnvironment" err = common.PostProcessServiceError(err, "LifecycleEnvironment", "UpdateLifecycleEnvironment", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_managedinstance_client.go b/osmanagementhub/osmanagementhub_managedinstance_client.go index 9b6dcde86d..a11df716f7 100644 --- a/osmanagementhub/osmanagementhub_managedinstance_client.go +++ b/osmanagementhub/osmanagementhub_managedinstance_client.go @@ -144,7 +144,7 @@ func (client ManagedInstanceClient) attachSoftwareSourcesToManagedInstance(ctx c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/AttachSoftwareSourcesToManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "AttachSoftwareSourcesToManagedInstance", apiReferenceLink) return response, err } @@ -208,7 +208,7 @@ func (client ManagedInstanceClient) detachSoftwareSourcesFromManagedInstance(ctx defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/DetachSoftwareSourcesFromManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "DetachSoftwareSourcesFromManagedInstance", apiReferenceLink) return response, err } @@ -274,7 +274,7 @@ func (client ManagedInstanceClient) disableModuleStreamOnManagedInstance(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/DisableModuleStreamOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "DisableModuleStreamOnManagedInstance", apiReferenceLink) return response, err } @@ -341,7 +341,7 @@ func (client ManagedInstanceClient) enableModuleStreamOnManagedInstance(ctx cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/EnableModuleStreamOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "EnableModuleStreamOnManagedInstance", apiReferenceLink) return response, err } @@ -399,7 +399,7 @@ func (client ManagedInstanceClient) getManagedInstance(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/GetManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "GetManagedInstance", apiReferenceLink) return response, err } @@ -464,7 +464,7 @@ func (client ManagedInstanceClient) installModuleStreamProfileOnManagedInstance( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/InstallModuleStreamProfileOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "InstallModuleStreamProfileOnManagedInstance", apiReferenceLink) return response, err } @@ -527,7 +527,7 @@ func (client ManagedInstanceClient) installPackagesOnManagedInstance(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/InstallPackagesOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "InstallPackagesOnManagedInstance", apiReferenceLink) return response, err } @@ -585,7 +585,7 @@ func (client ManagedInstanceClient) listManagedInstanceAvailablePackages(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ListManagedInstanceAvailablePackages" err = common.PostProcessServiceError(err, "ManagedInstance", "ListManagedInstanceAvailablePackages", apiReferenceLink) return response, err } @@ -643,7 +643,7 @@ func (client ManagedInstanceClient) listManagedInstanceAvailableSoftwareSources( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ListManagedInstanceAvailableSoftwareSources" err = common.PostProcessServiceError(err, "ManagedInstance", "ListManagedInstanceAvailableSoftwareSources", apiReferenceLink) return response, err } @@ -701,7 +701,7 @@ func (client ManagedInstanceClient) listManagedInstanceErrata(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ListManagedInstanceErrata" err = common.PostProcessServiceError(err, "ManagedInstance", "ListManagedInstanceErrata", apiReferenceLink) return response, err } @@ -759,7 +759,7 @@ func (client ManagedInstanceClient) listManagedInstanceInstalledPackages(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ListManagedInstanceInstalledPackages" err = common.PostProcessServiceError(err, "ManagedInstance", "ListManagedInstanceInstalledPackages", apiReferenceLink) return response, err } @@ -826,7 +826,7 @@ func (client ManagedInstanceClient) listManagedInstanceModules(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ListManagedInstanceModules" err = common.PostProcessServiceError(err, "ManagedInstance", "ListManagedInstanceModules", apiReferenceLink) return response, err } @@ -884,7 +884,7 @@ func (client ManagedInstanceClient) listManagedInstanceUpdatablePackages(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ListManagedInstanceUpdatablePackages" err = common.PostProcessServiceError(err, "ManagedInstance", "ListManagedInstanceUpdatablePackages", apiReferenceLink) return response, err } @@ -942,7 +942,7 @@ func (client ManagedInstanceClient) listManagedInstances(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ListManagedInstances" err = common.PostProcessServiceError(err, "ManagedInstance", "ListManagedInstances", apiReferenceLink) return response, err } @@ -1056,7 +1056,7 @@ func (client ManagedInstanceClient) manageModuleStreamsOnManagedInstance(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/ManageModuleStreamsOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "ManageModuleStreamsOnManagedInstance", apiReferenceLink) return response, err } @@ -1119,7 +1119,7 @@ func (client ManagedInstanceClient) refreshSoftwareOnManagedInstance(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/RefreshSoftwareOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "RefreshSoftwareOnManagedInstance", apiReferenceLink) return response, err } @@ -1184,7 +1184,7 @@ func (client ManagedInstanceClient) removeModuleStreamProfileFromManagedInstance defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/RemoveModuleStreamProfileFromManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "RemoveModuleStreamProfileFromManagedInstance", apiReferenceLink) return response, err } @@ -1247,7 +1247,7 @@ func (client ManagedInstanceClient) removePackagesFromManagedInstance(ctx contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/RemovePackagesFromManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "RemovePackagesFromManagedInstance", apiReferenceLink) return response, err } @@ -1313,7 +1313,7 @@ func (client ManagedInstanceClient) switchModuleStreamOnManagedInstance(ctx cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/SwitchModuleStreamOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "SwitchModuleStreamOnManagedInstance", apiReferenceLink) return response, err } @@ -1376,7 +1376,7 @@ func (client ManagedInstanceClient) updateAllPackagesOnManagedInstancesInCompart defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/UpdateAllPackagesOnManagedInstancesInCompartment" err = common.PostProcessServiceError(err, "ManagedInstance", "UpdateAllPackagesOnManagedInstancesInCompartment", apiReferenceLink) return response, err } @@ -1434,7 +1434,7 @@ func (client ManagedInstanceClient) updateManagedInstance(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/UpdateManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "UpdateManagedInstance", apiReferenceLink) return response, err } @@ -1497,7 +1497,7 @@ func (client ManagedInstanceClient) updatePackagesOnManagedInstance(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/UpdatePackagesOnManagedInstance" err = common.PostProcessServiceError(err, "ManagedInstance", "UpdatePackagesOnManagedInstance", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_managedinstancegroup_client.go b/osmanagementhub/osmanagementhub_managedinstancegroup_client.go index 573be29298..7ad87742a0 100644 --- a/osmanagementhub/osmanagementhub_managedinstancegroup_client.go +++ b/osmanagementhub/osmanagementhub_managedinstancegroup_client.go @@ -146,7 +146,7 @@ func (client ManagedInstanceGroupClient) attachManagedInstancesToManagedInstance defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/AttachManagedInstancesToManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "AttachManagedInstancesToManagedInstanceGroup", apiReferenceLink) return response, err } @@ -209,7 +209,7 @@ func (client ManagedInstanceGroupClient) attachSoftwareSourcesToManagedInstanceG defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/AttachSoftwareSourcesToManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "AttachSoftwareSourcesToManagedInstanceGroup", apiReferenceLink) return response, err } @@ -272,7 +272,7 @@ func (client ManagedInstanceGroupClient) createManagedInstanceGroup(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/CreateManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "CreateManagedInstanceGroup", apiReferenceLink) return response, err } @@ -330,7 +330,7 @@ func (client ManagedInstanceGroupClient) deleteManagedInstanceGroup(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/DeleteManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "DeleteManagedInstanceGroup", apiReferenceLink) return response, err } @@ -393,7 +393,7 @@ func (client ManagedInstanceGroupClient) detachManagedInstancesFromManagedInstan defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/DetachManagedInstancesFromManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "DetachManagedInstancesFromManagedInstanceGroup", apiReferenceLink) return response, err } @@ -456,7 +456,7 @@ func (client ManagedInstanceGroupClient) detachSoftwareSourcesFromManagedInstanc defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/DetachSoftwareSourcesFromManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "DetachSoftwareSourcesFromManagedInstanceGroup", apiReferenceLink) return response, err } @@ -522,7 +522,7 @@ func (client ManagedInstanceGroupClient) disableModuleStreamOnManagedInstanceGro defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/DisableModuleStreamOnManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "DisableModuleStreamOnManagedInstanceGroup", apiReferenceLink) return response, err } @@ -589,7 +589,7 @@ func (client ManagedInstanceGroupClient) enableModuleStreamOnManagedInstanceGrou defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/EnableModuleStreamOnManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "EnableModuleStreamOnManagedInstanceGroup", apiReferenceLink) return response, err } @@ -647,7 +647,7 @@ func (client ManagedInstanceGroupClient) getManagedInstanceGroup(ctx context.Con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/GetManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "GetManagedInstanceGroup", apiReferenceLink) return response, err } @@ -712,7 +712,7 @@ func (client ManagedInstanceGroupClient) installModuleStreamProfileOnManagedInst defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/InstallModuleStreamProfileOnManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "InstallModuleStreamProfileOnManagedInstanceGroup", apiReferenceLink) return response, err } @@ -776,7 +776,7 @@ func (client ManagedInstanceGroupClient) installPackagesOnManagedInstanceGroup(c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/InstallPackagesOnManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "InstallPackagesOnManagedInstanceGroup", apiReferenceLink) return response, err } @@ -835,7 +835,7 @@ func (client ManagedInstanceGroupClient) listManagedInstanceGroupAvailableModule defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/ListManagedInstanceGroupAvailableModules" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "ListManagedInstanceGroupAvailableModules", apiReferenceLink) return response, err } @@ -894,7 +894,7 @@ func (client ManagedInstanceGroupClient) listManagedInstanceGroupAvailablePackag defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/ListManagedInstanceGroupAvailablePackages" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "ListManagedInstanceGroupAvailablePackages", apiReferenceLink) return response, err } @@ -953,7 +953,7 @@ func (client ManagedInstanceGroupClient) listManagedInstanceGroupAvailableSoftwa defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/ListManagedInstanceGroupAvailableSoftwareSources" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "ListManagedInstanceGroupAvailableSoftwareSources", apiReferenceLink) return response, err } @@ -1012,7 +1012,7 @@ func (client ManagedInstanceGroupClient) listManagedInstanceGroupInstalledPackag defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/ListManagedInstanceGroupInstalledPackages" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "ListManagedInstanceGroupInstalledPackages", apiReferenceLink) return response, err } @@ -1087,7 +1087,7 @@ func (client ManagedInstanceGroupClient) listManagedInstanceGroupModules(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/ListManagedInstanceGroupModules" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "ListManagedInstanceGroupModules", apiReferenceLink) return response, err } @@ -1146,7 +1146,7 @@ func (client ManagedInstanceGroupClient) listManagedInstanceGroups(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/ListManagedInstanceGroups" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "ListManagedInstanceGroups", apiReferenceLink) return response, err } @@ -1260,7 +1260,7 @@ func (client ManagedInstanceGroupClient) manageModuleStreamsOnManagedInstanceGro defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/ManageModuleStreamsOnManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "ManageModuleStreamsOnManagedInstanceGroup", apiReferenceLink) return response, err } @@ -1325,7 +1325,7 @@ func (client ManagedInstanceGroupClient) removeModuleStreamProfileFromManagedIns defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/RemoveModuleStreamProfileFromManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "RemoveModuleStreamProfileFromManagedInstanceGroup", apiReferenceLink) return response, err } @@ -1388,7 +1388,7 @@ func (client ManagedInstanceGroupClient) removePackagesFromManagedInstanceGroup( defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/RemovePackagesFromManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "RemovePackagesFromManagedInstanceGroup", apiReferenceLink) return response, err } @@ -1451,7 +1451,7 @@ func (client ManagedInstanceGroupClient) updateAllPackagesOnManagedInstanceGroup defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/UpdateAllPackagesOnManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "UpdateAllPackagesOnManagedInstanceGroup", apiReferenceLink) return response, err } @@ -1509,7 +1509,7 @@ func (client ManagedInstanceGroupClient) updateManagedInstanceGroup(ctx context. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceGroup/UpdateManagedInstanceGroup" err = common.PostProcessServiceError(err, "ManagedInstanceGroup", "UpdateManagedInstanceGroup", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_managementstation_client.go b/osmanagementhub/osmanagementhub_managementstation_client.go index c11589b0b5..24bccb15fd 100644 --- a/osmanagementhub/osmanagementhub_managementstation_client.go +++ b/osmanagementhub/osmanagementhub_managementstation_client.go @@ -143,7 +143,7 @@ func (client ManagementStationClient) createManagementStation(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagementStation/CreateManagementStation" err = common.PostProcessServiceError(err, "ManagementStation", "CreateManagementStation", apiReferenceLink) return response, err } @@ -201,7 +201,7 @@ func (client ManagementStationClient) deleteManagementStation(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagementStation/DeleteManagementStation" err = common.PostProcessServiceError(err, "ManagementStation", "DeleteManagementStation", apiReferenceLink) return response, err } @@ -259,7 +259,7 @@ func (client ManagementStationClient) getManagementStation(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagementStation/GetManagementStation" err = common.PostProcessServiceError(err, "ManagementStation", "GetManagementStation", apiReferenceLink) return response, err } @@ -317,7 +317,7 @@ func (client ManagementStationClient) listManagementStations(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagementStation/ListManagementStations" err = common.PostProcessServiceError(err, "ManagementStation", "ListManagementStations", apiReferenceLink) return response, err } @@ -375,7 +375,7 @@ func (client ManagementStationClient) listMirrors(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/MirrorsCollection/ListMirrors" err = common.PostProcessServiceError(err, "ManagementStation", "ListMirrors", apiReferenceLink) return response, err } @@ -438,7 +438,7 @@ func (client ManagementStationClient) synchronizeMirrors(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagementStation/SynchronizeMirrors" err = common.PostProcessServiceError(err, "ManagementStation", "SynchronizeMirrors", apiReferenceLink) return response, err } @@ -501,7 +501,7 @@ func (client ManagementStationClient) synchronizeSingleMirrors(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagementStation/SynchronizeSingleMirrors" err = common.PostProcessServiceError(err, "ManagementStation", "SynchronizeSingleMirrors", apiReferenceLink) return response, err } @@ -559,7 +559,7 @@ func (client ManagementStationClient) updateManagementStation(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagementStation/UpdateManagementStation" err = common.PostProcessServiceError(err, "ManagementStation", "UpdateManagementStation", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_onboarding_client.go b/osmanagementhub/osmanagementhub_onboarding_client.go index 4dd19bdf29..6df8fdcdf0 100644 --- a/osmanagementhub/osmanagementhub_onboarding_client.go +++ b/osmanagementhub/osmanagementhub_onboarding_client.go @@ -145,7 +145,7 @@ func (client OnboardingClient) createProfile(ctx context.Context, request common defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/Profile/CreateProfile" err = common.PostProcessServiceError(err, "Onboarding", "CreateProfile", apiReferenceLink) return response, err } @@ -203,7 +203,7 @@ func (client OnboardingClient) deleteProfile(ctx context.Context, request common defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/Profile/DeleteProfile" err = common.PostProcessServiceError(err, "Onboarding", "DeleteProfile", apiReferenceLink) return response, err } @@ -261,7 +261,7 @@ func (client OnboardingClient) getProfile(ctx context.Context, request common.OC defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/Profile/GetProfile" err = common.PostProcessServiceError(err, "Onboarding", "GetProfile", apiReferenceLink) return response, err } @@ -320,7 +320,7 @@ func (client OnboardingClient) listProfiles(ctx context.Context, request common. defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/Profile/ListProfiles" err = common.PostProcessServiceError(err, "Onboarding", "ListProfiles", apiReferenceLink) return response, err } @@ -378,7 +378,7 @@ func (client OnboardingClient) updateProfile(ctx context.Context, request common defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/Profile/UpdateProfile" err = common.PostProcessServiceError(err, "Onboarding", "UpdateProfile", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go b/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go index e50cb87ff0..6c644100ae 100644 --- a/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go +++ b/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go @@ -137,7 +137,7 @@ func (client ReportingManagedInstanceClient) getManagedInstanceAnalyticContent(c httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/GetManagedInstanceAnalyticContent" err = common.PostProcessServiceError(err, "ReportingManagedInstance", "GetManagedInstanceAnalyticContent", apiReferenceLink) return response, err } @@ -194,7 +194,7 @@ func (client ReportingManagedInstanceClient) getManagedInstanceContent(ctx conte httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstance/GetManagedInstanceContent" err = common.PostProcessServiceError(err, "ReportingManagedInstance", "GetManagedInstanceContent", apiReferenceLink) return response, err } @@ -252,7 +252,7 @@ func (client ReportingManagedInstanceClient) summarizeManagedInstanceAnalytics(c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ManagedInstanceAnalyticCollection/SummarizeManagedInstanceAnalytics" err = common.PostProcessServiceError(err, "ReportingManagedInstance", "SummarizeManagedInstanceAnalytics", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_scheduledjob_client.go b/osmanagementhub/osmanagementhub_scheduledjob_client.go index caf3bfd014..d40f71aaf3 100644 --- a/osmanagementhub/osmanagementhub_scheduledjob_client.go +++ b/osmanagementhub/osmanagementhub_scheduledjob_client.go @@ -143,7 +143,7 @@ func (client ScheduledJobClient) createScheduledJob(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ScheduledJob/CreateScheduledJob" err = common.PostProcessServiceError(err, "ScheduledJob", "CreateScheduledJob", apiReferenceLink) return response, err } @@ -201,7 +201,7 @@ func (client ScheduledJobClient) deleteScheduledJob(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ScheduledJob/DeleteScheduledJob" err = common.PostProcessServiceError(err, "ScheduledJob", "DeleteScheduledJob", apiReferenceLink) return response, err } @@ -259,7 +259,7 @@ func (client ScheduledJobClient) getScheduledJob(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ScheduledJob/GetScheduledJob" err = common.PostProcessServiceError(err, "ScheduledJob", "GetScheduledJob", apiReferenceLink) return response, err } @@ -319,7 +319,7 @@ func (client ScheduledJobClient) listScheduledJobs(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ScheduledJob/ListScheduledJobs" err = common.PostProcessServiceError(err, "ScheduledJob", "ListScheduledJobs", apiReferenceLink) return response, err } @@ -383,7 +383,7 @@ func (client ScheduledJobClient) runScheduledJobNow(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ScheduledJob/RunScheduledJobNow" err = common.PostProcessServiceError(err, "ScheduledJob", "RunScheduledJobNow", apiReferenceLink) return response, err } @@ -441,7 +441,7 @@ func (client ScheduledJobClient) updateScheduledJob(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ScheduledJob/UpdateScheduledJob" err = common.PostProcessServiceError(err, "ScheduledJob", "UpdateScheduledJob", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_softwaresource_client.go b/osmanagementhub/osmanagementhub_softwaresource_client.go index 97989f7d50..16563dbc42 100644 --- a/osmanagementhub/osmanagementhub_softwaresource_client.go +++ b/osmanagementhub/osmanagementhub_softwaresource_client.go @@ -143,7 +143,7 @@ func (client SoftwareSourceClient) changeAvailabilityOfSoftwareSources(ctx conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ChangeAvailabilityOfSoftwareSources" err = common.PostProcessServiceError(err, "SoftwareSource", "ChangeAvailabilityOfSoftwareSources", apiReferenceLink) return response, err } @@ -206,7 +206,7 @@ func (client SoftwareSourceClient) createEntitlement(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/CreateEntitlement" err = common.PostProcessServiceError(err, "SoftwareSource", "CreateEntitlement", apiReferenceLink) return response, err } @@ -269,7 +269,7 @@ func (client SoftwareSourceClient) createSoftwareSource(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/CreateSoftwareSource" err = common.PostProcessServiceError(err, "SoftwareSource", "CreateSoftwareSource", apiReferenceLink) return response, err } @@ -327,7 +327,7 @@ func (client SoftwareSourceClient) deleteSoftwareSource(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/DeleteSoftwareSource" err = common.PostProcessServiceError(err, "SoftwareSource", "DeleteSoftwareSource", apiReferenceLink) return response, err } @@ -385,7 +385,7 @@ func (client SoftwareSourceClient) getErratum(ctx context.Context, request commo defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/Erratum/GetErratum" err = common.PostProcessServiceError(err, "SoftwareSource", "GetErratum", apiReferenceLink) return response, err } @@ -443,7 +443,7 @@ func (client SoftwareSourceClient) getModuleStream(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ModuleStream/GetModuleStream" err = common.PostProcessServiceError(err, "SoftwareSource", "GetModuleStream", apiReferenceLink) return response, err } @@ -501,7 +501,7 @@ func (client SoftwareSourceClient) getModuleStreamProfile(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/ModuleStreamProfile/GetModuleStreamProfile" err = common.PostProcessServiceError(err, "SoftwareSource", "GetModuleStreamProfile", apiReferenceLink) return response, err } @@ -559,7 +559,7 @@ func (client SoftwareSourceClient) getPackageGroup(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/PackageGroup/GetPackageGroup" err = common.PostProcessServiceError(err, "SoftwareSource", "GetPackageGroup", apiReferenceLink) return response, err } @@ -617,7 +617,7 @@ func (client SoftwareSourceClient) getSoftwarePackage(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/GetSoftwarePackage" err = common.PostProcessServiceError(err, "SoftwareSource", "GetSoftwarePackage", apiReferenceLink) return response, err } @@ -675,7 +675,7 @@ func (client SoftwareSourceClient) getSoftwareSource(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/GetSoftwareSource" err = common.PostProcessServiceError(err, "SoftwareSource", "GetSoftwareSource", apiReferenceLink) return response, err } @@ -734,7 +734,7 @@ func (client SoftwareSourceClient) listEntitlements(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ListEntitlements" err = common.PostProcessServiceError(err, "SoftwareSource", "ListEntitlements", apiReferenceLink) return response, err } @@ -793,7 +793,7 @@ func (client SoftwareSourceClient) listErrata(ctx context.Context, request commo defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/Erratum/ListErrata" err = common.PostProcessServiceError(err, "SoftwareSource", "ListErrata", apiReferenceLink) return response, err } @@ -852,7 +852,7 @@ func (client SoftwareSourceClient) listModuleStreamProfiles(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ListModuleStreamProfiles" err = common.PostProcessServiceError(err, "SoftwareSource", "ListModuleStreamProfiles", apiReferenceLink) return response, err } @@ -911,7 +911,7 @@ func (client SoftwareSourceClient) listModuleStreams(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ListModuleStreams" err = common.PostProcessServiceError(err, "SoftwareSource", "ListModuleStreams", apiReferenceLink) return response, err } @@ -970,7 +970,7 @@ func (client SoftwareSourceClient) listPackageGroups(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ListPackageGroups" err = common.PostProcessServiceError(err, "SoftwareSource", "ListPackageGroups", apiReferenceLink) return response, err } @@ -1029,7 +1029,7 @@ func (client SoftwareSourceClient) listSoftwarePackages(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ListSoftwarePackages" err = common.PostProcessServiceError(err, "SoftwareSource", "ListSoftwarePackages", apiReferenceLink) return response, err } @@ -1088,7 +1088,7 @@ func (client SoftwareSourceClient) listSoftwareSourceVendors(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ListSoftwareSourceVendors" err = common.PostProcessServiceError(err, "SoftwareSource", "ListSoftwareSourceVendors", apiReferenceLink) return response, err } @@ -1147,7 +1147,7 @@ func (client SoftwareSourceClient) listSoftwareSources(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/ListSoftwareSources" err = common.PostProcessServiceError(err, "SoftwareSource", "ListSoftwareSources", apiReferenceLink) return response, err } @@ -1206,7 +1206,7 @@ func (client SoftwareSourceClient) searchSoftwareSourceModuleStreams(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/SearchSoftwareSourceModuleStreams" err = common.PostProcessServiceError(err, "SoftwareSource", "SearchSoftwareSourceModuleStreams", apiReferenceLink) return response, err } @@ -1265,7 +1265,7 @@ func (client SoftwareSourceClient) searchSoftwareSourceModules(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/SearchSoftwareSourceModules" err = common.PostProcessServiceError(err, "SoftwareSource", "SearchSoftwareSourceModules", apiReferenceLink) return response, err } @@ -1324,7 +1324,7 @@ func (client SoftwareSourceClient) searchSoftwareSourcePackageGroups(ctx context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/SearchSoftwareSourcePackageGroups" err = common.PostProcessServiceError(err, "SoftwareSource", "SearchSoftwareSourcePackageGroups", apiReferenceLink) return response, err } @@ -1382,7 +1382,7 @@ func (client SoftwareSourceClient) updateSoftwareSource(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/SoftwareSource/UpdateSoftwareSource" err = common.PostProcessServiceError(err, "SoftwareSource", "UpdateSoftwareSource", apiReferenceLink) return response, err } diff --git a/osmanagementhub/osmanagementhub_workrequest_client.go b/osmanagementhub/osmanagementhub_workrequest_client.go index 9d3f070999..90ecd27e33 100644 --- a/osmanagementhub/osmanagementhub_workrequest_client.go +++ b/osmanagementhub/osmanagementhub_workrequest_client.go @@ -138,7 +138,7 @@ func (client WorkRequestClient) getWorkRequest(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "WorkRequest", "GetWorkRequest", apiReferenceLink) return response, err } @@ -196,7 +196,7 @@ func (client WorkRequestClient) listWorkRequestErrors(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/WorkRequest/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "WorkRequest", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -254,7 +254,7 @@ func (client WorkRequestClient) listWorkRequestLogs(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/WorkRequest/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "WorkRequest", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -313,7 +313,7 @@ func (client WorkRequestClient) listWorkRequests(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/osmh/20220901/WorkRequest/ListWorkRequests" err = common.PostProcessServiceError(err, "WorkRequest", "ListWorkRequests", apiReferenceLink) return response, err } diff --git a/ospgateway/billing_address.go b/ospgateway/address.go similarity index 53% rename from ospgateway/billing_address.go rename to ospgateway/address.go index 176f54391a..d3af1edfa1 100644 --- a/ospgateway/billing_address.go +++ b/ospgateway/address.go @@ -15,8 +15,8 @@ import ( "strings" ) -// BillingAddress Billing address details model. -type BillingAddress struct { +// Address Address details model. +type Address struct { // Address identifier. AddressKey *string `mandatory:"false" json:"addressKey"` @@ -27,12 +27,30 @@ type BillingAddress struct { // Address line 2. Line2 *string `mandatory:"false" json:"line2"` + // Address line 3. + Line3 *string `mandatory:"false" json:"line3"` + + // Address line 4. + Line4 *string `mandatory:"false" json:"line4"` + + // Street name of the address. + StreetName *string `mandatory:"false" json:"streetName"` + + // Street number of the address. + StreetNumber *string `mandatory:"false" json:"streetNumber"` + // Name of the city. City *string `mandatory:"false" json:"city"` + // County of the address. + County *string `mandatory:"false" json:"county"` + // Country of the address. Country *string `mandatory:"false" json:"country"` + // Province of the address. + Province *string `mandatory:"false" json:"province"` + // Post code of the address. PostalCode *string `mandatory:"false" json:"postalCode"` @@ -48,18 +66,45 @@ type BillingAddress struct { // First name of the contact person. FirstName *string `mandatory:"false" json:"firstName"` + // Middle name of the contact person. + MiddleName *string `mandatory:"false" json:"middleName"` + // Last name of the contact person. LastName *string `mandatory:"false" json:"lastName"` + + // Phone country code of the contact person. + PhoneCountryCode *string `mandatory:"false" json:"phoneCountryCode"` + + // Phone number of the contact person. + PhoneNumber *string `mandatory:"false" json:"phoneNumber"` + + // Job title of the contact person. + JobTitle *string `mandatory:"false" json:"jobTitle"` + + // Department name of the customer company. + DepartmentName *string `mandatory:"false" json:"departmentName"` + + // Internal number of the customer company. + InternalNumber *string `mandatory:"false" json:"internalNumber"` + + // Contributor class of the customer company. + ContributorClass *string `mandatory:"false" json:"contributorClass"` + + // State Inscription. + StateInscription *string `mandatory:"false" json:"stateInscription"` + + // Municipal Inscription. + MunicipalInscription *string `mandatory:"false" json:"municipalInscription"` } -func (m BillingAddress) String() string { +func (m Address) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m BillingAddress) ValidateEnumValue() (bool, error) { +func (m Address) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { diff --git a/ospgateway/address_quality_type.go b/ospgateway/address_quality_type.go new file mode 100644 index 0000000000..82e7a2d6e2 --- /dev/null +++ b/ospgateway/address_quality_type.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "strings" +) + +// AddressQualityTypeEnum Enum with underlying type: string +type AddressQualityTypeEnum string + +// Set of constants representing the allowable values for AddressQualityTypeEnum +const ( + AddressQualityTypeExcellent AddressQualityTypeEnum = "EXCELLENT" + AddressQualityTypeGood AddressQualityTypeEnum = "GOOD" + AddressQualityTypeAverage AddressQualityTypeEnum = "AVERAGE" + AddressQualityTypePoor AddressQualityTypeEnum = "POOR" + AddressQualityTypeBad AddressQualityTypeEnum = "BAD" +) + +var mappingAddressQualityTypeEnum = map[string]AddressQualityTypeEnum{ + "EXCELLENT": AddressQualityTypeExcellent, + "GOOD": AddressQualityTypeGood, + "AVERAGE": AddressQualityTypeAverage, + "POOR": AddressQualityTypePoor, + "BAD": AddressQualityTypeBad, +} + +var mappingAddressQualityTypeEnumLowerCase = map[string]AddressQualityTypeEnum{ + "excellent": AddressQualityTypeExcellent, + "good": AddressQualityTypeGood, + "average": AddressQualityTypeAverage, + "poor": AddressQualityTypePoor, + "bad": AddressQualityTypeBad, +} + +// GetAddressQualityTypeEnumValues Enumerates the set of values for AddressQualityTypeEnum +func GetAddressQualityTypeEnumValues() []AddressQualityTypeEnum { + values := make([]AddressQualityTypeEnum, 0) + for _, v := range mappingAddressQualityTypeEnum { + values = append(values, v) + } + return values +} + +// GetAddressQualityTypeEnumStringValues Enumerates the set of values in String for AddressQualityTypeEnum +func GetAddressQualityTypeEnumStringValues() []string { + return []string{ + "EXCELLENT", + "GOOD", + "AVERAGE", + "POOR", + "BAD", + } +} + +// GetMappingAddressQualityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddressQualityTypeEnum(val string) (AddressQualityTypeEnum, bool) { + enum, ok := mappingAddressQualityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/ospgateway/address_rule.go b/ospgateway/address_rule.go new file mode 100644 index 0000000000..ce50c9e1b2 --- /dev/null +++ b/ospgateway/address_rule.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddressRule Addres rule information +type AddressRule struct { + + // Country code for the address rule in ISO-3166-1 2-letter format + CountryCode *string `mandatory:"true" json:"countryCode"` + + Address *AddressTypeRule `mandatory:"true" json:"address"` + + Contact *ContactTypeRule `mandatory:"false" json:"contact"` + + Tax *TaxTypeRule `mandatory:"false" json:"tax"` +} + +func (m AddressRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddressRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/address_type_rule.go b/ospgateway/address_type_rule.go new file mode 100644 index 0000000000..c55635ed91 --- /dev/null +++ b/ospgateway/address_type_rule.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddressTypeRule Address type rule information +type AddressTypeRule struct { + + // Address type rule fields + Fields []Field `mandatory:"true" json:"fields"` + + // Third party validation. + ThirdPartyValidation ThirdPartyValidationTypeEnum `mandatory:"false" json:"thirdPartyValidation,omitempty"` +} + +func (m AddressTypeRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddressTypeRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingThirdPartyValidationTypeEnum(string(m.ThirdPartyValidation)); !ok && m.ThirdPartyValidation != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ThirdPartyValidation: %s. Supported values are: %s.", m.ThirdPartyValidation, strings.Join(GetThirdPartyValidationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/address_verification_code.go b/ospgateway/address_verification_code.go new file mode 100644 index 0000000000..44aee2cc9f --- /dev/null +++ b/ospgateway/address_verification_code.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "strings" +) + +// AddressVerificationCodeEnum Enum with underlying type: string +type AddressVerificationCodeEnum string + +// Set of constants representing the allowable values for AddressVerificationCodeEnum +const ( + AddressVerificationCodeVerified AddressVerificationCodeEnum = "VERIFIED" + AddressVerificationCodePartiallyVerified AddressVerificationCodeEnum = "PARTIALLY_VERIFIED" + AddressVerificationCodeAmbiguous AddressVerificationCodeEnum = "AMBIGUOUS" + AddressVerificationCodeReverted AddressVerificationCodeEnum = "REVERTED" + AddressVerificationCodeUnverified AddressVerificationCodeEnum = "UNVERIFIED" +) + +var mappingAddressVerificationCodeEnum = map[string]AddressVerificationCodeEnum{ + "VERIFIED": AddressVerificationCodeVerified, + "PARTIALLY_VERIFIED": AddressVerificationCodePartiallyVerified, + "AMBIGUOUS": AddressVerificationCodeAmbiguous, + "REVERTED": AddressVerificationCodeReverted, + "UNVERIFIED": AddressVerificationCodeUnverified, +} + +var mappingAddressVerificationCodeEnumLowerCase = map[string]AddressVerificationCodeEnum{ + "verified": AddressVerificationCodeVerified, + "partially_verified": AddressVerificationCodePartiallyVerified, + "ambiguous": AddressVerificationCodeAmbiguous, + "reverted": AddressVerificationCodeReverted, + "unverified": AddressVerificationCodeUnverified, +} + +// GetAddressVerificationCodeEnumValues Enumerates the set of values for AddressVerificationCodeEnum +func GetAddressVerificationCodeEnumValues() []AddressVerificationCodeEnum { + values := make([]AddressVerificationCodeEnum, 0) + for _, v := range mappingAddressVerificationCodeEnum { + values = append(values, v) + } + return values +} + +// GetAddressVerificationCodeEnumStringValues Enumerates the set of values in String for AddressVerificationCodeEnum +func GetAddressVerificationCodeEnumStringValues() []string { + return []string{ + "VERIFIED", + "PARTIALLY_VERIFIED", + "AMBIGUOUS", + "REVERTED", + "UNVERIFIED", + } +} + +// GetMappingAddressVerificationCodeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddressVerificationCodeEnum(val string) (AddressVerificationCodeEnum, bool) { + enum, ok := mappingAddressVerificationCodeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/ospgateway/contact_type_rule.go b/ospgateway/contact_type_rule.go new file mode 100644 index 0000000000..11f63d71f7 --- /dev/null +++ b/ospgateway/contact_type_rule.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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ContactTypeRule Contact type rule information +type ContactTypeRule struct { + + // Contact type rule fields + Fields []Field `mandatory:"true" json:"fields"` +} + +func (m ContactTypeRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ContactTypeRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/echeck_payment_detail.go b/ospgateway/echeck_payment_detail.go new file mode 100644 index 0000000000..fdbfc3b57a --- /dev/null +++ b/ospgateway/echeck_payment_detail.go @@ -0,0 +1,136 @@ +// 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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EcheckPaymentDetail Echeck Payment related details +type EcheckPaymentDetail struct { + + // Paid the invoice on this day + TimePaidOn *common.SDKTime `mandatory:"false" json:"timePaidOn"` + + // example + PaidBy *string `mandatory:"false" json:"paidBy"` + + // Amount that paid + AmountPaid *float32 `mandatory:"false" json:"amountPaid"` + + // Name on the echeck card + NameOnCard *string `mandatory:"false" json:"nameOnCard"` + + // Account number of the card owner + AccountNumber *string `mandatory:"false" json:"accountNumber"` + + // Routing number of the echeck card + RoutingNumber *string `mandatory:"false" json:"routingNumber"` + + // Echeck card type + CardType EcheckPaymentDetailCardTypeEnum `mandatory:"false" json:"cardType,omitempty"` +} + +//GetTimePaidOn returns TimePaidOn +func (m EcheckPaymentDetail) GetTimePaidOn() *common.SDKTime { + return m.TimePaidOn +} + +//GetPaidBy returns PaidBy +func (m EcheckPaymentDetail) GetPaidBy() *string { + return m.PaidBy +} + +//GetAmountPaid returns AmountPaid +func (m EcheckPaymentDetail) GetAmountPaid() *float32 { + return m.AmountPaid +} + +func (m EcheckPaymentDetail) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EcheckPaymentDetail) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingEcheckPaymentDetailCardTypeEnum(string(m.CardType)); !ok && m.CardType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CardType: %s. Supported values are: %s.", m.CardType, strings.Join(GetEcheckPaymentDetailCardTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m EcheckPaymentDetail) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEcheckPaymentDetail EcheckPaymentDetail + s := struct { + DiscriminatorParam string `json:"paymentMethod"` + MarshalTypeEcheckPaymentDetail + }{ + "ECHECK", + (MarshalTypeEcheckPaymentDetail)(m), + } + + return json.Marshal(&s) +} + +// EcheckPaymentDetailCardTypeEnum Enum with underlying type: string +type EcheckPaymentDetailCardTypeEnum string + +// Set of constants representing the allowable values for EcheckPaymentDetailCardTypeEnum +const ( + EcheckPaymentDetailCardTypeSaving EcheckPaymentDetailCardTypeEnum = "SAVING" + EcheckPaymentDetailCardTypeChecking EcheckPaymentDetailCardTypeEnum = "CHECKING" + EcheckPaymentDetailCardTypeCorporateChecking EcheckPaymentDetailCardTypeEnum = "CORPORATE_CHECKING" +) + +var mappingEcheckPaymentDetailCardTypeEnum = map[string]EcheckPaymentDetailCardTypeEnum{ + "SAVING": EcheckPaymentDetailCardTypeSaving, + "CHECKING": EcheckPaymentDetailCardTypeChecking, + "CORPORATE_CHECKING": EcheckPaymentDetailCardTypeCorporateChecking, +} + +var mappingEcheckPaymentDetailCardTypeEnumLowerCase = map[string]EcheckPaymentDetailCardTypeEnum{ + "saving": EcheckPaymentDetailCardTypeSaving, + "checking": EcheckPaymentDetailCardTypeChecking, + "corporate_checking": EcheckPaymentDetailCardTypeCorporateChecking, +} + +// GetEcheckPaymentDetailCardTypeEnumValues Enumerates the set of values for EcheckPaymentDetailCardTypeEnum +func GetEcheckPaymentDetailCardTypeEnumValues() []EcheckPaymentDetailCardTypeEnum { + values := make([]EcheckPaymentDetailCardTypeEnum, 0) + for _, v := range mappingEcheckPaymentDetailCardTypeEnum { + values = append(values, v) + } + return values +} + +// GetEcheckPaymentDetailCardTypeEnumStringValues Enumerates the set of values in String for EcheckPaymentDetailCardTypeEnum +func GetEcheckPaymentDetailCardTypeEnumStringValues() []string { + return []string{ + "SAVING", + "CHECKING", + "CORPORATE_CHECKING", + } +} + +// GetMappingEcheckPaymentDetailCardTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingEcheckPaymentDetailCardTypeEnum(val string) (EcheckPaymentDetailCardTypeEnum, bool) { + enum, ok := mappingEcheckPaymentDetailCardTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/ospgateway/field.go b/ospgateway/field.go new file mode 100644 index 0000000000..d87186a216 --- /dev/null +++ b/ospgateway/field.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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Field Field information +type Field struct { + + // The field name + Name *string `mandatory:"true" json:"name"` + + // The given field is requeired or not + IsRequired *bool `mandatory:"true" json:"isRequired"` + + Format *Format `mandatory:"false" json:"format"` + + Label *Label `mandatory:"false" json:"label"` + + // Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always) + Language *string `mandatory:"false" json:"language"` +} + +func (m Field) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Field) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/format.go b/ospgateway/format.go new file mode 100644 index 0000000000..865352d82e --- /dev/null +++ b/ospgateway/format.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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Format Format information +type Format struct { + + // Regex format specification + Value *string `mandatory:"true" json:"value"` + + // Example of the desired format that matches the regex + Example *string `mandatory:"false" json:"example"` +} + +func (m Format) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Format) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/get_address_request_response.go b/ospgateway/get_address_request_response.go new file mode 100644 index 0000000000..9c8b651a8f --- /dev/null +++ b/ospgateway/get_address_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAddressRequest wrapper for the GetAddress operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/GetAddress.go.html to see an example of how to use GetAddressRequest. +type GetAddressRequest struct { + + // The home region's public name of the logged in user. + OspHomeRegion *string `mandatory:"true" contributesTo:"query" name:"ospHomeRegion"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The identifier of the address. + AddressId *string `mandatory:"true" contributesTo:"path" name:"addressId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAddressRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAddressRequest) 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 GetAddressRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAddressRequest) 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 GetAddressRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAddressResponse wrapper for the GetAddress operation +type GetAddressResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Address instance + Address `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 GetAddressResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAddressResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/ospgateway/get_address_rule_request_response.go b/ospgateway/get_address_rule_request_response.go new file mode 100644 index 0000000000..47067876a5 --- /dev/null +++ b/ospgateway/get_address_rule_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAddressRuleRequest wrapper for the GetAddressRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/GetAddressRule.go.html to see an example of how to use GetAddressRuleRequest. +type GetAddressRuleRequest struct { + + // The home region's public name of the logged in user. + OspHomeRegion *string `mandatory:"true" contributesTo:"query" name:"ospHomeRegion"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Country code for the address rule in ISO-3166-1 2-letter format. + CountryCode *string `mandatory:"true" contributesTo:"path" name:"countryCode"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAddressRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAddressRuleRequest) 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 GetAddressRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAddressRuleRequest) 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 GetAddressRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAddressRuleResponse wrapper for the GetAddressRule operation +type GetAddressRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AddressRule instance + AddressRule `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 GetAddressRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAddressRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/ospgateway/label.go b/ospgateway/label.go new file mode 100644 index 0000000000..f59e67fd3e --- /dev/null +++ b/ospgateway/label.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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Label Label information +type Label struct { + + // Language token of the required label + Value *string `mandatory:"true" json:"value"` + + // English translation of the label (for reference only - translation is not provided) + Example *string `mandatory:"false" json:"example"` +} + +func (m Label) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Label) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/ospgateway_addressruleservice_client.go b/ospgateway/ospgateway_addressruleservice_client.go new file mode 100644 index 0000000000..5fb0f81389 --- /dev/null +++ b/ospgateway/ospgateway_addressruleservice_client.go @@ -0,0 +1,147 @@ +// 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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// AddressRuleServiceClient a client for AddressRuleService +type AddressRuleServiceClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewAddressRuleServiceClientWithConfigurationProvider Creates a new default AddressRuleService client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewAddressRuleServiceClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client AddressRuleServiceClient, err error) { + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newAddressRuleServiceClientFromBaseClient(baseClient, provider) +} + +// NewAddressRuleServiceClientWithOboToken Creates a new default AddressRuleService 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 NewAddressRuleServiceClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client AddressRuleServiceClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newAddressRuleServiceClientFromBaseClient(baseClient, configProvider) +} + +func newAddressRuleServiceClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client AddressRuleServiceClient, err error) { + // AddressRuleService service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("AddressRuleService")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = AddressRuleServiceClient{BaseClient: baseClient} + client.BasePath = "20191001" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *AddressRuleServiceClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://ospap.oracle.com") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *AddressRuleServiceClient) 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 *AddressRuleServiceClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// GetAddressRule Get the address rule for the compartment based on the country code +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/GetAddressRule.go.html to see an example of how to use GetAddressRule API. +// A default retry strategy applies to this operation GetAddressRule() +func (client AddressRuleServiceClient) GetAddressRule(ctx context.Context, request GetAddressRuleRequest) (response GetAddressRuleResponse, 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.getAddressRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAddressRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAddressRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAddressRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAddressRuleResponse") + } + return +} + +// getAddressRule implements the OCIOperation interface (enables retrying operations) +func (client AddressRuleServiceClient) getAddressRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/addressRules/{countryCode}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAddressRuleResponse + 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, "AddressRuleService", "GetAddressRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/ospgateway/ospgateway_addressservice_client.go b/ospgateway/ospgateway_addressservice_client.go new file mode 100644 index 0000000000..eaefeb00ba --- /dev/null +++ b/ospgateway/ospgateway_addressservice_client.go @@ -0,0 +1,210 @@ +// 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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// AddressServiceClient a client for AddressService +type AddressServiceClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewAddressServiceClientWithConfigurationProvider Creates a new default AddressService client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewAddressServiceClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client AddressServiceClient, err error) { + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newAddressServiceClientFromBaseClient(baseClient, provider) +} + +// NewAddressServiceClientWithOboToken Creates a new default AddressService 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 NewAddressServiceClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client AddressServiceClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newAddressServiceClientFromBaseClient(baseClient, configProvider) +} + +func newAddressServiceClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client AddressServiceClient, err error) { + // AddressService service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("AddressService")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = AddressServiceClient{BaseClient: baseClient} + client.BasePath = "20191001" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *AddressServiceClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("ospgateway", "https://ospap.oracle.com") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *AddressServiceClient) 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 *AddressServiceClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// GetAddress Get the address by id for the compartment +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/GetAddress.go.html to see an example of how to use GetAddress API. +// A default retry strategy applies to this operation GetAddress() +func (client AddressServiceClient) GetAddress(ctx context.Context, request GetAddressRequest) (response GetAddressResponse, 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.getAddress, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAddressResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAddressResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAddressResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAddressResponse") + } + return +} + +// getAddress implements the OCIOperation interface (enables retrying operations) +func (client AddressServiceClient) getAddress(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/addresses/{addressId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAddressResponse + 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, "AddressService", "GetAddress", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// VerifyAddress Verify address +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/VerifyAddress.go.html to see an example of how to use VerifyAddress API. +// A default retry strategy applies to this operation VerifyAddress() +func (client AddressServiceClient) VerifyAddress(ctx context.Context, request VerifyAddressRequest) (response VerifyAddressResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.verifyAddress, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = VerifyAddressResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = VerifyAddressResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(VerifyAddressResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into VerifyAddressResponse") + } + return +} + +// verifyAddress implements the OCIOperation interface (enables retrying operations) +func (client AddressServiceClient) verifyAddress(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/addresses/action/verification", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response VerifyAddressResponse + 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, "AddressService", "VerifyAddress", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/ospgateway/ospgateway_invoiceservice_client.go b/ospgateway/ospgateway_invoiceservice_client.go index ae97908538..174d786d43 100644 --- a/ospgateway/ospgateway_invoiceservice_client.go +++ b/ospgateway/ospgateway_invoiceservice_client.go @@ -93,9 +93,10 @@ func (client *InvoiceServiceClient) ConfigurationProvider() *common.Configuratio // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/DownloadPdfContent.go.html to see an example of how to use DownloadPdfContent API. +// A default retry strategy applies to this operation DownloadPdfContent() func (client InvoiceServiceClient) DownloadPdfContent(ctx context.Context, request DownloadPdfContentRequest) (response DownloadPdfContentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -149,9 +150,10 @@ func (client InvoiceServiceClient) downloadPdfContent(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/GetInvoice.go.html to see an example of how to use GetInvoice API. +// A default retry strategy applies to this operation GetInvoice() func (client InvoiceServiceClient) GetInvoice(ctx context.Context, request GetInvoiceRequest) (response GetInvoiceResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -206,9 +208,10 @@ func (client InvoiceServiceClient) getInvoice(ctx context.Context, request commo // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/ListInvoiceLines.go.html to see an example of how to use ListInvoiceLines API. +// A default retry strategy applies to this operation ListInvoiceLines() func (client InvoiceServiceClient) ListInvoiceLines(ctx context.Context, request ListInvoiceLinesRequest) (response ListInvoiceLinesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -263,9 +266,10 @@ func (client InvoiceServiceClient) listInvoiceLines(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/ListInvoices.go.html to see an example of how to use ListInvoices API. +// A default retry strategy applies to this operation ListInvoices() func (client InvoiceServiceClient) ListInvoices(ctx context.Context, request ListInvoicesRequest) (response ListInvoicesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -320,9 +324,10 @@ func (client InvoiceServiceClient) listInvoices(ctx context.Context, request com // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/PayInvoice.go.html to see an example of how to use PayInvoice API. +// A default retry strategy applies to this operation PayInvoice() func (client InvoiceServiceClient) PayInvoice(ctx context.Context, request PayInvoiceRequest) (response PayInvoiceResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } diff --git a/ospgateway/ospgateway_subscriptionservice_client.go b/ospgateway/ospgateway_subscriptionservice_client.go index ec1aa82fea..621e07147c 100644 --- a/ospgateway/ospgateway_subscriptionservice_client.go +++ b/ospgateway/ospgateway_subscriptionservice_client.go @@ -93,9 +93,10 @@ func (client *SubscriptionServiceClient) ConfigurationProvider() *common.Configu // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/AuthorizeSubscriptionPayment.go.html to see an example of how to use AuthorizeSubscriptionPayment API. +// A default retry strategy applies to this operation AuthorizeSubscriptionPayment() func (client SubscriptionServiceClient) AuthorizeSubscriptionPayment(ctx context.Context, request AuthorizeSubscriptionPaymentRequest) (response AuthorizeSubscriptionPaymentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -155,9 +156,10 @@ func (client SubscriptionServiceClient) authorizeSubscriptionPayment(ctx context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/GetSubscription.go.html to see an example of how to use GetSubscription API. +// A default retry strategy applies to this operation GetSubscription() func (client SubscriptionServiceClient) GetSubscription(ctx context.Context, request GetSubscriptionRequest) (response GetSubscriptionResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -212,9 +214,10 @@ func (client SubscriptionServiceClient) getSubscription(ctx context.Context, req // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/ListSubscriptions.go.html to see an example of how to use ListSubscriptions API. +// A default retry strategy applies to this operation ListSubscriptions() func (client SubscriptionServiceClient) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (response ListSubscriptionsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -269,9 +272,10 @@ func (client SubscriptionServiceClient) listSubscriptions(ctx context.Context, r // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/PaySubscription.go.html to see an example of how to use PaySubscription API. +// A default retry strategy applies to this operation PaySubscription() func (client SubscriptionServiceClient) PaySubscription(ctx context.Context, request PaySubscriptionRequest) (response PaySubscriptionResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -331,9 +335,10 @@ func (client SubscriptionServiceClient) paySubscription(ctx context.Context, req // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/UpdateSubscription.go.html to see an example of how to use UpdateSubscription API. +// A default retry strategy applies to this operation UpdateSubscription() func (client SubscriptionServiceClient) UpdateSubscription(ctx context.Context, request UpdateSubscriptionRequest) (response UpdateSubscriptionResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } diff --git a/ospgateway/other_payment_detail.go b/ospgateway/other_payment_detail.go index ee40f1d013..a69d862a45 100644 --- a/ospgateway/other_payment_detail.go +++ b/ospgateway/other_payment_detail.go @@ -97,33 +97,42 @@ type OtherPaymentDetailCreditCardTypeEnum string // Set of constants representing the allowable values for OtherPaymentDetailCreditCardTypeEnum const ( - OtherPaymentDetailCreditCardTypeVisa OtherPaymentDetailCreditCardTypeEnum = "VISA" - OtherPaymentDetailCreditCardTypeAmex OtherPaymentDetailCreditCardTypeEnum = "AMEX" - OtherPaymentDetailCreditCardTypeMastercard OtherPaymentDetailCreditCardTypeEnum = "MASTERCARD" - OtherPaymentDetailCreditCardTypeDiscover OtherPaymentDetailCreditCardTypeEnum = "DISCOVER" - OtherPaymentDetailCreditCardTypeJcb OtherPaymentDetailCreditCardTypeEnum = "JCB" - OtherPaymentDetailCreditCardTypeDiner OtherPaymentDetailCreditCardTypeEnum = "DINER" - OtherPaymentDetailCreditCardTypeElo OtherPaymentDetailCreditCardTypeEnum = "ELO" + OtherPaymentDetailCreditCardTypeVisa OtherPaymentDetailCreditCardTypeEnum = "VISA" + OtherPaymentDetailCreditCardTypeAmex OtherPaymentDetailCreditCardTypeEnum = "AMEX" + OtherPaymentDetailCreditCardTypeMastercard OtherPaymentDetailCreditCardTypeEnum = "MASTERCARD" + OtherPaymentDetailCreditCardTypeDiscover OtherPaymentDetailCreditCardTypeEnum = "DISCOVER" + OtherPaymentDetailCreditCardTypeJcb OtherPaymentDetailCreditCardTypeEnum = "JCB" + OtherPaymentDetailCreditCardTypeDiner OtherPaymentDetailCreditCardTypeEnum = "DINER" + OtherPaymentDetailCreditCardTypeElo OtherPaymentDetailCreditCardTypeEnum = "ELO" + OtherPaymentDetailCreditCardTypeSaving OtherPaymentDetailCreditCardTypeEnum = "SAVING" + OtherPaymentDetailCreditCardTypeChecking OtherPaymentDetailCreditCardTypeEnum = "CHECKING" + OtherPaymentDetailCreditCardTypeCorporateChecking OtherPaymentDetailCreditCardTypeEnum = "CORPORATE_CHECKING" ) var mappingOtherPaymentDetailCreditCardTypeEnum = map[string]OtherPaymentDetailCreditCardTypeEnum{ - "VISA": OtherPaymentDetailCreditCardTypeVisa, - "AMEX": OtherPaymentDetailCreditCardTypeAmex, - "MASTERCARD": OtherPaymentDetailCreditCardTypeMastercard, - "DISCOVER": OtherPaymentDetailCreditCardTypeDiscover, - "JCB": OtherPaymentDetailCreditCardTypeJcb, - "DINER": OtherPaymentDetailCreditCardTypeDiner, - "ELO": OtherPaymentDetailCreditCardTypeElo, + "VISA": OtherPaymentDetailCreditCardTypeVisa, + "AMEX": OtherPaymentDetailCreditCardTypeAmex, + "MASTERCARD": OtherPaymentDetailCreditCardTypeMastercard, + "DISCOVER": OtherPaymentDetailCreditCardTypeDiscover, + "JCB": OtherPaymentDetailCreditCardTypeJcb, + "DINER": OtherPaymentDetailCreditCardTypeDiner, + "ELO": OtherPaymentDetailCreditCardTypeElo, + "SAVING": OtherPaymentDetailCreditCardTypeSaving, + "CHECKING": OtherPaymentDetailCreditCardTypeChecking, + "CORPORATE_CHECKING": OtherPaymentDetailCreditCardTypeCorporateChecking, } var mappingOtherPaymentDetailCreditCardTypeEnumLowerCase = map[string]OtherPaymentDetailCreditCardTypeEnum{ - "visa": OtherPaymentDetailCreditCardTypeVisa, - "amex": OtherPaymentDetailCreditCardTypeAmex, - "mastercard": OtherPaymentDetailCreditCardTypeMastercard, - "discover": OtherPaymentDetailCreditCardTypeDiscover, - "jcb": OtherPaymentDetailCreditCardTypeJcb, - "diner": OtherPaymentDetailCreditCardTypeDiner, - "elo": OtherPaymentDetailCreditCardTypeElo, + "visa": OtherPaymentDetailCreditCardTypeVisa, + "amex": OtherPaymentDetailCreditCardTypeAmex, + "mastercard": OtherPaymentDetailCreditCardTypeMastercard, + "discover": OtherPaymentDetailCreditCardTypeDiscover, + "jcb": OtherPaymentDetailCreditCardTypeJcb, + "diner": OtherPaymentDetailCreditCardTypeDiner, + "elo": OtherPaymentDetailCreditCardTypeElo, + "saving": OtherPaymentDetailCreditCardTypeSaving, + "checking": OtherPaymentDetailCreditCardTypeChecking, + "corporate_checking": OtherPaymentDetailCreditCardTypeCorporateChecking, } // GetOtherPaymentDetailCreditCardTypeEnumValues Enumerates the set of values for OtherPaymentDetailCreditCardTypeEnum @@ -145,6 +154,9 @@ func GetOtherPaymentDetailCreditCardTypeEnumStringValues() []string { "JCB", "DINER", "ELO", + "SAVING", + "CHECKING", + "CORPORATE_CHECKING", } } diff --git a/ospgateway/payment_detail.go b/ospgateway/payment_detail.go index cb5bc81643..0b4d409b37 100644 --- a/ospgateway/payment_detail.go +++ b/ospgateway/payment_detail.go @@ -65,6 +65,10 @@ func (m *paymentdetail) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro var err error switch m.PaymentMethod { + case "ECHECK": + mm := EcheckPaymentDetail{} + err = json.Unmarshal(data, &mm) + return mm, err case "OTHER": mm := OtherPaymentDetail{} err = json.Unmarshal(data, &mm) @@ -121,18 +125,21 @@ type PaymentDetailPaymentMethodEnum string const ( PaymentDetailPaymentMethodCreditCard PaymentDetailPaymentMethodEnum = "CREDIT_CARD" PaymentDetailPaymentMethodPaypal PaymentDetailPaymentMethodEnum = "PAYPAL" + PaymentDetailPaymentMethodEcheck PaymentDetailPaymentMethodEnum = "ECHECK" PaymentDetailPaymentMethodOther PaymentDetailPaymentMethodEnum = "OTHER" ) var mappingPaymentDetailPaymentMethodEnum = map[string]PaymentDetailPaymentMethodEnum{ "CREDIT_CARD": PaymentDetailPaymentMethodCreditCard, "PAYPAL": PaymentDetailPaymentMethodPaypal, + "ECHECK": PaymentDetailPaymentMethodEcheck, "OTHER": PaymentDetailPaymentMethodOther, } var mappingPaymentDetailPaymentMethodEnumLowerCase = map[string]PaymentDetailPaymentMethodEnum{ "credit_card": PaymentDetailPaymentMethodCreditCard, "paypal": PaymentDetailPaymentMethodPaypal, + "echeck": PaymentDetailPaymentMethodEcheck, "other": PaymentDetailPaymentMethodOther, } @@ -150,6 +157,7 @@ func GetPaymentDetailPaymentMethodEnumStringValues() []string { return []string{ "CREDIT_CARD", "PAYPAL", + "ECHECK", "OTHER", } } diff --git a/ospgateway/subscription.go b/ospgateway/subscription.go index 9b9240b626..cd0cdb27d8 100644 --- a/ospgateway/subscription.go +++ b/ospgateway/subscription.go @@ -61,6 +61,9 @@ type Subscription struct { // This field is used to describe the Upgrade State in case of error (E.g. Upgrade failure caused by interfacing Tax details- TaxError) UpgradeStateDetails SubscriptionUpgradeStateDetailsEnum `mandatory:"false" json:"upgradeStateDetails,omitempty"` + // Account type. + AccountType SubscriptionAccountTypeEnum `mandatory:"false" json:"accountType,omitempty"` + TaxInfo *TaxInfo `mandatory:"false" json:"taxInfo"` // Payment option list of a subscription. @@ -68,10 +71,13 @@ type Subscription struct { PaymentGateway *PaymentGateway `mandatory:"false" json:"paymentGateway"` - BillingAddress *BillingAddress `mandatory:"false" json:"billingAddress"` + BillingAddress *Address `mandatory:"false" json:"billingAddress"` // Date of upgrade/conversion when planType changed from FREE_TIER to PAYG TimePlanUpgrade *common.SDKTime `mandatory:"false" json:"timePlanUpgrade"` + + // Date of upgrade/conversion when account type changed from PERSONAL to CORPORATE + TimePersonalToCorporateConv *common.SDKTime `mandatory:"false" json:"timePersonalToCorporateConv"` } func (m Subscription) String() string { @@ -93,6 +99,9 @@ func (m Subscription) ValidateEnumValue() (bool, error) { if _, ok := GetMappingSubscriptionUpgradeStateDetailsEnum(string(m.UpgradeStateDetails)); !ok && m.UpgradeStateDetails != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for UpgradeStateDetails: %s. Supported values are: %s.", m.UpgradeStateDetails, strings.Join(GetSubscriptionUpgradeStateDetailsEnumStringValues(), ","))) } + if _, ok := GetMappingSubscriptionAccountTypeEnum(string(m.AccountType)); !ok && m.AccountType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccountType: %s. Supported values are: %s.", m.AccountType, strings.Join(GetSubscriptionAccountTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -102,25 +111,27 @@ func (m Subscription) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *Subscription) UnmarshalJSON(data []byte) (e error) { model := struct { - Id *string `json:"id"` - PlanType SubscriptionPlanTypeEnum `json:"planType"` - TimeStart *common.SDKTime `json:"timeStart"` - ShipToCustAcctSiteId *string `json:"shipToCustAcctSiteId"` - ShipToCustAcctRoleId *string `json:"shipToCustAcctRoleId"` - BillToCustAccountId *string `json:"billToCustAccountId"` - IsIntentToPay *bool `json:"isIntentToPay"` - CurrencyCode *string `json:"currencyCode"` - GsiOrgCode *string `json:"gsiOrgCode"` - LanguageCode *string `json:"languageCode"` - OrganizationId *string `json:"organizationId"` - UpgradeState SubscriptionUpgradeStateEnum `json:"upgradeState"` - UpgradeStateDetails SubscriptionUpgradeStateDetailsEnum `json:"upgradeStateDetails"` - TaxInfo *TaxInfo `json:"taxInfo"` - PaymentOptions []paymentoption `json:"paymentOptions"` - PaymentGateway *PaymentGateway `json:"paymentGateway"` - BillingAddress *BillingAddress `json:"billingAddress"` - TimePlanUpgrade *common.SDKTime `json:"timePlanUpgrade"` - SubscriptionPlanNumber *string `json:"subscriptionPlanNumber"` + Id *string `json:"id"` + PlanType SubscriptionPlanTypeEnum `json:"planType"` + TimeStart *common.SDKTime `json:"timeStart"` + ShipToCustAcctSiteId *string `json:"shipToCustAcctSiteId"` + ShipToCustAcctRoleId *string `json:"shipToCustAcctRoleId"` + BillToCustAccountId *string `json:"billToCustAccountId"` + IsIntentToPay *bool `json:"isIntentToPay"` + CurrencyCode *string `json:"currencyCode"` + GsiOrgCode *string `json:"gsiOrgCode"` + LanguageCode *string `json:"languageCode"` + OrganizationId *string `json:"organizationId"` + UpgradeState SubscriptionUpgradeStateEnum `json:"upgradeState"` + UpgradeStateDetails SubscriptionUpgradeStateDetailsEnum `json:"upgradeStateDetails"` + AccountType SubscriptionAccountTypeEnum `json:"accountType"` + TaxInfo *TaxInfo `json:"taxInfo"` + PaymentOptions []paymentoption `json:"paymentOptions"` + PaymentGateway *PaymentGateway `json:"paymentGateway"` + BillingAddress *Address `json:"billingAddress"` + TimePlanUpgrade *common.SDKTime `json:"timePlanUpgrade"` + TimePersonalToCorporateConv *common.SDKTime `json:"timePersonalToCorporateConv"` + SubscriptionPlanNumber *string `json:"subscriptionPlanNumber"` }{} e = json.Unmarshal(data, &model) @@ -154,6 +165,8 @@ func (m *Subscription) UnmarshalJSON(data []byte) (e error) { m.UpgradeStateDetails = model.UpgradeStateDetails + m.AccountType = model.AccountType + m.TaxInfo = model.TaxInfo m.PaymentOptions = make([]PaymentOption, len(model.PaymentOptions)) @@ -175,6 +188,8 @@ func (m *Subscription) UnmarshalJSON(data []byte) (e error) { m.TimePlanUpgrade = model.TimePlanUpgrade + m.TimePersonalToCorporateConv = model.TimePersonalToCorporateConv + m.SubscriptionPlanNumber = model.SubscriptionPlanNumber return @@ -313,3 +328,49 @@ func GetMappingSubscriptionUpgradeStateDetailsEnum(val string) (SubscriptionUpgr enum, ok := mappingSubscriptionUpgradeStateDetailsEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// SubscriptionAccountTypeEnum Enum with underlying type: string +type SubscriptionAccountTypeEnum string + +// Set of constants representing the allowable values for SubscriptionAccountTypeEnum +const ( + SubscriptionAccountTypePersonal SubscriptionAccountTypeEnum = "PERSONAL" + SubscriptionAccountTypeCorporate SubscriptionAccountTypeEnum = "CORPORATE" + SubscriptionAccountTypeCorporateSubmitted SubscriptionAccountTypeEnum = "CORPORATE_SUBMITTED" +) + +var mappingSubscriptionAccountTypeEnum = map[string]SubscriptionAccountTypeEnum{ + "PERSONAL": SubscriptionAccountTypePersonal, + "CORPORATE": SubscriptionAccountTypeCorporate, + "CORPORATE_SUBMITTED": SubscriptionAccountTypeCorporateSubmitted, +} + +var mappingSubscriptionAccountTypeEnumLowerCase = map[string]SubscriptionAccountTypeEnum{ + "personal": SubscriptionAccountTypePersonal, + "corporate": SubscriptionAccountTypeCorporate, + "corporate_submitted": SubscriptionAccountTypeCorporateSubmitted, +} + +// GetSubscriptionAccountTypeEnumValues Enumerates the set of values for SubscriptionAccountTypeEnum +func GetSubscriptionAccountTypeEnumValues() []SubscriptionAccountTypeEnum { + values := make([]SubscriptionAccountTypeEnum, 0) + for _, v := range mappingSubscriptionAccountTypeEnum { + values = append(values, v) + } + return values +} + +// GetSubscriptionAccountTypeEnumStringValues Enumerates the set of values in String for SubscriptionAccountTypeEnum +func GetSubscriptionAccountTypeEnumStringValues() []string { + return []string{ + "PERSONAL", + "CORPORATE", + "CORPORATE_SUBMITTED", + } +} + +// GetMappingSubscriptionAccountTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSubscriptionAccountTypeEnum(val string) (SubscriptionAccountTypeEnum, bool) { + enum, ok := mappingSubscriptionAccountTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/ospgateway/subscription_summary.go b/ospgateway/subscription_summary.go index 5006acc88e..3209c7eef9 100644 --- a/ospgateway/subscription_summary.go +++ b/ospgateway/subscription_summary.go @@ -61,6 +61,9 @@ type SubscriptionSummary struct { // This field is used to describe the Upgrade State in case of error (E.g. Upgrade failure caused by interfacing Tax details- TaxError) UpgradeStateDetails SubscriptionSummaryUpgradeStateDetailsEnum `mandatory:"false" json:"upgradeStateDetails,omitempty"` + // Account type. + AccountType SubscriptionSummaryAccountTypeEnum `mandatory:"false" json:"accountType,omitempty"` + TaxInfo *TaxInfo `mandatory:"false" json:"taxInfo"` // Payment option list of a subscription. @@ -68,10 +71,13 @@ type SubscriptionSummary struct { PaymentGateway *PaymentGateway `mandatory:"false" json:"paymentGateway"` - BillingAddress *BillingAddress `mandatory:"false" json:"billingAddress"` + BillingAddress *Address `mandatory:"false" json:"billingAddress"` // Date of upgrade/conversion when planType changed from FREE_TIER to PAYG TimePlanUpgrade *common.SDKTime `mandatory:"false" json:"timePlanUpgrade"` + + // Date of upgrade/conversion when account type changed from PERSONAL to CORPORATE + TimePersonalToCorporateConv *common.SDKTime `mandatory:"false" json:"timePersonalToCorporateConv"` } func (m SubscriptionSummary) String() string { @@ -93,6 +99,9 @@ func (m SubscriptionSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingSubscriptionSummaryUpgradeStateDetailsEnum(string(m.UpgradeStateDetails)); !ok && m.UpgradeStateDetails != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for UpgradeStateDetails: %s. Supported values are: %s.", m.UpgradeStateDetails, strings.Join(GetSubscriptionSummaryUpgradeStateDetailsEnumStringValues(), ","))) } + if _, ok := GetMappingSubscriptionSummaryAccountTypeEnum(string(m.AccountType)); !ok && m.AccountType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccountType: %s. Supported values are: %s.", m.AccountType, strings.Join(GetSubscriptionSummaryAccountTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -102,25 +111,27 @@ func (m SubscriptionSummary) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *SubscriptionSummary) UnmarshalJSON(data []byte) (e error) { model := struct { - Id *string `json:"id"` - PlanType SubscriptionSummaryPlanTypeEnum `json:"planType"` - TimeStart *common.SDKTime `json:"timeStart"` - ShipToCustAcctSiteId *string `json:"shipToCustAcctSiteId"` - ShipToCustAcctRoleId *string `json:"shipToCustAcctRoleId"` - BillToCustAccountId *string `json:"billToCustAccountId"` - IsIntentToPay *bool `json:"isIntentToPay"` - CurrencyCode *string `json:"currencyCode"` - GsiOrgCode *string `json:"gsiOrgCode"` - LanguageCode *string `json:"languageCode"` - OrganizationId *string `json:"organizationId"` - UpgradeState SubscriptionSummaryUpgradeStateEnum `json:"upgradeState"` - UpgradeStateDetails SubscriptionSummaryUpgradeStateDetailsEnum `json:"upgradeStateDetails"` - TaxInfo *TaxInfo `json:"taxInfo"` - PaymentOptions []paymentoption `json:"paymentOptions"` - PaymentGateway *PaymentGateway `json:"paymentGateway"` - BillingAddress *BillingAddress `json:"billingAddress"` - TimePlanUpgrade *common.SDKTime `json:"timePlanUpgrade"` - SubscriptionPlanNumber *string `json:"subscriptionPlanNumber"` + Id *string `json:"id"` + PlanType SubscriptionSummaryPlanTypeEnum `json:"planType"` + TimeStart *common.SDKTime `json:"timeStart"` + ShipToCustAcctSiteId *string `json:"shipToCustAcctSiteId"` + ShipToCustAcctRoleId *string `json:"shipToCustAcctRoleId"` + BillToCustAccountId *string `json:"billToCustAccountId"` + IsIntentToPay *bool `json:"isIntentToPay"` + CurrencyCode *string `json:"currencyCode"` + GsiOrgCode *string `json:"gsiOrgCode"` + LanguageCode *string `json:"languageCode"` + OrganizationId *string `json:"organizationId"` + UpgradeState SubscriptionSummaryUpgradeStateEnum `json:"upgradeState"` + UpgradeStateDetails SubscriptionSummaryUpgradeStateDetailsEnum `json:"upgradeStateDetails"` + AccountType SubscriptionSummaryAccountTypeEnum `json:"accountType"` + TaxInfo *TaxInfo `json:"taxInfo"` + PaymentOptions []paymentoption `json:"paymentOptions"` + PaymentGateway *PaymentGateway `json:"paymentGateway"` + BillingAddress *Address `json:"billingAddress"` + TimePlanUpgrade *common.SDKTime `json:"timePlanUpgrade"` + TimePersonalToCorporateConv *common.SDKTime `json:"timePersonalToCorporateConv"` + SubscriptionPlanNumber *string `json:"subscriptionPlanNumber"` }{} e = json.Unmarshal(data, &model) @@ -154,6 +165,8 @@ func (m *SubscriptionSummary) UnmarshalJSON(data []byte) (e error) { m.UpgradeStateDetails = model.UpgradeStateDetails + m.AccountType = model.AccountType + m.TaxInfo = model.TaxInfo m.PaymentOptions = make([]PaymentOption, len(model.PaymentOptions)) @@ -175,6 +188,8 @@ func (m *SubscriptionSummary) UnmarshalJSON(data []byte) (e error) { m.TimePlanUpgrade = model.TimePlanUpgrade + m.TimePersonalToCorporateConv = model.TimePersonalToCorporateConv + m.SubscriptionPlanNumber = model.SubscriptionPlanNumber return @@ -313,3 +328,49 @@ func GetMappingSubscriptionSummaryUpgradeStateDetailsEnum(val string) (Subscript enum, ok := mappingSubscriptionSummaryUpgradeStateDetailsEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// SubscriptionSummaryAccountTypeEnum Enum with underlying type: string +type SubscriptionSummaryAccountTypeEnum string + +// Set of constants representing the allowable values for SubscriptionSummaryAccountTypeEnum +const ( + SubscriptionSummaryAccountTypePersonal SubscriptionSummaryAccountTypeEnum = "PERSONAL" + SubscriptionSummaryAccountTypeCorporate SubscriptionSummaryAccountTypeEnum = "CORPORATE" + SubscriptionSummaryAccountTypeCorporateSubmitted SubscriptionSummaryAccountTypeEnum = "CORPORATE_SUBMITTED" +) + +var mappingSubscriptionSummaryAccountTypeEnum = map[string]SubscriptionSummaryAccountTypeEnum{ + "PERSONAL": SubscriptionSummaryAccountTypePersonal, + "CORPORATE": SubscriptionSummaryAccountTypeCorporate, + "CORPORATE_SUBMITTED": SubscriptionSummaryAccountTypeCorporateSubmitted, +} + +var mappingSubscriptionSummaryAccountTypeEnumLowerCase = map[string]SubscriptionSummaryAccountTypeEnum{ + "personal": SubscriptionSummaryAccountTypePersonal, + "corporate": SubscriptionSummaryAccountTypeCorporate, + "corporate_submitted": SubscriptionSummaryAccountTypeCorporateSubmitted, +} + +// GetSubscriptionSummaryAccountTypeEnumValues Enumerates the set of values for SubscriptionSummaryAccountTypeEnum +func GetSubscriptionSummaryAccountTypeEnumValues() []SubscriptionSummaryAccountTypeEnum { + values := make([]SubscriptionSummaryAccountTypeEnum, 0) + for _, v := range mappingSubscriptionSummaryAccountTypeEnum { + values = append(values, v) + } + return values +} + +// GetSubscriptionSummaryAccountTypeEnumStringValues Enumerates the set of values in String for SubscriptionSummaryAccountTypeEnum +func GetSubscriptionSummaryAccountTypeEnumStringValues() []string { + return []string{ + "PERSONAL", + "CORPORATE", + "CORPORATE_SUBMITTED", + } +} + +// GetMappingSubscriptionSummaryAccountTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSubscriptionSummaryAccountTypeEnum(val string) (SubscriptionSummaryAccountTypeEnum, bool) { + enum, ok := mappingSubscriptionSummaryAccountTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/ospgateway/tax_type_rule.go b/ospgateway/tax_type_rule.go new file mode 100644 index 0000000000..6bdcba49a0 --- /dev/null +++ b/ospgateway/tax_type_rule.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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TaxTypeRule Tax type rule information +type TaxTypeRule struct { + + // Tax type rule fields + Fields []Field `mandatory:"true" json:"fields"` +} + +func (m TaxTypeRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TaxTypeRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/third_party_validation_type.go b/ospgateway/third_party_validation_type.go new file mode 100644 index 0000000000..77557d1a74 --- /dev/null +++ b/ospgateway/third_party_validation_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "strings" +) + +// ThirdPartyValidationTypeEnum Enum with underlying type: string +type ThirdPartyValidationTypeEnum string + +// Set of constants representing the allowable values for ThirdPartyValidationTypeEnum +const ( + ThirdPartyValidationTypeOptional ThirdPartyValidationTypeEnum = "OPTIONAL" + ThirdPartyValidationTypeRequired ThirdPartyValidationTypeEnum = "REQUIRED" + ThirdPartyValidationTypeNever ThirdPartyValidationTypeEnum = "NEVER" +) + +var mappingThirdPartyValidationTypeEnum = map[string]ThirdPartyValidationTypeEnum{ + "OPTIONAL": ThirdPartyValidationTypeOptional, + "REQUIRED": ThirdPartyValidationTypeRequired, + "NEVER": ThirdPartyValidationTypeNever, +} + +var mappingThirdPartyValidationTypeEnumLowerCase = map[string]ThirdPartyValidationTypeEnum{ + "optional": ThirdPartyValidationTypeOptional, + "required": ThirdPartyValidationTypeRequired, + "never": ThirdPartyValidationTypeNever, +} + +// GetThirdPartyValidationTypeEnumValues Enumerates the set of values for ThirdPartyValidationTypeEnum +func GetThirdPartyValidationTypeEnumValues() []ThirdPartyValidationTypeEnum { + values := make([]ThirdPartyValidationTypeEnum, 0) + for _, v := range mappingThirdPartyValidationTypeEnum { + values = append(values, v) + } + return values +} + +// GetThirdPartyValidationTypeEnumStringValues Enumerates the set of values in String for ThirdPartyValidationTypeEnum +func GetThirdPartyValidationTypeEnumStringValues() []string { + return []string{ + "OPTIONAL", + "REQUIRED", + "NEVER", + } +} + +// GetMappingThirdPartyValidationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingThirdPartyValidationTypeEnum(val string) (ThirdPartyValidationTypeEnum, bool) { + enum, ok := mappingThirdPartyValidationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/ospgateway/verify_address_details.go b/ospgateway/verify_address_details.go new file mode 100644 index 0000000000..f14ef5c3a5 --- /dev/null +++ b/ospgateway/verify_address_details.go @@ -0,0 +1,114 @@ +// 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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VerifyAddressDetails Verify address related details +type VerifyAddressDetails struct { + + // Address identifier. + AddressKey *string `mandatory:"false" json:"addressKey"` + + // Address line 1. + Line1 *string `mandatory:"false" json:"line1"` + + // Address line 2. + Line2 *string `mandatory:"false" json:"line2"` + + // Address line 3. + Line3 *string `mandatory:"false" json:"line3"` + + // Address line 4. + Line4 *string `mandatory:"false" json:"line4"` + + // Street name of the address. + StreetName *string `mandatory:"false" json:"streetName"` + + // Street number of the address. + StreetNumber *string `mandatory:"false" json:"streetNumber"` + + // Name of the city. + City *string `mandatory:"false" json:"city"` + + // County of the address. + County *string `mandatory:"false" json:"county"` + + // Country of the address. + Country *string `mandatory:"false" json:"country"` + + // Province of the address. + Province *string `mandatory:"false" json:"province"` + + // Post code of the address. + PostalCode *string `mandatory:"false" json:"postalCode"` + + // State of the address. + State *string `mandatory:"false" json:"state"` + + // Contact person email address. + EmailAddress *string `mandatory:"false" json:"emailAddress"` + + // Name of the customer company. + CompanyName *string `mandatory:"false" json:"companyName"` + + // First name of the contact person. + FirstName *string `mandatory:"false" json:"firstName"` + + // Middle name of the contact person. + MiddleName *string `mandatory:"false" json:"middleName"` + + // Last name of the contact person. + LastName *string `mandatory:"false" json:"lastName"` + + // Phone country code of the contact person. + PhoneCountryCode *string `mandatory:"false" json:"phoneCountryCode"` + + // Phone number of the contact person. + PhoneNumber *string `mandatory:"false" json:"phoneNumber"` + + // Job title of the contact person. + JobTitle *string `mandatory:"false" json:"jobTitle"` + + // Department name of the customer company. + DepartmentName *string `mandatory:"false" json:"departmentName"` + + // Internal number of the customer company. + InternalNumber *string `mandatory:"false" json:"internalNumber"` + + // Contributor class of the customer company. + ContributorClass *string `mandatory:"false" json:"contributorClass"` + + // State Inscription. + StateInscription *string `mandatory:"false" json:"stateInscription"` + + // Municipal Inscription. + MunicipalInscription *string `mandatory:"false" json:"municipalInscription"` +} + +func (m VerifyAddressDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VerifyAddressDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/verify_address_receipt.go b/ospgateway/verify_address_receipt.go new file mode 100644 index 0000000000..ae63617f93 --- /dev/null +++ b/ospgateway/verify_address_receipt.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. + +// OSP Gateway API +// +// This site describes all the Rest endpoints of OSP Gateway. +// + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VerifyAddressReceipt Address verficiation result +type VerifyAddressReceipt struct { + Address *Address `mandatory:"true" json:"address"` + + // Address quality type. + Quality AddressQualityTypeEnum `mandatory:"true" json:"quality"` + + // Address verification code. + VerificationCode AddressVerificationCodeEnum `mandatory:"true" json:"verificationCode"` +} + +func (m VerifyAddressReceipt) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VerifyAddressReceipt) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAddressQualityTypeEnum(string(m.Quality)); !ok && m.Quality != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Quality: %s. Supported values are: %s.", m.Quality, strings.Join(GetAddressQualityTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingAddressVerificationCodeEnum(string(m.VerificationCode)); !ok && m.VerificationCode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for VerificationCode: %s. Supported values are: %s.", m.VerificationCode, strings.Join(GetAddressVerificationCodeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/ospgateway/verify_address_request_response.go b/ospgateway/verify_address_request_response.go new file mode 100644 index 0000000000..00320da22f --- /dev/null +++ b/ospgateway/verify_address_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package ospgateway + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// VerifyAddressRequest wrapper for the VerifyAddress operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ospgateway/VerifyAddress.go.html to see an example of how to use VerifyAddressRequest. +type VerifyAddressRequest struct { + + // The home region's public name of the logged in user. + OspHomeRegion *string `mandatory:"true" contributesTo:"query" name:"ospHomeRegion"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Address request. + VerifyAddressDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // For requests that are not idempotent (creates being the main place of interest), THE APIs should take a header + // called opc-retry-token to identify the customer desire across requests, to introduce some level of idempotency. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request VerifyAddressRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request VerifyAddressRequest) 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 VerifyAddressRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request VerifyAddressRequest) 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 VerifyAddressRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VerifyAddressResponse wrapper for the VerifyAddress operation +type VerifyAddressResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VerifyAddressReceipt instance + VerifyAddressReceipt `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 optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response VerifyAddressResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response VerifyAddressResponse) HTTPResponse() *http.Response { + return response.RawResponse +}