// 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 ExampleCreatePipelineValidation() {
	// 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 rootObjectDefaultValue interface{}
	rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	req := dataintegration.CreatePipelineValidationRequest{OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		CreatePipelineValidationDetails: dataintegration.CreatePipelineValidationDetails{Name: common.String("EXAMPLE-name-Value"),
			ObjectStatus:  common.Int(638),
			ObjectVersion: common.Int(696),
			FlowConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_7MBgy": dataintegration.ConfigParameterValue{IntValue: common.Int(681),
				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")}},
			ModelType: common.String("EXAMPLE-modelType-Value"),
			Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{Description: common.String("EXAMPLE-description-Value"),
				Key:          common.String("EXAMPLE-key-Value"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(283),
					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")},
				InputLinks: []dataintegration.InputLink{dataintegration.InputLink{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"),
					FieldMap: dataintegration.RuleBasedEntityMap{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"),
						IsJavaRegexSyntax: common.Bool(true),
						ObjectStatus:      common.Int(372),
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_m7CdY": dataintegration.ConfigParameterValue{RefValue: &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(926),
							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"),
						FromPattern:  common.String("EXAMPLE-fromPattern-Value"),
						Key:          common.String("EXAMPLE-key-Value"),
						MapType:      dataintegration.RuleBasedEntityMapMapTypeMapbypattern,
						ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(93),
					Port:         common.String("EXAMPLE-port-Value"),
					FromLink:     common.String("EXAMPLE-fromLink-Value"),
					Key:          common.String("EXAMPLE-key-Value")}},
				ModelType:    common.String("EXAMPLE-modelType-Value"),
				ObjectStatus: common.Int(819),
				Operator: dataintegration.Projection{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"),
					Identifier:   common.String("EXAMPLE-identifier-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ObjectStatus: common.Int(321),
					InputPorts: []dataintegration.InputPort{dataintegration.InputPort{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_sYIYJ": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(521),
							ObjectValue:     &objectValue}}},
						Fields: []dataintegration.TypedObject{dataintegration.DerivedField{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:        common.String("EXAMPLE-type-Value"),
							Description: common.String("EXAMPLE-description-Value"),
							Expr: &dataintegration.Expression{Key: common.String("EXAMPLE-key-Value"),
								ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
								ObjectStatus: common.Int(501),
								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_dL0nA": dataintegration.ConfigParameterValue{IntValue: common.Int(686),
									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")},
							IsUseInferredType: common.Bool(false),
							ModelVersion:      common.String("EXAMPLE-modelVersion-Value"),
							ObjectStatus:      common.Int(791),
							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_oSBG8": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
									StringValue:    common.String("EXAMPLE-stringValue-Value"),
									IntValue:       common.Int(489),
									ObjectValue:    &objectValue,
									ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
									RefValue:       &refValue}}},
							Key:    common.String("EXAMPLE-key-Value"),
							Labels: []string{"EXAMPLE--Value"}}},
						Key:          common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(627),
						Description:  common.String("EXAMPLE-description-Value"),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						PortType: dataintegration.InputPortPortTypeData}},
					ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
					Name:          common.String("EXAMPLE-name-Value"),
					ObjectVersion: common.Int(758),
					OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_PlhXo": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
						StringValue:    common.String("EXAMPLE-stringValue-Value"),
						IntValue:       common.Int(245),
						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")}},
					OutputPorts: []dataintegration.TypedObject{dataintegration.DynamicProxyField{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_j173Z": dataintegration.ConfigParameterValue{IntValue: common.Int(843),
						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")}},
						Labels:       []string{"EXAMPLE--Value"},
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(491),
						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")},
						Type: dataintegration.DerivedType{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(58),
							ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
								RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}}},
					Parameters: []dataintegration.Parameter{dataintegration.Parameter{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_XzKvY": dataintegration.ConfigParameterValue{IntValue: common.Int(533),
						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")}},
						RootObjectDefaultValue: &rootObjectDefaultValue,
						Description:            common.String("EXAMPLE-description-Value"),
						IsOutput:               common.Bool(true),
						Key:                    common.String("EXAMPLE-key-Value"),
						ModelVersion:           common.String("EXAMPLE-modelVersion-Value"),
						Name:                   common.String("EXAMPLE-name-Value"),
						ObjectStatus:           common.Int(198),
						OutputAggregationType:  dataintegration.ParameterOutputAggregationTypeMin,
						DefaultValue:           &defaultValue,
						IsInput:                common.Bool(true),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						Type:     &type_,
						TypeName: common.String("EXAMPLE-typeName-Value"),
						UsedFor:  common.String("EXAMPLE-usedFor-Value")}}},
				UiProperties: &dataintegration.UiProperties{CoordinateX: common.Float32(6728.2993),
					CoordinateY: common.Float32(177.99734)}}},
			Parameters: []dataintegration.Parameter{dataintegration.Parameter{RootObjectDefaultValue: &rootObjectDefaultValue,
				Type: &type_,
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_Kosuq": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
					StringValue:    common.String("EXAMPLE-stringValue-Value"),
					IntValue:       common.Int(643),
					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")}},
				Key:          common.String("EXAMPLE-key-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				TypeName:     common.String("EXAMPLE-typeName-Value"),
				DefaultValue: &defaultValue,
				Description:  common.String("EXAMPLE-description-Value"),
				IsOutput:     common.Bool(false),
				ObjectStatus: common.Int(665),
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				UsedFor:               common.String("EXAMPLE-usedFor-Value"),
				IsInput:               common.Bool(true),
				ModelVersion:          common.String("EXAMPLE-modelVersion-Value"),
				OutputAggregationType: dataintegration.ParameterOutputAggregationTypeCount}},
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			Variables: []dataintegration.Variable{dataintegration.Variable{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")},
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_roqzE": dataintegration.ConfigParameterValue{IntValue: common.Int(341),
					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")}},
				Identifier:    common.String("EXAMPLE-identifier-Value"),
				ModelType:     common.String("EXAMPLE-modelType-Value"),
				Name:          common.String("EXAMPLE-name-Value"),
				ObjectStatus:  common.Int(434),
				ObjectVersion: common.Int(217),
				RootObjectDefaultValue: &dataintegration.RootObject{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(59),
					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"),
					ModelType: common.String("EXAMPLE-modelType-Value")},
				Type: dataintegration.ArrayType{Name: common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(141),
					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"),
					ElementType:  common.String("EXAMPLE-elementType-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
				DefaultValue: &defaultValue,
				Description:  common.String("EXAMPLE-description-Value")}},
			Description: common.String("EXAMPLE-description-Value"),
			Identifier:  common.String("EXAMPLE-identifier-Value"),
			Key:         common.String("EXAMPLE-key-Value"),
			Metadata: &dataintegration.ObjectMetadata{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")},
				AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
				CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(317),
					ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataAsset}}},
				CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
				IsFavorite:      common.Bool(false),
				RegistryVersion: common.Int(719),
				TimeCreated:     &common.SDKTime{Time: time.Now()},
				TimeUpdated:     &common.SDKTime{Time: time.Now()},
				CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
				IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
				InfoFields:      map[string]string{"EXAMPLE_KEY_cp1nl": "EXAMPLE_VALUE_QCbCoJdCPcqFTosDelAm"},
				Labels:          []string{"EXAMPLE--Value"},
				UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
				UpdatedByName:   common.String("EXAMPLE-updatedByName-Value")},
			ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
		OpcRequestId: common.String("IKN383O1GYTHWJEDHFOW<unique_ID>")}

	// Send the request using the service client
	resp, err := client.CreatePipelineValidation(context.Background(), req)
	helpers.FatalIfError(err)

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