// 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 objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	var rootObjectDefaultValue interface{}
	rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var scope interface{}
	scope = "EXAMPLE-scope-Value"
	req := dataintegration.UpdateDataFlowRequest{DataFlowKey: common.String("EXAMPLE-dataFlowKey-Value"),
		IfMatch:      common.String("EXAMPLE-ifMatch-Value"),
		OpcRequestId: common.String("R9ETGTOO6HBIOI4TNDR0<unique_ID>"),
		UpdateDataFlowDetails: dataintegration.UpdateDataFlowDetails{Description: common.String("EXAMPLE-description-Value"),
			FlowConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_8xyQf": dataintegration.ConfigParameterValue{IntValue: common.Int(386),
				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"),
			Key:        common.String("EXAMPLE-key-Value"),
			ModelType:  common.String("EXAMPLE-modelType-Value"),
			Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{Description: common.String("EXAMPLE-description-Value"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus: common.Int(523),
				Operator: dataintegration.Projection{Description: common.String("EXAMPLE-description-Value"),
					Identifier: common.String("EXAMPLE-identifier-Value"),
					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_GoAKJ": dataintegration.ConfigParameterValue{RefValue: &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(652),
							ObjectValue:     &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}}},
						Description: common.String("EXAMPLE-description-Value"),
						Fields: []dataintegration.TypedObject{dataintegration.AbstractField{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_cvp5S": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
								ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
								RefValue:        &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(1)}},
								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"),
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(605)}},
						Key:          common.String("EXAMPLE-key-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(255),
						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.InputPortPortTypeData}},
					Key:           common.String("EXAMPLE-key-Value"),
					ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
					Name:          common.String("EXAMPLE-name-Value"),
					ObjectVersion: common.Int(963),
					ObjectStatus:  common.Int(451),
					OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_sh6sZ": dataintegration.ConfigParameterValue{IntValue: common.Int(919),
						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")}},
					OutputPorts: []dataintegration.TypedObject{dataintegration.ShapeField{Key: common.String("EXAMPLE-key-Value"),
						NativeShapeField: &dataintegration.NativeShapeField{Name: common.String("EXAMPLE-name-Value"),
							Position: common.Int(169),
							Type:     &type_,
							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_KyNAC": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
									RefValue:        &refValue,
									RootObjectValue: &rootObjectValue,
									StringValue:     common.String("EXAMPLE-stringValue-Value"),
									IntValue:        common.Int(173),
									ObjectValue:     &objectValue}}},
							DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
							IsMandatory:        common.Bool(false)},
						ObjectStatus: common.Int(374),
						Type:         &type_,
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_qczpL": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(268),
							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"),
						Labels:       []string{"EXAMPLE--Value"},
						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")}}},
					Parameters: []dataintegration.Parameter{dataintegration.Parameter{IsOutput: common.Bool(false),
						Key:                    common.String("EXAMPLE-key-Value"),
						ModelVersion:           common.String("EXAMPLE-modelVersion-Value"),
						Name:                   common.String("EXAMPLE-name-Value"),
						ObjectStatus:           common.Int(88),
						RootObjectDefaultValue: &rootObjectDefaultValue,
						Type:                   &type_,
						TypeName:               common.String("EXAMPLE-typeName-Value"),
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_jqI2Z": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(93),
							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"),
						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),
						OutputAggregationType: dataintegration.ParameterOutputAggregationTypeMax,
						UsedFor:               common.String("EXAMPLE-usedFor-Value")}},
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
				ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
					Parent: common.String("EXAMPLE-parent-Value")},
				InputLinks: []dataintegration.InputLink{dataintegration.InputLink{Description: common.String("EXAMPLE-description-Value"),
					FieldMap: dataintegration.RuleBasedFieldMap{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")},
						ToRuleConfig: &dataintegration.RuleTypeConfig{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
							ScopeReference: &dataintegration.ScopeReference{ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
								ReferenceType: dataintegration.ScopeReferenceReferenceTypeBoundEntityShapeField,
								RefObjectName: common.String("EXAMPLE-refObjectName-Value")},
							IsOrderByRule: common.Bool(false),
							ProjectionRules: []dataintegration.ProjectionRule{dataintegration.GroupedNamePatternRule{IsSkipRemainingRulesOnMatch: common.Bool(false),
								IsCaseSensitive:   common.Bool(false),
								Name:              common.String("EXAMPLE-name-Value"),
								Scope:             &scope,
								Description:       common.String("EXAMPLE-description-Value"),
								IsCascade:         common.Bool(true),
								IsJavaRegexSyntax: common.Bool(false),
								MatchingStrategy:  dataintegration.GroupedNamePatternRuleMatchingStrategyNameOnly,
								ObjectStatus:      common.Int(415),
								ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_BMeuL": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
									ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
									RefValue:        &refValue,
									RootObjectValue: &rootObjectValue,
									StringValue:     common.String("EXAMPLE-stringValue-Value"),
									IntValue:        common.Int(105)}},
									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"),
								ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
									RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
								Pattern:  common.String("EXAMPLE-pattern-Value"),
								RuleType: dataintegration.GroupedNamePatternRuleRuleTypeInclude}},
							Scope: &scope,
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_uLcbI": 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")}},
							Key:          common.String("EXAMPLE-key-Value"),
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							ObjectStatus: common.Int(4)},
						Description: common.String("EXAMPLE-description-Value"),
						FromPattern: common.String("EXAMPLE-fromPattern-Value"),
						FromRuleConfig: &dataintegration.RuleTypeConfig{ProjectionRules: []dataintegration.ProjectionRule{dataintegration.NameListRule{ObjectStatus: common.Int(761),
							ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
								RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
							RuleType:                    dataintegration.NameListRuleRuleTypeExclude,
							IsCascade:                   common.Bool(false),
							IsCaseSensitive:             common.Bool(false),
							IsSkipRemainingRulesOnMatch: common.Bool(true),
							Key:                         common.String("EXAMPLE-key-Value"),
							Names:                       []string{"EXAMPLE--Value"},
							Scope:                       &scope,
							ModelVersion:                common.String("EXAMPLE-modelVersion-Value"),
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_snGUt": dataintegration.ConfigParameterValue{IntValue: common.Int(144),
								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),
							MatchingStrategy:  dataintegration.NameListRuleMatchingStrategyNameOnly}},
							Scope: &scope,
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_M4e3I": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
								StringValue:    common.String("EXAMPLE-stringValue-Value"),
								IntValue:       common.Int(973),
								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")}},
							IsOrderByRule: common.Bool(true),
							ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
							ObjectStatus:  common.Int(626),
							ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
								RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
							ScopeReference: &dataintegration.ScopeReference{RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
								ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
								ReferenceType:   dataintegration.ScopeReferenceReferenceTypeOciFunctionOutputShape},
							Key: common.String("EXAMPLE-key-Value")},
						IsJavaRegexSyntax: common.Bool(true),
						ObjectStatus:      common.Int(85),
						ToPattern:         common.String("EXAMPLE-toPattern-Value"),
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_fxmyV": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(396),
							ObjectValue:     &objectValue}},
							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"),
						MapType: dataintegration.RuleBasedFieldMapMapTypeMapbypattern},
					ObjectStatus: common.Int(88),
					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")}},
				Key:       common.String("EXAMPLE-key-Value"),
				ModelType: common.String("EXAMPLE-modelType-Value"),
				Name:      common.String("EXAMPLE-name-Value"),
				OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(470),
					ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
						Parent: common.String("EXAMPLE-parent-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(9556.242),
					CoordinateY: common.Float32(4429.638)}}},
			Parameters: []dataintegration.Parameter{dataintegration.Parameter{RootObjectDefaultValue: &rootObjectDefaultValue,
				DefaultValue:          &defaultValue,
				Description:           common.String("EXAMPLE-description-Value"),
				IsInput:               common.Bool(true),
				Key:                   common.String("EXAMPLE-key-Value"),
				OutputAggregationType: dataintegration.ParameterOutputAggregationTypeMin,
				Type:                  &type_,
				IsOutput:              common.Bool(false),
				ModelVersion:          common.String("EXAMPLE-modelVersion-Value"),
				Name:                  common.String("EXAMPLE-name-Value"),
				TypeName:              common.String("EXAMPLE-typeName-Value"),
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_DbEqf": dataintegration.ConfigParameterValue{RefValue: &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(331),
					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")}},
				ObjectStatus: common.Int(184),
				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")}},
			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(354)},
			ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
			Name:          common.String("EXAMPLE-name-Value"),
			ObjectStatus:  common.Int(157),
			ObjectVersion: common.Int(347),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
		WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")}

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