// 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 wrappedType interface{}
	wrappedType = "EXAMPLE-wrappedType-Value"
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var scope interface{}
	scope = "EXAMPLE-scope-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	req := dataintegration.CreateUserDefinedFunctionValidationRequest{OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		CreateUserDefinedFunctionValidationDetails: dataintegration.CreateUserDefinedFunctionValidationDetails{Metadata: &dataintegration.ObjectMetadata{UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
			CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
			IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
			InfoFields:      map[string]string{"EXAMPLE_KEY_FJ5uy": "EXAMPLE_VALUE_hrOz1bmqzKDhXXvFDWRW"},
			IsFavorite:      common.Bool(true),
			RegistryVersion: common.Int(123),
			TimeUpdated:     &common.SDKTime{Time: time.Now()},
			UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
			Aggregator: &dataintegration.AggregatorSummary{Name: common.String("EXAMPLE-name-Value"),
				Type:        common.String("EXAMPLE-type-Value"),
				Description: common.String("EXAMPLE-description-Value"),
				Identifier:  common.String("EXAMPLE-identifier-Value"),
				Key:         common.String("EXAMPLE-key-Value")},
			AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
			CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectType: dataintegration.CountStatisticSummaryObjectTypeFolder,
				ObjectCount: common.Int64(295)}}},
			CreatedBy:   common.String("EXAMPLE-createdBy-Value"),
			Labels:      []string{"EXAMPLE--Value"},
			TimeCreated: &common.SDKTime{Time: time.Now()}},
			ModelType:    dataintegration.CreateUserDefinedFunctionValidationDetailsModelTypeDisUserDefinedFunction,
			ObjectStatus: common.Int(577),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			Identifier:    common.String("EXAMPLE-identifier-Value"),
			Key:           common.String("EXAMPLE-key-Value"),
			KeyMap:        map[string]string{"EXAMPLE_KEY_oSBSC": "EXAMPLE_VALUE_rYnqBeO43DDmOg5tAKOy"},
			ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
			Name:          common.String("EXAMPLE-name-Value"),
			ObjectVersion: common.Int(423),
			Signatures: []dataintegration.FunctionSignature{dataintegration.FunctionSignature{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
					Parent: common.String("EXAMPLE-parent-Value")},
				Description:  common.String("EXAMPLE-description-Value"),
				Key:          common.String("EXAMPLE-key-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(508),
				RetType: &dataintegration.ConfiguredType{ObjectStatus: common.Int(17),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					WrappedType: &wrappedType,
					ConfigDefinition: &dataintegration.ConfigDefinition{ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_G5tAj": dataintegration.ConfigParameterDefinition{ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
						DefaultValue:      &defaultValue,
						Description:       common.String("EXAMPLE-description-Value"),
						IsClassFieldValue: common.Bool(false),
						IsStatic:          common.Bool(true),
						ParameterName:     common.String("EXAMPLE-parameterName-Value"),
						ParameterType: dataintegration.DynamicType{TypeHandler: dataintegration.RuleTypeConfig{ObjectStatus: common.Int(482),
							ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
								RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
							Scope: &scope,
							ScopeReference: &dataintegration.ScopeReference{RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
								ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
								ReferenceType:   dataintegration.ScopeReferenceReferenceTypeOciFunctionInputShape},
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_k5vGn": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
								RefValue:        &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(288),
								ObjectValue:     &objectValue}},
								ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
									RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
							ProjectionRules: []dataintegration.ProjectionRule{dataintegration.GroupedNamePatternRule{IsCaseSensitive: common.Bool(true),
								IsSkipRemainingRulesOnMatch: common.Bool(true),
								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")},
								RuleType:          dataintegration.GroupedNamePatternRuleRuleTypeInclude,
								Scope:             &scope,
								Description:       common.String("EXAMPLE-description-Value"),
								IsCascade:         common.Bool(false),
								Key:               common.String("EXAMPLE-key-Value"),
								MatchingStrategy:  dataintegration.GroupedNamePatternRuleMatchingStrategyTagsOnly,
								ObjectStatus:      common.Int(660),
								IsJavaRegexSyntax: common.Bool(true),
								Pattern:           common.String("EXAMPLE-pattern-Value"),
								ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_7Mwqo": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
									StringValue:    common.String("EXAMPLE-stringValue-Value"),
									IntValue:       common.Int(783),
									ObjectValue:    &objectValue,
									ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
									RefValue:       &refValue}},
									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")}},
							IsOrderByRule: 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"),
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(220),
							ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
								Parent: common.String("EXAMPLE-parent-Value")}}}},
						IsContained:  common.Bool(false),
						Key:          common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(588),
						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_e0fpr": dataintegration.ConfigParameterValue{IntValue: common.Int(406),
						ObjectValue:     &objectValue,
						ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
						RefValue:        &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-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"),
					Name:         common.String("EXAMPLE-name-Value"),
					Description:  common.String("EXAMPLE-description-Value"),
					Key:          common.String("EXAMPLE-key-Value")},
				Arguments: []dataintegration.TypedObject{dataintegration.ProxyField{Description: common.String("EXAMPLE-description-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Type: dataintegration.ArrayType{ElementType: common.String("EXAMPLE-elementType-Value"),
						Key:          common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(394),
						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")},
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_C14jP": dataintegration.ConfigParameterValue{IntValue: common.Int(159),
						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")}},
					Key:          common.String("EXAMPLE-key-Value"),
					Labels:       []string{"EXAMPLE--Value"},
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(724),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					Scope: &scope,
					ScopeReference: &dataintegration.ScopeReference{ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
						ReferenceType: dataintegration.ScopeReferenceReferenceTypeBoundEntityShapeField,
						RefObjectName: common.String("EXAMPLE-refObjectName-Value")}}},
				ModelType: dataintegration.FunctionSignatureModelTypeDisFunctionSignature}},
			Description: common.String("EXAMPLE-description-Value"),
			Expr: &dataintegration.Expression{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(211),
				ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
					Parent: common.String("EXAMPLE-parent-Value")},
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_7bHrA": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
					ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(44)}},
					ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
						Parent: common.String("EXAMPLE-parent-Value")}}}},
		OpcRequestId: common.String("JHLH2YBRUOR4YNKOXSIE<unique_ID>")}

	// 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)
}