// 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"

	"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 ExampleCreatePipeline() {
	// 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 rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var wrappedType interface{}
	wrappedType = "EXAMPLE-wrappedType-Value"
	var scope interface{}
	scope = "EXAMPLE-scope-Value"
	var rootObjectDefaultValue interface{}
	rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	req := dataintegration.CreatePipelineRequest{OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		CreatePipelineDetails: dataintegration.CreatePipelineDetails{Name: common.String("EXAMPLE-name-Value"),
			Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{InputLinks: []dataintegration.InputLink{dataintegration.InputLink{FieldMap: dataintegration.DirectNamedFieldMap{TargetTypedObject: common.String("EXAMPLE-targetTypedObject-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_QteqB": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
						StringValue:    common.String("EXAMPLE-stringValue-Value"),
						IntValue:       common.Int(5),
						ObjectValue:    &objectValue,
						ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
						RefValue:       &refValue}}},
				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")},
				SourceFieldName: common.String("EXAMPLE-sourceFieldName-Value"),
				SourceScopeReference: &dataintegration.ScopeReference{RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
					ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
					ReferenceType:   dataintegration.ScopeReferenceReferenceTypeDirectRef},
				SourceTypedObject: common.String("EXAMPLE-sourceTypedObject-Value"),
				Key:               common.String("EXAMPLE-key-Value"),
				ObjectStatus:      common.Int(233),
				TargetFieldName:   common.String("EXAMPLE-targetFieldName-Value"),
				TargetScopeReference: &dataintegration.ScopeReference{RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
					ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
					ReferenceType:   dataintegration.ScopeReferenceReferenceTypeDirectRef}},
				FromLink: common.String("EXAMPLE-fromLink-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"),
				ObjectStatus: common.Int(557),
				Port:         common.String("EXAMPLE-port-Value")}},
				Key:          common.String("EXAMPLE-key-Value"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus: common.Int(739),
				UiProperties: &dataintegration.UiProperties{CoordinateY: common.Float32(3920.6458),
					CoordinateX: common.Float32(2658.571)},
				ModelType: common.String("EXAMPLE-modelType-Value"),
				Name:      common.String("EXAMPLE-name-Value"),
				Operator: dataintegration.MergeOperator{Description: common.String("EXAMPLE-description-Value"),
					Identifier: common.String("EXAMPLE-identifier-Value"),
					InputPorts: []dataintegration.InputPort{dataintegration.InputPort{Fields: []dataintegration.TypedObject{dataintegration.ConditionalOutputPort{Description: common.String("EXAMPLE-description-Value"),
						Key:          common.String("EXAMPLE-key-Value"),
						Name:         common.String("EXAMPLE-name-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")},
						SplitCondition: &dataintegration.Expression{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_5WvBp": dataintegration.ConfigParameterValue{IntValue: common.Int(84),
								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"),
							Key:          common.String("EXAMPLE-key-Value"),
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							ObjectStatus: common.Int(193)},
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_wvd44": dataintegration.ConfigParameterValue{IntValue: common.Int(322),
							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")}},
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						PortType:     dataintegration.ConditionalOutputPortPortTypeControl}},
						ModelVersion: common.String("EXAMPLE-modelVersion-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_zlmt2": dataintegration.ConfigParameterValue{IntValue: common.Int(656),
							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"),
						Key:          common.String("EXAMPLE-key-Value"),
						ObjectStatus: common.Int(932),
						PortType:     dataintegration.InputPortPortTypeModel}},
					Key:           common.String("EXAMPLE-key-Value"),
					ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus:  common.Int(55),
					ObjectVersion: common.Int(316),
					Name:          common.String("EXAMPLE-name-Value"),
					OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_9XII1": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
						StringValue:    common.String("EXAMPLE-stringValue-Value"),
						IntValue:       common.Int(260),
						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.InputProxyField{Key: common.String("EXAMPLE-key-Value"),
						Labels:       []string{"EXAMPLE--Value"},
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						Type: dataintegration.ConfiguredType{ConfigDefinition: &dataintegration.ConfigDefinition{ObjectStatus: common.Int(572),
							ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
								Parent: common.String("EXAMPLE-parent-Value")},
							ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_K1GMQ": dataintegration.ConfigParameterDefinition{ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
								DefaultValue:      &defaultValue,
								Description:       common.String("EXAMPLE-description-Value"),
								IsClassFieldValue: common.Bool(true),
								IsStatic:          common.Bool(true),
								ParameterName:     common.String("EXAMPLE-parameterName-Value")}},
							IsContained:  common.Bool(false),
							Key:          common.String("EXAMPLE-key-Value"),
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value")},
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_WpGDN": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
								RefValue:        &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(739),
								ObjectValue:     &objectValue}},
								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"),
							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")},
							WrappedType:  &wrappedType,
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(764)},
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_oRgo4": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(963),
							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"),
						ObjectStatus: common.Int(814),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						Scope: &scope}},
					Parameters: []dataintegration.Parameter{dataintegration.Parameter{UsedFor: common.String("EXAMPLE-usedFor-Value"),
						Description: common.String("EXAMPLE-description-Value"),
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_sPdXK": dataintegration.ConfigParameterValue{RefValue: &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(429),
							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")}},
						IsInput:               common.Bool(false),
						IsOutput:              common.Bool(true),
						Key:                   common.String("EXAMPLE-key-Value"),
						ModelVersion:          common.String("EXAMPLE-modelVersion-Value"),
						ObjectStatus:          common.Int(490),
						TypeName:              common.String("EXAMPLE-typeName-Value"),
						Name:                  common.String("EXAMPLE-name-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,
						Type:                   &type_,
						DefaultValue:           &defaultValue}},
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					TriggerRule: dataintegration.MergeOperatorTriggerRuleAllComplete},
				OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{Port: common.String("EXAMPLE-port-Value"),
					ToLinks:      []string{"EXAMPLE--Value"},
					Description:  common.String("EXAMPLE-description-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(761),
					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")},
				Description: common.String("EXAMPLE-description-Value")}},
			ObjectStatus: common.Int(109),
			Parameters: []dataintegration.Parameter{dataintegration.Parameter{Type: &type_,
				IsOutput:     common.Bool(false),
				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,
				IsInput:                common.Bool(true),
				OutputAggregationType:  dataintegration.ParameterOutputAggregationTypeMin,
				DefaultValue:           &defaultValue,
				Description:            common.String("EXAMPLE-description-Value"),
				ObjectStatus:           common.Int(367),
				TypeName:               common.String("EXAMPLE-typeName-Value"),
				UsedFor:                common.String("EXAMPLE-usedFor-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_Ldwr3": dataintegration.ConfigParameterValue{RefValue: &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(232),
						ObjectValue:     &objectValue,
						ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}}},
				Key:  common.String("EXAMPLE-key-Value"),
				Name: common.String("EXAMPLE-name-Value")}},
			Variables: []dataintegration.Variable{dataintegration.Variable{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_RpPI1": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
				ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
				RefValue:        &refValue,
				RootObjectValue: &rootObjectValue,
				StringValue:     common.String("EXAMPLE-stringValue-Value"),
				IntValue:        common.Int(354)}},
				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"),
				ModelType:    common.String("EXAMPLE-modelType-Value"),
				ObjectStatus: common.Int(277),
				RootObjectDefaultValue: &dataintegration.RootObject{Key: common.String("EXAMPLE-key-Value"),
					ModelType:    common.String("EXAMPLE-modelType-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(903),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
				Type: dataintegration.MapType{ContainsNull: common.Bool(false),
					Key:            common.String("EXAMPLE-key-Value"),
					KeyElementType: common.String("EXAMPLE-keyElementType-Value"),
					Name:           common.String("EXAMPLE-name-Value"),
					ObjectStatus:   common.Int(592),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					ValueElementType: common.String("EXAMPLE-valueElementType-Value"),
					Description:      common.String("EXAMPLE-description-Value"),
					ModelVersion:     common.String("EXAMPLE-modelVersion-Value")},
				Identifier:    common.String("EXAMPLE-identifier-Value"),
				Key:           common.String("EXAMPLE-key-Value"),
				ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
				Name:          common.String("EXAMPLE-name-Value"),
				ObjectVersion: common.Int(961),
				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"),
			ModelType:     common.String("EXAMPLE-modelType-Value"),
			ObjectVersion: common.Int(841),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			RegistryMetadata: &dataintegration.RegistryMetadata{AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
				IsFavorite:      common.Bool(true),
				Key:             common.String("EXAMPLE-key-Value"),
				Labels:          []string{"EXAMPLE--Value"},
				RegistryVersion: common.Int(463)},
			FlowConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_bzATU": dataintegration.ConfigParameterValue{IntValue: common.Int(410),
				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")}},
			Identifier:   common.String("EXAMPLE-identifier-Value"),
			ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
		OpcRequestId: common.String("TBKNTCPPGOJCJ39HL3K5<unique_ID>")}

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

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