// 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 ExampleUpdateDataFlow() {
	// 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 type_ interface{}
	type_ = "EXAMPLE-type-Value"
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	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"
	req := dataintegration.UpdateDataFlowRequest{WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		DataFlowKey:  common.String("EXAMPLE-dataFlowKey-Value"),
		IfMatch:      common.String("EXAMPLE-ifMatch-Value"),
		OpcRequestId: common.String("ZFTUXQBCKXDP2UFEDPFK<unique_ID>"),
		UpdateDataFlowDetails: dataintegration.UpdateDataFlowDetails{Parameters: []dataintegration.Parameter{dataintegration.Parameter{Description: common.String("EXAMPLE-description-Value"),
			IsInput:               common.Bool(true),
			Key:                   common.String("EXAMPLE-key-Value"),
			Name:                  common.String("EXAMPLE-name-Value"),
			OutputAggregationType: dataintegration.ParameterOutputAggregationTypeCount,
			IsOutput:              common.Bool(false),
			ModelVersion:          common.String("EXAMPLE-modelVersion-Value"),
			Type:                  &type_,
			TypeName:              common.String("EXAMPLE-typeName-Value"),
			DefaultValue:          &defaultValue,
			ObjectStatus:          common.Int(586),
			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"),
			ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_pEEwC": dataintegration.ConfigParameterValue{IntValue: common.Int(97),
				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}},
			Identifier:   common.String("EXAMPLE-identifier-Value"),
			ModelType:    common.String("EXAMPLE-modelType-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")},
			RegistryMetadata: &dataintegration.RegistryMetadata{Labels: []string{"EXAMPLE--Value"},
				RegistryVersion: common.Int(611),
				AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
				IsFavorite:      common.Bool(true),
				Key:             common.String("EXAMPLE-key-Value")},
			Description: common.String("EXAMPLE-description-Value"),
			FlowConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_iYiLz": dataintegration.ConfigParameterValue{IntValue: common.Int(205),
				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"),
			Name: common.String("EXAMPLE-name-Value"),
			Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{Operator: dataintegration.Lookup{Identifier: common.String("EXAMPLE-identifier-Value"),
				Key:           common.String("EXAMPLE-key-Value"),
				ObjectVersion: common.Int(46),
				OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_F2DXC": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
					ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(481)}},
					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{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"),
					DefaultValue:          &defaultValue,
					Description:           common.String("EXAMPLE-description-Value"),
					IsOutput:              common.Bool(false),
					OutputAggregationType: dataintegration.ParameterOutputAggregationTypeCount,
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_VsiqU": dataintegration.ConfigParameterValue{IntValue: common.Int(933),
						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")}},
					UsedFor:                common.String("EXAMPLE-usedFor-Value"),
					IsInput:                common.Bool(false),
					Key:                    common.String("EXAMPLE-key-Value"),
					ObjectStatus:           common.Int(593),
					RootObjectDefaultValue: &rootObjectDefaultValue,
					ModelVersion:           common.String("EXAMPLE-modelVersion-Value"),
					Name:                   common.String("EXAMPLE-name-Value")}},
				IsSkipNoMatch: common.Bool(true),
				LookupCondition: &dataintegration.Expression{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_qLmjG": dataintegration.ConfigParameterValue{IntValue: common.Int(38),
					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(677),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
				ObjectStatus: common.Int(87),
				InputPorts: []dataintegration.InputPort{dataintegration.InputPort{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_mG8P2": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
					ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(635)}},
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
					Name:        common.String("EXAMPLE-name-Value"),
					Description: common.String("EXAMPLE-description-Value"),
					Fields: []dataintegration.TypedObject{dataintegration.MaterializedDynamicField{Name: common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(635),
						Type: &dataintegration.MaterializedCompositeType{ConfigDefinition: &dataintegration.ConfigDefinition{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(799),
							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_crJhW": dataintegration.ConfigParameterDefinition{ParameterType: dataintegration.DataType{Description: common.String("EXAMPLE-description-Value"),
								DtType:         dataintegration.DataTypeDtTypeStructured,
								Key:            common.String("EXAMPLE-key-Value"),
								ObjectStatus:   common.Int(507),
								TypeSystemName: common.String("EXAMPLE-typeSystemName-Value"),
								ModelVersion:   common.String("EXAMPLE-modelVersion-Value"),
								Name:           common.String("EXAMPLE-name-Value"),
								ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
									Parent: common.String("EXAMPLE-parent-Value")}},
								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")}}},
							Elements:     []string{"EXAMPLE--Value"},
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(96),
							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"),
							PathNames:   []string{"EXAMPLE--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_Gkhkv": dataintegration.ConfigParameterValue{IntValue: common.Int(881),
								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"),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						Scope: common.String("EXAMPLE-scope-Value")}},
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(103),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					PortType: dataintegration.InputPortPortTypeModel}},
				ModelVersion:       common.String("EXAMPLE-modelVersion-Value"),
				MultiMatchStrategy: dataintegration.LookupMultiMatchStrategyLast,
				OutputPorts: []dataintegration.TypedObject{dataintegration.ShapeField{Labels: []string{"EXAMPLE--Value"},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(996),
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_XDGq7": dataintegration.ConfigParameterValue{IntValue: common.Int(650),
						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"),
					NativeShapeField: &dataintegration.NativeShapeField{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_pWkt1": dataintegration.ConfigParameterValue{IntValue: common.Int(677),
						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")}},
						DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
						IsMandatory:        common.Bool(false),
						Name:               common.String("EXAMPLE-name-Value"),
						Position:           common.Int(974),
						Type:               &type_},
					ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
						Parent: common.String("EXAMPLE-parent-Value")},
					Type: &type_,
					Key:  common.String("EXAMPLE-key-Value")}},
				Description:    common.String("EXAMPLE-description-Value"),
				Name:           common.String("EXAMPLE-name-Value"),
				NullFillValues: map[string]interface{}{"EXAMPLE_KEY_KWvnf": "EXAMPLE--Value"},
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
				OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{ObjectStatus: common.Int(434),
					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"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")}},
				UiProperties: &dataintegration.UiProperties{CoordinateX: common.Float32(9518.831),
					CoordinateY: common.Float32(5929.793)},
				Description: common.String("EXAMPLE-description-Value"),
				InputLinks: []dataintegration.InputLink{dataintegration.InputLink{FromLink: common.String("EXAMPLE-fromLink-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")},
					Port:        common.String("EXAMPLE-port-Value"),
					Description: common.String("EXAMPLE-description-Value"),
					FieldMap: dataintegration.CompositeFieldMap{Key: common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						ObjectStatus: common.Int(231),
						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_I0Yav": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(818)}},
							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")},
					ObjectStatus: common.Int(834)}},
				Key:          common.String("EXAMPLE-key-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(757),
				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"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value")}},
			ObjectStatus:  common.Int(524),
			ObjectVersion: common.Int(612)}}

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

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