// 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 type_ interface{}
	type_ = "EXAMPLE-type-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var wrappedType interface{}
	wrappedType = "EXAMPLE-wrappedType-Value"
	req := dataintegration.CreateUserDefinedFunctionValidationRequest{WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		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{Arguments: []dataintegration.TypedObject{dataintegration.ShapeField{Type: &type_,
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_RcbOq": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(765),
					ObjectValue:     &objectValue}},
					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"),
				Labels:      []string{"EXAMPLE--Value"},
				Name:        common.String("EXAMPLE-name-Value"),
				NativeShapeField: &dataintegration.NativeShapeField{Position: common.Int(941),
					Type: &type_,
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_zmd23": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(814),
						ObjectValue:     &objectValue,
						ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
						RefValue:        &refValue,
						RootObjectValue: &rootObjectValue}},
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
					DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
					IsMandatory:        common.Bool(false),
					Name:               common.String("EXAMPLE-name-Value")},
				ObjectStatus: common.Int(680),
				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")}}},
				Description:  common.String("EXAMPLE-description-Value"),
				Key:          common.String("EXAMPLE-key-Value"),
				ModelType:    dataintegration.FunctionSignatureModelTypeDisFunctionSignature,
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(705),
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				RetType: &dataintegration.ConfiguredType{ConfigDefinition: &dataintegration.ConfigDefinition{Name: common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(556),
					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_gybe2": dataintegration.ConfigParameterDefinition{IsClassFieldValue: common.Bool(false),
						IsStatic:      common.Bool(true),
						ParameterName: common.String("EXAMPLE-parameterName-Value"),
						ParameterType: dataintegration.DataType{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")},
							Name:           common.String("EXAMPLE-name-Value"),
							ObjectStatus:   common.Int(693),
							TypeSystemName: common.String("EXAMPLE-typeSystemName-Value"),
							Description:    common.String("EXAMPLE-description-Value"),
							DtType:         dataintegration.DataTypeDtTypePrimitive},
						ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
						DefaultValue:   &defaultValue,
						Description:    common.String("EXAMPLE-description-Value")}},
					IsContained:  common.Bool(false),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
					Description: common.String("EXAMPLE-description-Value"),
					Key:         common.String("EXAMPLE-key-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")},
					WrappedType: &wrappedType,
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_ERK0B": dataintegration.ConfigParameterValue{RefValue: &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(999),
						ObjectValue:     &objectValue,
						ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}},
						ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
							Parent: common.String("EXAMPLE-parent-Value")}},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(829)}}},
			Description: common.String("EXAMPLE-description-Value"),
			ModelType:   dataintegration.CreateUserDefinedFunctionValidationDetailsModelTypeDisUserDefinedFunction,
			Name:        common.String("EXAMPLE-name-Value"),
			KeyMap:      map[string]string{"EXAMPLE_KEY_5jh3T": "EXAMPLE_VALUE_hXm9leeIG9k9KTitA1oB"},
			Metadata: &dataintegration.ObjectMetadata{IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
				IsFavorite: common.Bool(false),
				Aggregator: &dataintegration.AggregatorSummary{Identifier: common.String("EXAMPLE-identifier-Value"),
					Key:         common.String("EXAMPLE-key-Value"),
					Name:        common.String("EXAMPLE-name-Value"),
					Type:        common.String("EXAMPLE-type-Value"),
					Description: common.String("EXAMPLE-description-Value")},
				AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
				CreatedBy:     common.String("EXAMPLE-createdBy-Value"),
				UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
				CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectType: dataintegration.CountStatisticSummaryObjectTypeFolder,
					ObjectCount: common.Int64(684)}}},
				CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
				Labels:          []string{"EXAMPLE--Value"},
				RegistryVersion: common.Int(818),
				TimeCreated:     &common.SDKTime{Time: time.Now()},
				TimeUpdated:     &common.SDKTime{Time: time.Now()},
				UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
				InfoFields:      map[string]string{"EXAMPLE_KEY_HaHAi": "EXAMPLE_VALUE_TmcZ5btiw1UhMYDEFMB7"}},
			ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
			ObjectStatus:  common.Int(204),
			ObjectVersion: common.Int(816),
			Expr: &dataintegration.Expression{ObjectStatus: common.Int(212),
				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_Defbk": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(885),
					ObjectValue:     &objectValue}},
					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")},
		OpcRequestId:  common.String("PEOWZNWMH3IEBR1BS3QQ<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-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)
}