// 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 rootObjectDefaultValue interface{}
	rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	var objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var wrappedType interface{}
	wrappedType = "EXAMPLE-wrappedType-Value"
	req := dataintegration.CreateUserDefinedFunctionValidationRequest{OpcRequestId: common.String("7PCT6XMPWE0FPRK781Q2<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		WorkspaceId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		CreateUserDefinedFunctionValidationDetails: dataintegration.CreateUserDefinedFunctionValidationDetails{KeyMap: map[string]string{"EXAMPLE_KEY_bdFtS": "EXAMPLE_VALUE_FOOGVtFagw4o46zjUG1T"},
			ObjectStatus:  common.Int(782),
			ObjectVersion: common.Int(129),
			Metadata: &dataintegration.ObjectMetadata{IsFavorite: common.Bool(false),
				RegistryVersion: common.Int(529),
				InfoFields:      map[string]string{"EXAMPLE_KEY_ax7Pa": "EXAMPLE_VALUE_rFhbfWxZZbMGPCvh6JYI"},
				Labels:          []string{"EXAMPLE--Value"},
				TimeCreated:     &common.SDKTime{Time: time.Now()},
				TimeUpdated:     &common.SDKTime{Time: time.Now()},
				UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
				UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
				Aggregator: &dataintegration.AggregatorSummary{Type: common.String("EXAMPLE-type-Value"),
					Description: common.String("EXAMPLE-description-Value"),
					Identifier:  common.String("EXAMPLE-identifier-Value"),
					Key:         common.String("EXAMPLE-key-Value"),
					Name:        common.String("EXAMPLE-name-Value")},
				AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
				CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(752),
					ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataAsset}}},
				CreatedBy:      common.String("EXAMPLE-createdBy-Value"),
				CreatedByName:  common.String("EXAMPLE-createdByName-Value"),
				IdentifierPath: common.String("EXAMPLE-identifierPath-Value")},
			ModelType:    dataintegration.CreateUserDefinedFunctionValidationDetailsModelTypeDisUserDefinedFunction,
			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")},
			Signatures: []dataintegration.FunctionSignature{dataintegration.FunctionSignature{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(120),
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				Arguments: []dataintegration.TypedObject{dataintegration.Parameter{Description: common.String("EXAMPLE-description-Value"),
					IsInput:                common.Bool(true),
					DefaultValue:           &defaultValue,
					Name:                   common.String("EXAMPLE-name-Value"),
					ObjectStatus:           common.Int(48),
					RootObjectDefaultValue: &rootObjectDefaultValue,
					Type:                   &type_,
					TypeName:               common.String("EXAMPLE-typeName-Value"),
					ConfigValues: &dataintegration.ConfigValues{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_WS0Fn": dataintegration.ConfigParameterValue{IntValue: common.Int(716),
							ObjectValue:     &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value")}}},
					IsOutput:              common.Bool(false),
					Key:                   common.String("EXAMPLE-key-Value"),
					OutputAggregationType: dataintegration.ParameterOutputAggregationTypeSum,
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					UsedFor:      common.String("EXAMPLE-usedFor-Value")}},
				Description: common.String("EXAMPLE-description-Value"),
				Key:         common.String("EXAMPLE-key-Value"),
				ModelType:   dataintegration.FunctionSignatureModelTypeDisFunctionSignature,
				RetType: &dataintegration.ConfiguredType{ObjectStatus: common.Int(962),
					WrappedType: &wrappedType,
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_zciRh": dataintegration.ConfigParameterValue{IntValue: common.Int(165),
						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")}},
					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")},
					ConfigDefinition: &dataintegration.ConfigDefinition{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(292),
						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_NbV9p": dataintegration.ConfigParameterDefinition{Description: common.String("EXAMPLE-description-Value"),
							IsClassFieldValue: common.Bool(false),
							IsStatic:          common.Bool(true),
							ParameterName:     common.String("EXAMPLE-parameterName-Value"),
							ParameterType: dataintegration.DataType{Description: common.String("EXAMPLE-description-Value"),
								DtType:       dataintegration.DataTypeDtTypePrimitive,
								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")},
								Key:            common.String("EXAMPLE-key-Value"),
								ObjectStatus:   common.Int(555),
								TypeSystemName: common.String("EXAMPLE-typeSystemName-Value")},
							ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
							DefaultValue:   &defaultValue}},
						IsContained: common.Bool(false),
						Key:         common.String("EXAMPLE-key-Value")},
					Description:  common.String("EXAMPLE-description-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")}}},
			Description: common.String("EXAMPLE-description-Value"),
			Expr: &dataintegration.Expression{ObjectStatus: common.Int(634),
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_L3IMq": dataintegration.ConfigParameterValue{RefValue: &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(147),
					ObjectValue:     &objectValue,
					ParameterValue:  common.String("EXAMPLE-parameterValue-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")},
			Identifier: common.String("EXAMPLE-identifier-Value"),
			Key:        common.String("EXAMPLE-key-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)
}