/** 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).
*/

import com.oracle.bmc.ConfigFileReader;
import com.oracle.bmc.auth.AuthenticationDetailsProvider;
import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider;
import com.oracle.bmc.dataintegration.DataIntegrationClient;
import com.oracle.bmc.dataintegration.model.*;
import com.oracle.bmc.dataintegration.requests.*;
import com.oracle.bmc.dataintegration.responses.*;
import java.math.BigDecimal;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Date;
import java.util.UUID;
import java.util.Arrays;


public class UpdatePipelineExample {
    public static void main(String[] args) throws Exception {

        /**
         * 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.
         */
        final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault();
        final AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(configFile);

        /* Create a service client */
        DataIntegrationClient client = DataIntegrationClient.builder().build(provider);

        /* Create a request and dependent object(s). */
	UpdatePipelineDetails updatePipelineDetails = UpdatePipelineDetails.builder()
		.key("EXAMPLE-key-Value")
		.modelType("EXAMPLE-modelType-Value")
		.modelVersion("EXAMPLE-modelVersion-Value")
		.parentRef(ParentReference.builder()
			.parent("EXAMPLE-parent-Value")
			.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
		.name("EXAMPLE-name-Value")
		.description("EXAMPLE-description-Value")
		.objectVersion(756)
		.objectStatus(744)
		.identifier("EXAMPLE-identifier-Value")
		.nodes(new ArrayList<>(Arrays.asList(FlowNode.builder()
				.key("EXAMPLE-key-Value")
				.modelType("EXAMPLE-modelType-Value")
				.modelVersion("EXAMPLE-modelVersion-Value")
				.parentRef(ParentReference.builder()
					.parent("EXAMPLE-parent-Value")
					.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
				.name("EXAMPLE-name-Value")
				.description("EXAMPLE-description-Value")
				.inputLinks(new ArrayList<>(Arrays.asList(InputLink.builder()
						.fromLink("EXAMPLE-fromLink-Value")
						.fieldMap(NamedEntityMap.builder()
							.key("EXAMPLE-key-Value")
							.modelVersion("EXAMPLE-modelVersion-Value")
							.parentRef(ParentReference.builder()
								.parent("EXAMPLE-parent-Value")
								.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
							.configValues(ConfigValues.builder()
								.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
										{
											put("EXAMPLE_KEY_RLS6m",ConfigParameterValue.builder()
										.stringValue("EXAMPLE-stringValue-Value")
										.intValue(884)
										.objectValue("EXAMPLE-objectValue-Value")
										.refValue("EXAMPLE-refValue-Value")
										.parameterValue("EXAMPLE-parameterValue-Value")
										.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
										}
 									})
								.parentRef(ParentReference.builder()
									.parent("EXAMPLE-parent-Value")
									.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
							.sourceEntity("EXAMPLE-sourceEntity-Value")
							.targetEntity("EXAMPLE-targetEntity-Value")
							.objectStatus(445)
							.description("EXAMPLE-description-Value").build())
						.key("EXAMPLE-key-Value")
						.modelVersion("EXAMPLE-modelVersion-Value")
						.parentRef(ParentReference.builder()
							.parent("EXAMPLE-parent-Value")
							.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
						.objectStatus(236)
						.description("EXAMPLE-description-Value")
						.port("EXAMPLE-port-Value").build())))
				.outputLinks(new ArrayList<>(Arrays.asList(OutputLink.builder()
						.toLinks(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
						.key("EXAMPLE-key-Value")
						.modelVersion("EXAMPLE-modelVersion-Value")
						.parentRef(ParentReference.builder()
							.parent("EXAMPLE-parent-Value")
							.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
						.objectStatus(147)
						.description("EXAMPLE-description-Value")
						.port("EXAMPLE-port-Value").build())))
				.operator(StartOperator.builder()
					.key("EXAMPLE-key-Value")
					.modelVersion("EXAMPLE-modelVersion-Value")
					.parentRef(ParentReference.builder()
						.parent("EXAMPLE-parent-Value")
						.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
					.name("EXAMPLE-name-Value")
					.description("EXAMPLE-description-Value")
					.objectVersion(386)
					.inputPorts(new ArrayList<>(Arrays.asList(InputPort.builder()
							.portType(InputPort.PortType.Data)
							.fields(new ArrayList<>(Arrays.asList(DynamicProxyField.builder()
									.type(MaterializedCompositeType.builder()
										.elements(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
										.pathNames(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
										.configDefinition(ConfigDefinition.builder()
											.key("EXAMPLE-key-Value")
											.modelType("EXAMPLE-modelType-Value")
											.modelVersion("EXAMPLE-modelVersion-Value")
											.parentRef(ParentReference.builder()
												.parent("EXAMPLE-parent-Value")
												.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
											.name("EXAMPLE-name-Value")
											.isContained(false)
											.objectStatus(666)
											.configParameterDefinitions(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterDefinition>() {
													{
														put("EXAMPLE_KEY_15Hvc",ConfigParameterDefinition.builder()
													.parameterName("EXAMPLE-parameterName-Value")
													.description("EXAMPLE-description-Value")
													.defaultValue("EXAMPLE-defaultValue-Value")
													.classFieldName("EXAMPLE-classFieldName-Value")
													.isStatic(true)
													.isClassFieldValue(false).build());
													}
 												}).build())
										.key("EXAMPLE-key-Value")
										.modelVersion("EXAMPLE-modelVersion-Value")
										.parentRef(ParentReference.builder()
											.parent("EXAMPLE-parent-Value")
											.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
										.name("EXAMPLE-name-Value")
										.objectStatus(331)
										.description("EXAMPLE-description-Value").build())
									.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
									.key("EXAMPLE-key-Value")
									.modelVersion("EXAMPLE-modelVersion-Value")
									.parentRef(ParentReference.builder()
										.parent("EXAMPLE-parent-Value")
										.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
									.configValues(ConfigValues.builder()
										.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
												{
													put("EXAMPLE_KEY_xgGEl",ConfigParameterValue.builder()
												.stringValue("EXAMPLE-stringValue-Value")
												.intValue(624)
												.objectValue("EXAMPLE-objectValue-Value")
												.refValue("EXAMPLE-refValue-Value")
												.parameterValue("EXAMPLE-parameterValue-Value")
												.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
												}
 											})
										.parentRef(ParentReference.builder()
											.parent("EXAMPLE-parent-Value")
											.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
									.objectStatus(372)
									.name("EXAMPLE-name-Value")
									.description("EXAMPLE-description-Value").build())))
							.key("EXAMPLE-key-Value")
							.modelVersion("EXAMPLE-modelVersion-Value")
							.parentRef(ParentReference.builder()
								.parent("EXAMPLE-parent-Value")
								.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
							.configValues(ConfigValues.builder()
								.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
										{
											put("EXAMPLE_KEY_AsJRy",ConfigParameterValue.builder()
										.stringValue("EXAMPLE-stringValue-Value")
										.intValue(986)
										.objectValue("EXAMPLE-objectValue-Value")
										.refValue("EXAMPLE-refValue-Value")
										.parameterValue("EXAMPLE-parameterValue-Value")
										.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
										}
 									})
								.parentRef(ParentReference.builder()
									.parent("EXAMPLE-parent-Value")
									.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
							.objectStatus(845)
							.name("EXAMPLE-name-Value")
							.description("EXAMPLE-description-Value").build())))
					.outputPorts(new ArrayList<>(Arrays.asList(MaterializedDynamicField.builder()
							.scope("EXAMPLE-scope-Value")
							.type(MaterializedCompositeType.builder()
								.elements(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
								.pathNames(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
								.configDefinition(ConfigDefinition.builder()
									.key("EXAMPLE-key-Value")
									.modelType("EXAMPLE-modelType-Value")
									.modelVersion("EXAMPLE-modelVersion-Value")
									.parentRef(ParentReference.builder()
										.parent("EXAMPLE-parent-Value")
										.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
									.name("EXAMPLE-name-Value")
									.isContained(false)
									.objectStatus(103)
									.configParameterDefinitions(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterDefinition>() {
											{
												put("EXAMPLE_KEY_AXDIy",ConfigParameterDefinition.builder()
											.parameterType(DataType.builder()
												.dtType(DataType.DtType.Primitive)
												.typeSystemName("EXAMPLE-typeSystemName-Value")
												.key("EXAMPLE-key-Value")
												.modelVersion("EXAMPLE-modelVersion-Value")
												.parentRef(ParentReference.builder()
													.parent("EXAMPLE-parent-Value")
													.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
												.name("EXAMPLE-name-Value")
												.objectStatus(524)
												.description("EXAMPLE-description-Value").build())
											.parameterName("EXAMPLE-parameterName-Value")
											.description("EXAMPLE-description-Value")
											.defaultValue("EXAMPLE-defaultValue-Value")
											.classFieldName("EXAMPLE-classFieldName-Value")
											.isStatic(false)
											.isClassFieldValue(true).build());
											}
 										}).build())
								.key("EXAMPLE-key-Value")
								.modelVersion("EXAMPLE-modelVersion-Value")
								.parentRef(ParentReference.builder()
									.parent("EXAMPLE-parent-Value")
									.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
								.name("EXAMPLE-name-Value")
								.objectStatus(577)
								.description("EXAMPLE-description-Value").build())
							.key("EXAMPLE-key-Value")
							.modelVersion("EXAMPLE-modelVersion-Value")
							.parentRef(ParentReference.builder()
								.parent("EXAMPLE-parent-Value")
								.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
							.configValues(ConfigValues.builder()
								.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
										{
											put("EXAMPLE_KEY_eC2BJ",ConfigParameterValue.builder()
										.stringValue("EXAMPLE-stringValue-Value")
										.intValue(798)
										.objectValue("EXAMPLE-objectValue-Value")
										.refValue("EXAMPLE-refValue-Value")
										.parameterValue("EXAMPLE-parameterValue-Value")
										.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
										}
 									})
								.parentRef(ParentReference.builder()
									.parent("EXAMPLE-parent-Value")
									.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
							.objectStatus(630)
							.name("EXAMPLE-name-Value")
							.description("EXAMPLE-description-Value").build())))
					.objectStatus(348)
					.identifier("EXAMPLE-identifier-Value")
					.parameters(new ArrayList<>(Arrays.asList(Parameter.builder()
							.type("EXAMPLE-type-Value")
							.defaultValue("EXAMPLE-defaultValue-Value")
							.rootObjectDefaultValue("EXAMPLE-rootObjectDefaultValue-Value")
							.isInput(false)
							.isOutput(false)
							.outputAggregationType(Parameter.OutputAggregationType.Count)
							.typeName("EXAMPLE-typeName-Value")
							.usedFor("EXAMPLE-usedFor-Value")
							.key("EXAMPLE-key-Value")
							.modelVersion("EXAMPLE-modelVersion-Value")
							.parentRef(ParentReference.builder()
								.parent("EXAMPLE-parent-Value")
								.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
							.configValues(ConfigValues.builder()
								.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
										{
											put("EXAMPLE_KEY_IWrOp",ConfigParameterValue.builder()
										.stringValue("EXAMPLE-stringValue-Value")
										.intValue(759)
										.objectValue("EXAMPLE-objectValue-Value")
										.refValue("EXAMPLE-refValue-Value")
										.parameterValue("EXAMPLE-parameterValue-Value")
										.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
										}
 									})
								.parentRef(ParentReference.builder()
									.parent("EXAMPLE-parent-Value")
									.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
							.objectStatus(373)
							.name("EXAMPLE-name-Value")
							.description("EXAMPLE-description-Value").build())))
					.opConfigValues(ConfigValues.builder()
						.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
								{
									put("EXAMPLE_KEY_RcOnW",ConfigParameterValue.builder()
								.stringValue("EXAMPLE-stringValue-Value")
								.intValue(94)
								.objectValue("EXAMPLE-objectValue-Value")
								.refValue("EXAMPLE-refValue-Value")
								.parameterValue("EXAMPLE-parameterValue-Value")
								.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
								}
 							})
						.parentRef(ParentReference.builder()
							.parent("EXAMPLE-parent-Value")
							.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build()).build())
				.uiProperties(UIProperties.builder()
					.coordinateX(new BigDecimal("4404.675"))
					.coordinateY(new BigDecimal("5543.4863")).build())
				.objectStatus(547).build())))
		.parameters(new ArrayList<>(Arrays.asList(Parameter.builder()
				.type("EXAMPLE-type-Value")
				.defaultValue("EXAMPLE-defaultValue-Value")
				.rootObjectDefaultValue("EXAMPLE-rootObjectDefaultValue-Value")
				.isInput(false)
				.isOutput(false)
				.outputAggregationType(Parameter.OutputAggregationType.Count)
				.typeName("EXAMPLE-typeName-Value")
				.usedFor("EXAMPLE-usedFor-Value")
				.key("EXAMPLE-key-Value")
				.modelVersion("EXAMPLE-modelVersion-Value")
				.parentRef(ParentReference.builder()
					.parent("EXAMPLE-parent-Value")
					.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
				.configValues(ConfigValues.builder()
					.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
							{
								put("EXAMPLE_KEY_RqA2j",ConfigParameterValue.builder()
							.stringValue("EXAMPLE-stringValue-Value")
							.intValue(840)
							.objectValue("EXAMPLE-objectValue-Value")
							.refValue("EXAMPLE-refValue-Value")
							.parameterValue("EXAMPLE-parameterValue-Value")
							.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
							}
 						})
					.parentRef(ParentReference.builder()
						.parent("EXAMPLE-parent-Value")
						.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
				.objectStatus(947)
				.name("EXAMPLE-name-Value")
				.description("EXAMPLE-description-Value").build())))
		.flowConfigValues(ConfigValues.builder()
			.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
					{
						put("EXAMPLE_KEY_9YpSn",ConfigParameterValue.builder()
					.stringValue("EXAMPLE-stringValue-Value")
					.intValue(203)
					.objectValue("EXAMPLE-objectValue-Value")
					.refValue("EXAMPLE-refValue-Value")
					.parameterValue("EXAMPLE-parameterValue-Value")
					.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
					}
 				})
			.parentRef(ParentReference.builder()
				.parent("EXAMPLE-parent-Value")
				.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
		.variables(new ArrayList<>(Arrays.asList(Variable.builder()
				.key("EXAMPLE-key-Value")
				.modelVersion("EXAMPLE-modelVersion-Value")
				.modelType("EXAMPLE-modelType-Value")
				.parentRef(ParentReference.builder()
					.parent("EXAMPLE-parent-Value")
					.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
				.name("EXAMPLE-name-Value")
				.description("EXAMPLE-description-Value")
				.objectVersion(285)
				.objectStatus(921)
				.identifier("EXAMPLE-identifier-Value")
				.type(DerivedType.builder()
					.key("EXAMPLE-key-Value")
					.modelVersion("EXAMPLE-modelVersion-Value")
					.parentRef(ParentReference.builder()
						.parent("EXAMPLE-parent-Value")
						.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
					.name("EXAMPLE-name-Value")
					.objectStatus(506)
					.description("EXAMPLE-description-Value").build())
				.configValues(ConfigValues.builder()
					.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
							{
								put("EXAMPLE_KEY_3963g",ConfigParameterValue.builder()
							.stringValue("EXAMPLE-stringValue-Value")
							.intValue(61)
							.objectValue("EXAMPLE-objectValue-Value")
							.refValue("EXAMPLE-refValue-Value")
							.parameterValue("EXAMPLE-parameterValue-Value")
							.rootObjectValue("EXAMPLE-rootObjectValue-Value").build());
							}
 						})
					.parentRef(ParentReference.builder()
						.parent("EXAMPLE-parent-Value")
						.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build()).build())
				.defaultValue("EXAMPLE-defaultValue-Value")
				.rootObjectDefaultValue(RootObject.builder()
					.key("EXAMPLE-key-Value")
					.modelType("EXAMPLE-modelType-Value")
					.modelVersion("EXAMPLE-modelVersion-Value")
					.parentRef(ParentReference.builder()
						.parent("EXAMPLE-parent-Value")
						.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
					.objectStatus(132).build()).build())))
		.registryMetadata(RegistryMetadata.builder()
			.aggregatorKey("EXAMPLE-aggregatorKey-Value")
			.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
			.registryVersion(480)
			.key("EXAMPLE-key-Value")
			.isFavorite(false).build()).build();

	UpdatePipelineRequest updatePipelineRequest = UpdatePipelineRequest.builder()
		.workspaceId("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")
		.pipelineKey("EXAMPLE-pipelineKey-Value")
		.updatePipelineDetails(updatePipelineDetails)
		.opcRequestId("TUXQBCKXDP2UFEDPFKHY<unique_ID>")
		.ifMatch("EXAMPLE-ifMatch-Value").build();

        /* Send request to the Client */
        UpdatePipelineResponse response = client.updatePipeline(updatePipelineRequest);
    }

    
}