// This is an automatically generated code sample.
// To make this code sample work in your Oracle Cloud tenancy,
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
// boolean, number, and enum parameters with values not fitting your use case).
package main
import (
"context"
"fmt"
"time"
"github.com/oracle/oci-go-sdk/v65/common"
"github.com/oracle/oci-go-sdk/v65/dataintegration"
"github.com/oracle/oci-go-sdk/v65/example/helpers"
)
func ExampleCreateUserDefinedFunctionValidation() {
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
client, err := dataintegration.NewDataIntegrationClientWithConfigurationProvider(common.DefaultConfigProvider())
helpers.FatalIfError(err)
// Create a request and dependent object(s).
var defaultValue interface{}
defaultValue = "EXAMPLE-defaultValue-Value"
var wrappedType interface{}
wrappedType = "EXAMPLE-wrappedType-Value"
var objectValue interface{}
objectValue = "EXAMPLE-objectValue-Value"
var refValue interface{}
refValue = "EXAMPLE-refValue-Value"
var rootObjectValue interface{}
rootObjectValue = "EXAMPLE-rootObjectValue-Value"
req := dataintegration.CreateUserDefinedFunctionValidationRequest{CreateUserDefinedFunctionValidationDetails: dataintegration.CreateUserDefinedFunctionValidationDetails{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Signatures: []dataintegration.FunctionSignature{dataintegration.FunctionSignature{RetType: &dataintegration.ConfiguredType{Description: common.String("EXAMPLE-description-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(802),
ConfigDefinition: &dataintegration.ConfigDefinition{ObjectStatus: common.Int(195),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_3Vma3": dataintegration.ConfigParameterDefinition{ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
DefaultValue: &defaultValue,
Description: common.String("EXAMPLE-description-Value"),
IsClassFieldValue: common.Bool(true),
IsStatic: common.Bool(false),
ParameterName: common.String("EXAMPLE-parameterName-Value")}},
IsContained: common.Bool(false),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value")},
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
WrappedType: &wrappedType,
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_C6Poz": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(221)}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}},
Arguments: []dataintegration.TypedObject{dataintegration.DecisionOutputPort{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
DecisionOutputPortType: dataintegration.DecisionOutputPortDecisionOutputPortTypeTrue,
Key: common.String("EXAMPLE-key-Value"),
ObjectStatus: common.Int(320),
PortType: dataintegration.DecisionOutputPortPortTypeModel,
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_KP42o": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(834)}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
Description: common.String("EXAMPLE-description-Value")}},
ModelType: dataintegration.FunctionSignatureModelTypeDisFunctionSignature,
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(793),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Description: common.String("EXAMPLE-description-Value"),
Key: common.String("EXAMPLE-key-Value")}},
Expr: &dataintegration.Expression{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_ZuEPg": dataintegration.ConfigParameterValue{IntValue: common.Int(873),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value")}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
ExprString: common.String("EXAMPLE-exprString-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelType: common.String("EXAMPLE-modelType-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(775),
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")}},
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
KeyMap: map[string]string{"EXAMPLE_KEY_VjDhE": "EXAMPLE_VALUE_Uqq2iFlmjkQL2ZFiqf8G"},
Metadata: &dataintegration.ObjectMetadata{RegistryVersion: common.Int(130),
IsFavorite: common.Bool(true),
CreatedByName: common.String("EXAMPLE-createdByName-Value"),
InfoFields: map[string]string{"EXAMPLE_KEY_8iyqG": "EXAMPLE_VALUE_p7WFjxuw5ctywjXjROyD"},
Labels: []string{"EXAMPLE--Value"},
TimeUpdated: &common.SDKTime{Time: time.Now()},
UpdatedBy: common.String("EXAMPLE-updatedBy-Value"),
UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
Aggregator: &dataintegration.AggregatorSummary{Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
Type: common.String("EXAMPLE-type-Value"),
Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value")},
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(246),
ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataAsset}}},
CreatedBy: common.String("EXAMPLE-createdBy-Value"),
IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
TimeCreated: &common.SDKTime{Time: time.Now()}},
ObjectStatus: common.Int(275),
Description: common.String("EXAMPLE-description-Value"),
ModelType: dataintegration.CreateUserDefinedFunctionValidationDetailsModelTypeDisUserDefinedFunction,
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectVersion: common.Int(608)},
OpcRequestId: common.String("OKXKXVJDFPPZPOJUFLVL<unique_ID>"),
OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")}
// Send the request using the service client
resp, err := client.CreateUserDefinedFunctionValidation(context.Background(), req)
helpers.FatalIfError(err)
// Retrieve value from the response.
fmt.Println(resp)
}