// 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 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 scope interface{}
	scope = "EXAMPLE-scope-Value"
	var rootObjectDefaultValue interface{}
	rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	req := dataintegration.UpdateDataFlowRequest{OpcRequestId: common.String("SE59BY8RVWRJTASO1MFB<unique_ID>"),
		UpdateDataFlowDetails: dataintegration.UpdateDataFlowDetails{Description: common.String("EXAMPLE-description-Value"),
			ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
			ObjectStatus:  common.Int(419),
			ObjectVersion: common.Int(645),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			FlowConfigValues: &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_DYJab": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
					StringValue:    common.String("EXAMPLE-stringValue-Value"),
					IntValue:       common.Int(698),
					ObjectValue:    &objectValue,
					ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
					RefValue:       &refValue}}},
			Identifier: common.String("EXAMPLE-identifier-Value"),
			Key:        common.String("EXAMPLE-key-Value"),
			ModelType:  common.String("EXAMPLE-modelType-Value"),
			Name:       common.String("EXAMPLE-name-Value"),
			Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{Operator: dataintegration.SortOper{Name: common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(797),
				OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_ZbiQo": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
					ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(940)}},
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
				OutputPorts: []dataintegration.TypedObject{dataintegration.MaterializedDynamicField{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")},
					Scope: common.String("EXAMPLE-scope-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_qC1UQ": dataintegration.ConfigParameterValue{IntValue: common.Int(623),
							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"),
					ObjectStatus: common.Int(366),
					Type: &dataintegration.MaterializedCompositeType{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")},
						PathNames: []string{"EXAMPLE--Value"},
						ConfigDefinition: &dataintegration.ConfigDefinition{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(309),
							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_LhgdY": dataintegration.ConfigParameterDefinition{IsStatic: common.Bool(false),
								ParameterName:     common.String("EXAMPLE-parameterName-Value"),
								ClassFieldName:    common.String("EXAMPLE-classFieldName-Value"),
								DefaultValue:      &defaultValue,
								Description:       common.String("EXAMPLE-description-Value"),
								IsClassFieldValue: common.Bool(true)}},
							IsContained: common.Bool(true),
							Key:         common.String("EXAMPLE-key-Value")},
						Description:  common.String("EXAMPLE-description-Value"),
						Elements:     []string{"EXAMPLE--Value"},
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(723)}}},
				InputPorts: []dataintegration.InputPort{dataintegration.InputPort{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_Mbg6p": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(905),
					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"),
					Fields: []dataintegration.TypedObject{dataintegration.InputProxyField{Key: common.String("EXAMPLE-key-Value"),
						Labels:       []string{"EXAMPLE--Value"},
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Scope:        &scope,
						Type: dataintegration.JavaType{Description: common.String("EXAMPLE-description-Value"),
							JavaTypeName: common.String("EXAMPLE-javaTypeName-Value"),
							Key:          common.String("EXAMPLE-key-Value"),
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value"),
							ConfigDefinition: &dataintegration.ConfigDefinition{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
								Name:         common.String("EXAMPLE-name-Value"),
								ObjectStatus: common.Int(506),
								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_io3Qv": dataintegration.ConfigParameterDefinition{IsStatic: common.Bool(false),
									ParameterName:     common.String("EXAMPLE-parameterName-Value"),
									ClassFieldName:    common.String("EXAMPLE-classFieldName-Value"),
									DefaultValue:      &defaultValue,
									Description:       common.String("EXAMPLE-description-Value"),
									IsClassFieldValue: common.Bool(false)}},
								IsContained: common.Bool(true),
								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")},
							ObjectStatus: common.Int(534)},
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_8QSxR": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(705)}},
							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"),
						ObjectStatus: common.Int(220),
						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"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(870),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					PortType: dataintegration.InputPortPortTypeControl}},
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				SortKey: &dataintegration.SortKey{SortRules: []dataintegration.SortKeyRule{dataintegration.SortKeyRule{IsAscending: common.Bool(false),
					WrappedRule: dataintegration.TypeListRule{Description: common.String("EXAMPLE-description-Value"),
						MatchingStrategy: dataintegration.TypeListRuleMatchingStrategyTagsOnly,
						Types:            []interface{}{"EXAMPLE-types-Value"},
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_Y6mC3": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(265)}},
							ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
								Parent: common.String("EXAMPLE-parent-Value")}},
						IsCascade:                   common.Bool(false),
						Key:                         common.String("EXAMPLE-key-Value"),
						RuleType:                    dataintegration.TypeListRuleRuleTypeInclude,
						IsJavaRegexSyntax:           common.Bool(false),
						IsSkipRemainingRulesOnMatch: common.Bool(true),
						ModelVersion:                common.String("EXAMPLE-modelVersion-Value"),
						ObjectStatus:                common.Int(556),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						IsCaseSensitive: common.Bool(false),
						Scope:           &scope}}}},
				Description:   common.String("EXAMPLE-description-Value"),
				Identifier:    common.String("EXAMPLE-identifier-Value"),
				Key:           common.String("EXAMPLE-key-Value"),
				ObjectVersion: common.Int(917),
				Parameters: []dataintegration.Parameter{dataintegration.Parameter{Description: common.String("EXAMPLE-description-Value"),
					IsOutput:               common.Bool(true),
					ObjectStatus:           common.Int(262),
					Key:                    common.String("EXAMPLE-key-Value"),
					ModelVersion:           common.String("EXAMPLE-modelVersion-Value"),
					UsedFor:                common.String("EXAMPLE-usedFor-Value"),
					RootObjectDefaultValue: &rootObjectDefaultValue,
					TypeName:               common.String("EXAMPLE-typeName-Value"),
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_kqoF8": dataintegration.ConfigParameterValue{RefValue: &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(599),
						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")}},
					DefaultValue:          &defaultValue,
					Name:                  common.String("EXAMPLE-name-Value"),
					OutputAggregationType: dataintegration.ParameterOutputAggregationTypeCount,
					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_}},
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
				UiProperties: &dataintegration.UiProperties{CoordinateX: common.Float32(3522.7769),
					CoordinateY: common.Float32(2468.086)},
				InputLinks: []dataintegration.InputLink{dataintegration.InputLink{FromLink: common.String("EXAMPLE-fromLink-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					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"),
					Description: common.String("EXAMPLE-description-Value"),
					FieldMap: dataintegration.CompositeFieldMap{Key: common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						ObjectStatus: common.Int(573),
						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_kXj2k": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(941),
							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")},
					Key:          common.String("EXAMPLE-key-Value"),
					ObjectStatus: common.Int(943)}},
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(145),
				OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{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"),
					ObjectStatus: common.Int(442)}},
				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"),
				ModelType:   common.String("EXAMPLE-modelType-Value")}},
			Parameters: []dataintegration.Parameter{dataintegration.Parameter{ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
				Parent: common.String("EXAMPLE-parent-Value")},
				IsInput:                common.Bool(true),
				OutputAggregationType:  dataintegration.ParameterOutputAggregationTypeSum,
				Key:                    common.String("EXAMPLE-key-Value"),
				Description:            common.String("EXAMPLE-description-Value"),
				IsOutput:               common.Bool(true),
				ModelVersion:           common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus:           common.Int(826),
				Type:                   &type_,
				TypeName:               common.String("EXAMPLE-typeName-Value"),
				DefaultValue:           &defaultValue,
				Name:                   common.String("EXAMPLE-name-Value"),
				RootObjectDefaultValue: &rootObjectDefaultValue,
				UsedFor:                common.String("EXAMPLE-usedFor-Value"),
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_GS52o": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
					ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value"),
					IntValue:        common.Int(435)}},
					ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
						Parent: common.String("EXAMPLE-parent-Value")}}}},
			RegistryMetadata: &dataintegration.RegistryMetadata{IsFavorite: common.Bool(true),
				Key:             common.String("EXAMPLE-key-Value"),
				Labels:          []string{"EXAMPLE--Value"},
				RegistryVersion: common.Int(242),
				AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value")}},
		WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		DataFlowKey: common.String("EXAMPLE-dataFlowKey-Value"),
		IfMatch:     common.String("EXAMPLE-ifMatch-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)
}