/** 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(814)
.objectStatus(207)
.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(RuleBasedEntityMap.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_ZuWHn",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(388)
.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())
.mapType(RuleBasedEntityMap.MapType.Mapbypattern)
.fromPattern("EXAMPLE-fromPattern-Value")
.toPattern("EXAMPLE-toPattern-Value")
.isJavaRegexSyntax(true)
.objectStatus(438)
.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(190)
.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(650)
.description("EXAMPLE-description-Value")
.port("EXAMPLE-port-Value").build())))
.operator(Projection.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(276)
.inputPorts(new ArrayList<>(Arrays.asList(InputPort.builder()
.portType(InputPort.PortType.Data)
.fields(new ArrayList<>(Arrays.asList(DerivedField.builder()
.expr(Expression.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())
.exprString("EXAMPLE-exprString-Value")
.configValues(ConfigValues.builder()
.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
{
put("EXAMPLE_KEY_rHGa9",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(394)
.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(914).build())
.type("EXAMPLE-type-Value")
.isUseInferredType(true)
.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_7d3Ef",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(611)
.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(121)
.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_WTMo1",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(135)
.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(17)
.name("EXAMPLE-name-Value")
.description("EXAMPLE-description-Value").build())))
.outputPorts(new ArrayList<>(Arrays.asList(ShapeField.builder()
.type("EXAMPLE-type-Value")
.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
.nativeShapeField(NativeShapeField.builder()
.name("EXAMPLE-name-Value")
.modelType("EXAMPLE-modelType-Value")
.type("EXAMPLE-type-Value")
.configValues(ConfigValues.builder()
.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
{
put("EXAMPLE_KEY_OUJcj",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(150)
.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())
.position(119)
.defaultValueString("EXAMPLE-defaultValueString-Value")
.isMandatory(false).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_czSLH",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(198)
.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(335)
.name("EXAMPLE-name-Value")
.description("EXAMPLE-description-Value").build())))
.objectStatus(835)
.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(true)
.outputAggregationType(Parameter.OutputAggregationType.Min)
.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_u2YhL",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(127)
.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(759)
.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_YUidP",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(54)
.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("5290.39"))
.coordinateY(new BigDecimal("1666.4547")).build())
.objectStatus(748).build())))
.parameters(new ArrayList<>(Arrays.asList(Parameter.builder()
.type("EXAMPLE-type-Value")
.defaultValue("EXAMPLE-defaultValue-Value")
.rootObjectDefaultValue("EXAMPLE-rootObjectDefaultValue-Value")
.isInput(true)
.isOutput(false)
.outputAggregationType(Parameter.OutputAggregationType.Max)
.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_RQmDn",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(663)
.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(67)
.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_WeQae",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(136)
.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(288)
.objectStatus(531)
.identifier("EXAMPLE-identifier-Value")
.type(DataType.builder()
.dtType(DataType.DtType.Structured)
.typeSystemName("EXAMPLE-typeSystemName-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(true)
.objectStatus(70)
.configParameterDefinitions(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterDefinition>() {
{
put("EXAMPLE_KEY_1mbh3",ConfigParameterDefinition.builder()
.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(827)
.description("EXAMPLE-description-Value").build())
.configValues(ConfigValues.builder()
.configParamValues(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterValue>() {
{
put("EXAMPLE_KEY_hn5cP",ConfigParameterValue.builder()
.stringValue("EXAMPLE-stringValue-Value")
.intValue(164)
.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(221).build()).build())))
.registryMetadata(RegistryMetadata.builder()
.aggregatorKey("EXAMPLE-aggregatorKey-Value")
.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
.registryVersion(268)
.key("EXAMPLE-key-Value")
.isFavorite(true).build()).build();
UpdatePipelineRequest updatePipelineRequest = UpdatePipelineRequest.builder()
.workspaceId("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")
.pipelineKey("EXAMPLE-pipelineKey-Value")
.updatePipelineDetails(updatePipelineDetails)
.opcRequestId("WPSULSQUNCACZIUNPQ56<unique_ID>")
.ifMatch("EXAMPLE-ifMatch-Value").build();
/* Send request to the Client */
UpdatePipelineResponse response = client.updatePipeline(updatePipelineRequest);
}
}