// 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 ExampleCreateDataFlowValidation() {
	// 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 objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	var rootObjectDefaultValue interface{}
	rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
	var wrappedType interface{}
	wrappedType = "EXAMPLE-wrappedType-Value"
	req := dataintegration.CreateDataFlowValidationRequest{CreateDataFlowValidationDetails: dataintegration.CreateDataFlowValidationDetails{TargetFieldMapSummary: map[string]dataintegration.FieldMapWrapper{"EXAMPLE_KEY_K9TiW": dataintegration.FieldMapWrapper{FieldMap: dataintegration.RuleBasedEntityMap{FromPattern: common.String("EXAMPLE-fromPattern-Value"),
		Key:          common.String("EXAMPLE-key-Value"),
		MapType:      dataintegration.RuleBasedEntityMapMapTypeMapbyname,
		ObjectStatus: common.Int(72),
		ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
			RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
		ToPattern: common.String("EXAMPLE-toPattern-Value"),
		ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_HaQt7": dataintegration.ConfigParameterValue{IntValue: common.Int(747),
			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")}},
		Description:       common.String("EXAMPLE-description-Value"),
		IsJavaRegexSyntax: common.Bool(false),
		ModelVersion:      common.String("EXAMPLE-modelVersion-Value")}}},
		Parameters: []dataintegration.Parameter{dataintegration.Parameter{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
			TypeName:     common.String("EXAMPLE-typeName-Value"),
			DefaultValue: &defaultValue,
			IsInput:      common.Bool(false),
			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")},
			Type: &type_,
			ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_bb5gS": dataintegration.ConfigParameterValue{RefValue: &refValue,
				RootObjectValue: &rootObjectValue,
				StringValue:     common.String("EXAMPLE-stringValue-Value"),
				IntValue:        common.Int(799),
				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")}},
			Description:            common.String("EXAMPLE-description-Value"),
			IsOutput:               common.Bool(true),
			Key:                    common.String("EXAMPLE-key-Value"),
			UsedFor:                common.String("EXAMPLE-usedFor-Value"),
			ObjectStatus:           common.Int(460),
			OutputAggregationType:  dataintegration.ParameterOutputAggregationTypeMin,
			RootObjectDefaultValue: &rootObjectDefaultValue}},
		ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
			RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
		FlowConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_NRC3y": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
			StringValue:    common.String("EXAMPLE-stringValue-Value"),
			IntValue:       common.Int(668),
			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"),
		Name:         common.String("EXAMPLE-name-Value"),
		Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{ModelType: common.String("EXAMPLE-modelType-Value"),
			Operator: dataintegration.Split{OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_GFT2U": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
				IntValue:        common.Int(278),
				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")}},
				OutputPorts: []dataintegration.TypedObject{dataintegration.OutputPort{Description: common.String("EXAMPLE-description-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(728),
					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_eeGiW": dataintegration.ConfigParameterValue{IntValue: common.Int(91),
						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"),
					PortType: dataintegration.OutputPortPortTypeModel}},
				Parameters: []dataintegration.Parameter{dataintegration.Parameter{Description: common.String("EXAMPLE-description-Value"),
					ModelVersion:          common.String("EXAMPLE-modelVersion-Value"),
					IsOutput:              common.Bool(false),
					Name:                  common.String("EXAMPLE-name-Value"),
					Type:                  &type_,
					Key:                   common.String("EXAMPLE-key-Value"),
					OutputAggregationType: dataintegration.ParameterOutputAggregationTypeMax,
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					RootObjectDefaultValue: &rootObjectDefaultValue,
					TypeName:               common.String("EXAMPLE-typeName-Value"),
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_N2bUP": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(397),
						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")}},
					DefaultValue: &defaultValue,
					IsInput:      common.Bool(true),
					ObjectStatus: common.Int(151),
					UsedFor:      common.String("EXAMPLE-usedFor-Value")}},
				Description:  common.String("EXAMPLE-description-Value"),
				Identifier:   common.String("EXAMPLE-identifier-Value"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus: common.Int(791),
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				DataRoutingStrategy: dataintegration.SplitDataRoutingStrategyAll,
				InputPorts: []dataintegration.InputPort{dataintegration.InputPort{Name: common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(659),
					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")},
					PortType: dataintegration.InputPortPortTypeModel,
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_t8Cfz": dataintegration.ConfigParameterValue{IntValue: common.Int(259),
						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")}},
					Description: common.String("EXAMPLE-description-Value"),
					Fields: []dataintegration.TypedObject{dataintegration.OutputField{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_baX2C": dataintegration.ConfigParameterValue{RefValue: &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(218),
						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")}},
						Description:  common.String("EXAMPLE-description-Value"),
						Labels:       []string{"EXAMPLE--Value"},
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						Key:          common.String("EXAMPLE-key-Value"),
						ObjectStatus: common.Int(173),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						Type: dataintegration.MapType{ObjectStatus: common.Int(885),
							ValueElementType: common.String("EXAMPLE-valueElementType-Value"),
							KeyElementType:   common.String("EXAMPLE-keyElementType-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")},
							ContainsNull: common.Bool(false),
							Description:  common.String("EXAMPLE-description-Value"),
							Key:          common.String("EXAMPLE-key-Value"),
							Name:         common.String("EXAMPLE-name-Value")}}},
					Key: common.String("EXAMPLE-key-Value")}},
				Key:           common.String("EXAMPLE-key-Value"),
				Name:          common.String("EXAMPLE-name-Value"),
				ObjectVersion: common.Int(755)},
			InputLinks: []dataintegration.InputLink{dataintegration.InputLink{Description: common.String("EXAMPLE-description-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")},
				FieldMap: dataintegration.RuleBasedEntityMap{MapType: dataintegration.RuleBasedEntityMapMapTypeMapbyname,
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(827),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					ToPattern: common.String("EXAMPLE-toPattern-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_XZKRQ": dataintegration.ConfigParameterValue{RefValue: &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(17),
							ObjectValue:     &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}}},
					Description:       common.String("EXAMPLE-description-Value"),
					FromPattern:       common.String("EXAMPLE-fromPattern-Value"),
					IsJavaRegexSyntax: common.Bool(false),
					Key:               common.String("EXAMPLE-key-Value")},
				FromLink:     common.String("EXAMPLE-fromLink-Value"),
				ObjectStatus: common.Int(533),
				Port:         common.String("EXAMPLE-port-Value")}},
			ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
			Name:         common.String("EXAMPLE-name-Value"),
			ObjectStatus: common.Int(106),
			OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus: common.Int(69),
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				Port:        common.String("EXAMPLE-port-Value"),
				ToLinks:     []string{"EXAMPLE--Value"},
				Description: common.String("EXAMPLE-description-Value"),
				Key:         common.String("EXAMPLE-key-Value")}},
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			UiProperties: &dataintegration.UiProperties{CoordinateX: common.Float32(3645.9011),
				CoordinateY: common.Float32(59.82578)},
			Description: common.String("EXAMPLE-description-Value"),
			Key:         common.String("EXAMPLE-key-Value")}},
		ObjectVersion: common.Int(253),
		Key:           common.String("EXAMPLE-key-Value"),
		ModelType:     common.String("EXAMPLE-modelType-Value"),
		Identifier:    common.String("EXAMPLE-identifier-Value"),
		KeyMap:        map[string]string{"EXAMPLE_KEY_s3HWb": "EXAMPLE_VALUE_jyNb0ZFaRTMoxp67ocgR"},
		ObjectStatus:  common.Int(385),
		TypedObjectMap: map[string]dataintegration.TypedObjectWrapper{"EXAMPLE_KEY_ETMCW": dataintegration.TypedObjectWrapper{TypedObject: dataintegration.DynamicInputField{Labels: []string{"EXAMPLE--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"),
			ObjectStatus: common.Int(384),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			Type: dataintegration.ConfiguredType{ConfigDefinition: &dataintegration.ConfigDefinition{ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_icPVP": dataintegration.ConfigParameterDefinition{Description: common.String("EXAMPLE-description-Value"),
				IsClassFieldValue: common.Bool(false),
				IsStatic:          common.Bool(false),
				ParameterName:     common.String("EXAMPLE-parameterName-Value"),
				ClassFieldName:    common.String("EXAMPLE-classFieldName-Value"),
				DefaultValue:      &defaultValue}},
				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(576),
				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"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus: common.Int(623),
				WrappedType:  &wrappedType,
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_Uo4k9": dataintegration.ConfigParameterValue{IntValue: common.Int(817),
					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")}},
				Description: common.String("EXAMPLE-description-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")}},
			ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_HspiU": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
				IntValue:        common.Int(671),
				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")}}}}},
		Description: common.String("EXAMPLE-description-Value"),
		Metadata: &dataintegration.ObjectMetadata{AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
			CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(708),
				ObjectType: dataintegration.CountStatisticSummaryObjectTypeConnection}}},
			CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
			CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
			InfoFields:      map[string]string{"EXAMPLE_KEY_Kr2AZ": "EXAMPLE_VALUE_GOXJ8Xxqh9fwNNN23yaU"},
			IsFavorite:      common.Bool(false),
			RegistryVersion: common.Int(628),
			TimeCreated:     &common.SDKTime{Time: time.Now()},
			Aggregator: &dataintegration.AggregatorSummary{Description: common.String("EXAMPLE-description-Value"),
				Identifier: common.String("EXAMPLE-identifier-Value"),
				Key:        common.String("EXAMPLE-key-Value"),
				Name:       common.String("EXAMPLE-name-Value"),
				Type:       common.String("EXAMPLE-type-Value")},
			IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
			Labels:         []string{"EXAMPLE--Value"},
			TimeUpdated:    &common.SDKTime{Time: time.Now()},
			UpdatedBy:      common.String("EXAMPLE-updatedBy-Value"),
			UpdatedByName:  common.String("EXAMPLE-updatedByName-Value")}},
		OpcRequestId:  common.String("ML4KTLODZQOIU73RCUJE<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.CreateDataFlowValidation(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}