// 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 defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var rootObjectDefaultValue interface{}
	rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	req := dataintegration.CreatePipelineValidationRequest{OpcRequestId: common.String("8XY970X5GGQMAQEB6G5T<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		WorkspaceId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		CreatePipelineValidationDetails: dataintegration.CreatePipelineValidationDetails{Parameters: []dataintegration.Parameter{dataintegration.Parameter{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_EuBq5": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
			ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
			RefValue:        &refValue,
			RootObjectValue: &rootObjectValue,
			StringValue:     common.String("EXAMPLE-stringValue-Value"),
			IntValue:        common.Int(428)}},
			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(false),
			IsOutput:              common.Bool(false),
			Key:                   common.String("EXAMPLE-key-Value"),
			OutputAggregationType: dataintegration.ParameterOutputAggregationTypeSum,
			ModelVersion:          common.String("EXAMPLE-modelVersion-Value"),
			UsedFor:               common.String("EXAMPLE-usedFor-Value"),
			Name:                  common.String("EXAMPLE-name-Value"),
			ObjectStatus:          common.Int(385),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			TypeName:               common.String("EXAMPLE-typeName-Value"),
			Description:            common.String("EXAMPLE-description-Value"),
			RootObjectDefaultValue: &rootObjectDefaultValue,
			Type:                   &type_}},
			Variables: []dataintegration.Variable{dataintegration.Variable{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(968),
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				Type: dataintegration.DataType{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")},
					TypeSystemName: common.String("EXAMPLE-typeSystemName-Value"),
					DtType:         dataintegration.DataTypeDtTypePrimitive,
					ModelVersion:   common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus:   common.Int(258),
					ConfigDefinition: &dataintegration.ConfigDefinition{IsContained: common.Bool(true),
						Key:          common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(921),
						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_4GCSh": dataintegration.ConfigParameterDefinition{ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
							DefaultValue:      &defaultValue,
							Description:       common.String("EXAMPLE-description-Value"),
							IsClassFieldValue: common.Bool(true),
							IsStatic:          common.Bool(false),
							ParameterName:     common.String("EXAMPLE-parameterName-Value")}}},
					Description: common.String("EXAMPLE-description-Value"),
					Key:         common.String("EXAMPLE-key-Value")},
				DefaultValue:  &defaultValue,
				Identifier:    common.String("EXAMPLE-identifier-Value"),
				Key:           common.String("EXAMPLE-key-Value"),
				ObjectVersion: common.Int(7),
				RootObjectDefaultValue: &dataintegration.RootObject{Key: common.String("EXAMPLE-key-Value"),
					ModelType:    common.String("EXAMPLE-modelType-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(874),
					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_zugE7": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(152),
					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"),
				ModelType:   common.String("EXAMPLE-modelType-Value")}},
			Description: common.String("EXAMPLE-description-Value"),
			FlowConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_Xc1H0": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
				ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
				RefValue:        &refValue,
				RootObjectValue: &rootObjectValue,
				StringValue:     common.String("EXAMPLE-stringValue-Value"),
				IntValue:        common.Int(395)}},
				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"),
			Metadata: &dataintegration.ObjectMetadata{InfoFields: map[string]string{"EXAMPLE_KEY_0pyiw": "EXAMPLE_VALUE_0MqF7xrPAVdfyk5vGnIH"},
				IsFavorite:  common.Bool(false),
				TimeCreated: &common.SDKTime{Time: time.Now()},
				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")},
				CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(228),
					ObjectType: dataintegration.CountStatisticSummaryObjectTypeApplication}}},
				CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
				Labels:          []string{"EXAMPLE--Value"},
				RegistryVersion: common.Int(310),
				TimeUpdated:     &common.SDKTime{Time: time.Now()},
				UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
				UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
				AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
				CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
				IdentifierPath:  common.String("EXAMPLE-identifierPath-Value")},
			ModelType: common.String("EXAMPLE-modelType-Value"),
			Name:      common.String("EXAMPLE-name-Value"),
			Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{Key: common.String("EXAMPLE-key-Value"),
				ModelType:    common.String("EXAMPLE-modelType-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(740),
				Operator: dataintegration.Split{DataRoutingStrategy: dataintegration.SplitDataRoutingStrategyAll,
					Key:           common.String("EXAMPLE-key-Value"),
					ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
					Name:          common.String("EXAMPLE-name-Value"),
					ObjectStatus:  common.Int(393),
					ObjectVersion: common.Int(744),
					OutputPorts: []dataintegration.TypedObject{dataintegration.Parameter{Type: &type_,
						Description:            common.String("EXAMPLE-description-Value"),
						IsInput:                common.Bool(true),
						ObjectStatus:           common.Int(916),
						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")},
						TypeName: common.String("EXAMPLE-typeName-Value"),
						IsOutput: common.Bool(false),
						Key:      common.String("EXAMPLE-key-Value"),
						UsedFor:  common.String("EXAMPLE-usedFor-Value"),
						ConfigValues: &dataintegration.ConfigValues{ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
							Parent: common.String("EXAMPLE-parent-Value")},
							ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_kKD5G": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
								StringValue:    common.String("EXAMPLE-stringValue-Value"),
								IntValue:       common.Int(572),
								ObjectValue:    &objectValue,
								ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
								RefValue:       &refValue}}},
						DefaultValue: &defaultValue,
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value")}},
					Description: common.String("EXAMPLE-description-Value"),
					Identifier:  common.String("EXAMPLE-identifier-Value"),
					InputPorts: []dataintegration.InputPort{dataintegration.InputPort{ObjectStatus: common.Int(731),
						PortType: dataintegration.InputPortPortTypeModel,
						Fields: []dataintegration.TypedObject{dataintegration.ShapeField{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							ObjectStatus: common.Int(816),
							Key:          common.String("EXAMPLE-key-Value"),
							Labels:       []string{"EXAMPLE--Value"},
							Name:         common.String("EXAMPLE-name-Value"),
							NativeShapeField: &dataintegration.NativeShapeField{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_RCFXK": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
								ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
								RefValue:        &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(277)}},
								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"),
								Position:           common.Int(548),
								Type:               &type_},
							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_ODIAa": dataintegration.ConfigParameterValue{RefValue: &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(464),
								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")}},
						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_G6Vd4": dataintegration.ConfigParameterValue{IntValue: common.Int(274),
							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")}},
					OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_nmu9l": dataintegration.ConfigParameterValue{RefValue: &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(652),
						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")}},
					Parameters: []dataintegration.Parameter{dataintegration.Parameter{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")},
						RootObjectDefaultValue: &rootObjectDefaultValue,
						Type:                   &type_,
						IsInput:                common.Bool(true),
						IsOutput:               common.Bool(true),
						Key:                    common.String("EXAMPLE-key-Value"),
						Name:                   common.String("EXAMPLE-name-Value"),
						ObjectStatus:           common.Int(498),
						OutputAggregationType:  dataintegration.ParameterOutputAggregationTypeCount,
						TypeName:               common.String("EXAMPLE-typeName-Value"),
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_J0DmL": dataintegration.ConfigParameterValue{RefValue: &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(995),
							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")}},
						DefaultValue: &defaultValue,
						Description:  common.String("EXAMPLE-description-Value"),
						UsedFor:      common.String("EXAMPLE-usedFor-Value")}},
					ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
						Parent: common.String("EXAMPLE-parent-Value")}},
				OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(130),
					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")}},
				UiProperties: &dataintegration.UiProperties{CoordinateX: common.Float32(6015.7983),
					CoordinateY: common.Float32(2788.8704)},
				Description: common.String("EXAMPLE-description-Value"),
				InputLinks: []dataintegration.InputLink{dataintegration.InputLink{FieldMap: dataintegration.CompositeFieldMap{ObjectStatus: common.Int(819),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-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_Kb5xO": dataintegration.ConfigParameterValue{IntValue: common.Int(182),
							ObjectValue:     &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value")}}},
					Description:  common.String("EXAMPLE-description-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
					FromLink:     common.String("EXAMPLE-fromLink-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ObjectStatus: common.Int(911),
					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"),
					Description: common.String("EXAMPLE-description-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")}}},
			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(155),
			ObjectVersion: common.Int(47)}}

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