// 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 * as dataintegration from "oci-dataintegration";
import common = require("oci-common");

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

const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();

(async () => {
    try {
     // Create a service client
     const client = new dataintegration.DataIntegrationClient({ authenticationDetailsProvider: provider });

     // Create a request and dependent object(s).
	const  createPipelineDetails = {
		key: "EXAMPLE-key-Value",
		modelVersion: "EXAMPLE-modelVersion-Value",
		parentRef: {
			parent: "EXAMPLE-parent-Value",
			rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

			}
,
		name: "EXAMPLE-name-Value",
		description: "EXAMPLE-description-Value",
		modelType: "EXAMPLE-modelType-Value",
		objectVersion: 94,
		objectStatus: 602,
		identifier: "EXAMPLE-identifier-Value",
		nodes: [{
				key: "EXAMPLE-key-Value",
				modelType: "EXAMPLE-modelType-Value",
				modelVersion: "EXAMPLE-modelVersion-Value",
				parentRef: {
					parent: "EXAMPLE-parent-Value",
					rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

					}
,
				name: "EXAMPLE-name-Value",
				description: "EXAMPLE-description-Value",
				inputLinks: [{
						modelType: "INPUT_LINK",						fromLink: "EXAMPLE-fromLink-Value",
						fieldMap: {
							modelType: "DIRECT_FIELD_MAP",							key: "EXAMPLE-key-Value",
							modelVersion: "EXAMPLE-modelVersion-Value",
							parentRef: {
								parent: "EXAMPLE-parent-Value",
								rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

								}
,
							configValues: {
								configParamValues: {
									EXAMPLE_KEY_ANciO :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 107,
										objectValue: "EXAMPLE-objectValue-Value",
										refValue: "EXAMPLE-refValue-Value",
										parameterValue: "EXAMPLE-parameterValue-Value",
										rootObjectValue: "EXAMPLE-rootObjectValue-Value",

										}

									},
								parentRef: {
									parent: "EXAMPLE-parent-Value",
									rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

									}
,

								}
,
							sourceTypedObject: "EXAMPLE-sourceTypedObject-Value",
							targetTypedObject: "EXAMPLE-targetTypedObject-Value",
							sourceScopeReference: {
								referenceObject: "EXAMPLE-referenceObject-Value",
								referenceType: dataintegration.models.ScopeReference.ReferenceType.BoundEntityShape,
								refObjectName: "EXAMPLE-refObjectName-Value",

								}
,
							targetScopeReference: {
								referenceObject: "EXAMPLE-referenceObject-Value",
								referenceType: dataintegration.models.ScopeReference.ReferenceType.BoundEntityShapeField,
								refObjectName: "EXAMPLE-refObjectName-Value",

								}
,
							objectStatus: 939,
							description: "EXAMPLE-description-Value"

							}
,
						key: "EXAMPLE-key-Value",
						modelVersion: "EXAMPLE-modelVersion-Value",
						parentRef: {
							parent: "EXAMPLE-parent-Value",
							rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

							}
,
						objectStatus: 871,
						description: "EXAMPLE-description-Value",
						port: "EXAMPLE-port-Value"

						}
						],
				outputLinks: [{
						modelType: "OUTPUT_LINK",						toLinks: ["EXAMPLE--Value"								],
						key: "EXAMPLE-key-Value",
						modelVersion: "EXAMPLE-modelVersion-Value",
						parentRef: {
							parent: "EXAMPLE-parent-Value",
							rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

							}
,
						objectStatus: 332,
						description: "EXAMPLE-description-Value",
						port: "EXAMPLE-port-Value"

						}
						],
				operator: {
					modelType: "LOOKUP_OPERATOR",					lookupCondition: {
						key: "EXAMPLE-key-Value",
						modelType: "EXAMPLE-modelType-Value",
						modelVersion: "EXAMPLE-modelVersion-Value",
						parentRef: {
							parent: "EXAMPLE-parent-Value",
							rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

							}
,
						exprString: "EXAMPLE-exprString-Value",
						configValues: {
							configParamValues: {
								EXAMPLE_KEY_gflJQ :{
									stringValue: "EXAMPLE-stringValue-Value",
									intValue: 353,
									objectValue: "EXAMPLE-objectValue-Value",
									refValue: "EXAMPLE-refValue-Value",
									parameterValue: "EXAMPLE-parameterValue-Value",
									rootObjectValue: "EXAMPLE-rootObjectValue-Value",

									}

								},
							parentRef: {
								parent: "EXAMPLE-parent-Value",
								rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

								}
,

							}
,
						objectStatus: 709,

						}
,
					isSkipNoMatch: false,
					multiMatchStrategy: dataintegration.models.Lookup.MultiMatchStrategy.ReturnError,
					nullFillValues: {
						EXAMPLE_KEY_RRmqW :"EXAMPLE--Value"
						},
					key: "EXAMPLE-key-Value",
					modelVersion: "EXAMPLE-modelVersion-Value",
					parentRef: {
						parent: "EXAMPLE-parent-Value",
						rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

						}
,
					name: "EXAMPLE-name-Value",
					description: "EXAMPLE-description-Value",
					objectVersion: 144,
					inputPorts: [{
							modelType: "INPUT_PORT",							portType: dataintegration.models.InputPort.PortType.Model,
							fields: [{
									modelType: "OUTPUT_FIELD",									type: {
										modelType: "DERIVED_TYPE",										key: "EXAMPLE-key-Value",
										modelVersion: "EXAMPLE-modelVersion-Value",
										parentRef: {
											parent: "EXAMPLE-parent-Value",
											rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

											}
,
										name: "EXAMPLE-name-Value",
										objectStatus: 119,
										description: "EXAMPLE-description-Value"

										}
,
									labels: ["EXAMPLE--Value"											],
									key: "EXAMPLE-key-Value",
									modelVersion: "EXAMPLE-modelVersion-Value",
									parentRef: {
										parent: "EXAMPLE-parent-Value",
										rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

										}
,
									configValues: {
										configParamValues: {
											EXAMPLE_KEY_hKjb5 :{
												stringValue: "EXAMPLE-stringValue-Value",
												intValue: 45,
												objectValue: "EXAMPLE-objectValue-Value",
												refValue: "EXAMPLE-refValue-Value",
												parameterValue: "EXAMPLE-parameterValue-Value",
												rootObjectValue: "EXAMPLE-rootObjectValue-Value",

												}

											},
										parentRef: {
											parent: "EXAMPLE-parent-Value",
											rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

											}
,

										}
,
									objectStatus: 444,
									name: "EXAMPLE-name-Value",
									description: "EXAMPLE-description-Value"

									}
									],
							key: "EXAMPLE-key-Value",
							modelVersion: "EXAMPLE-modelVersion-Value",
							parentRef: {
								parent: "EXAMPLE-parent-Value",
								rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

								}
,
							configValues: {
								configParamValues: {
									EXAMPLE_KEY_sKfXu :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 64,
										objectValue: "EXAMPLE-objectValue-Value",
										refValue: "EXAMPLE-refValue-Value",
										parameterValue: "EXAMPLE-parameterValue-Value",
										rootObjectValue: "EXAMPLE-rootObjectValue-Value",

										}

									},
								parentRef: {
									parent: "EXAMPLE-parent-Value",
									rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

									}
,

								}
,
							objectStatus: 363,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
							],
					outputPorts: [{
							modelType: "DYNAMIC_INPUT_FIELD",							type: {
								modelType: "MAP_TYPE",								keyElementType: "EXAMPLE-keyElementType-Value",
								valueElementType: "EXAMPLE-valueElementType-Value",
								containsNull: true,
								key: "EXAMPLE-key-Value",
								modelVersion: "EXAMPLE-modelVersion-Value",
								parentRef: {
									parent: "EXAMPLE-parent-Value",
									rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

									}
,
								name: "EXAMPLE-name-Value",
								objectStatus: 822,
								description: "EXAMPLE-description-Value"

								}
,
							labels: ["EXAMPLE--Value"									],
							key: "EXAMPLE-key-Value",
							modelVersion: "EXAMPLE-modelVersion-Value",
							parentRef: {
								parent: "EXAMPLE-parent-Value",
								rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

								}
,
							configValues: {
								configParamValues: {
									EXAMPLE_KEY_YBkIO :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 807,
										objectValue: "EXAMPLE-objectValue-Value",
										refValue: "EXAMPLE-refValue-Value",
										parameterValue: "EXAMPLE-parameterValue-Value",
										rootObjectValue: "EXAMPLE-rootObjectValue-Value",

										}

									},
								parentRef: {
									parent: "EXAMPLE-parent-Value",
									rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

									}
,

								}
,
							objectStatus: 813,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
							],
					objectStatus: 98,
					identifier: "EXAMPLE-identifier-Value",
					parameters: [{
							modelType: "PARAMETER",							type: "EXAMPLE-type-Value",
							defaultValue: "EXAMPLE-defaultValue-Value",
							rootObjectDefaultValue: "EXAMPLE-rootObjectDefaultValue-Value",
							isInput: true,
							isOutput: true,
							outputAggregationType: dataintegration.models.Parameter.OutputAggregationType.Min,
							typeName: "EXAMPLE-typeName-Value",
							usedFor: "EXAMPLE-usedFor-Value",
							key: "EXAMPLE-key-Value",
							modelVersion: "EXAMPLE-modelVersion-Value",
							parentRef: {
								parent: "EXAMPLE-parent-Value",
								rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

								}
,
							configValues: {
								configParamValues: {
									EXAMPLE_KEY_4JDO0 :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 603,
										objectValue: "EXAMPLE-objectValue-Value",
										refValue: "EXAMPLE-refValue-Value",
										parameterValue: "EXAMPLE-parameterValue-Value",
										rootObjectValue: "EXAMPLE-rootObjectValue-Value",

										}

									},
								parentRef: {
									parent: "EXAMPLE-parent-Value",
									rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

									}
,

								}
,
							objectStatus: 309,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
							],
					opConfigValues: {
						configParamValues: {
							EXAMPLE_KEY_KuXNG :{
								stringValue: "EXAMPLE-stringValue-Value",
								intValue: 807,
								objectValue: "EXAMPLE-objectValue-Value",
								refValue: "EXAMPLE-refValue-Value",
								parameterValue: "EXAMPLE-parameterValue-Value",
								rootObjectValue: "EXAMPLE-rootObjectValue-Value",

								}

							},
						parentRef: {
							parent: "EXAMPLE-parent-Value",
							rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

							}
,

						}


					}
,
				uiProperties: {
					coordinateX: 1105.032,
					coordinateY: 1169.9135,

					}
,
				objectStatus: 62,

				}
				],
		parameters: [{
				modelType: "PARAMETER",				type: "EXAMPLE-type-Value",
				defaultValue: "EXAMPLE-defaultValue-Value",
				rootObjectDefaultValue: "EXAMPLE-rootObjectDefaultValue-Value",
				isInput: true,
				isOutput: true,
				outputAggregationType: dataintegration.models.Parameter.OutputAggregationType.Count,
				typeName: "EXAMPLE-typeName-Value",
				usedFor: "EXAMPLE-usedFor-Value",
				key: "EXAMPLE-key-Value",
				modelVersion: "EXAMPLE-modelVersion-Value",
				parentRef: {
					parent: "EXAMPLE-parent-Value",
					rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

					}
,
				configValues: {
					configParamValues: {
						EXAMPLE_KEY_MOnRQ :{
							stringValue: "EXAMPLE-stringValue-Value",
							intValue: 546,
							objectValue: "EXAMPLE-objectValue-Value",
							refValue: "EXAMPLE-refValue-Value",
							parameterValue: "EXAMPLE-parameterValue-Value",
							rootObjectValue: "EXAMPLE-rootObjectValue-Value",

							}

						},
					parentRef: {
						parent: "EXAMPLE-parent-Value",
						rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

						}
,

					}
,
				objectStatus: 354,
				name: "EXAMPLE-name-Value",
				description: "EXAMPLE-description-Value"

				}
				],
		flowConfigValues: {
			configParamValues: {
				EXAMPLE_KEY_cRqxo :{
					stringValue: "EXAMPLE-stringValue-Value",
					intValue: 914,
					objectValue: "EXAMPLE-objectValue-Value",
					refValue: "EXAMPLE-refValue-Value",
					parameterValue: "EXAMPLE-parameterValue-Value",
					rootObjectValue: "EXAMPLE-rootObjectValue-Value",

					}

				},
			parentRef: {
				parent: "EXAMPLE-parent-Value",
				rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

				}
,

			}
,
		variables: [{
				key: "EXAMPLE-key-Value",
				modelVersion: "EXAMPLE-modelVersion-Value",
				modelType: "EXAMPLE-modelType-Value",
				parentRef: {
					parent: "EXAMPLE-parent-Value",
					rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

					}
,
				name: "EXAMPLE-name-Value",
				description: "EXAMPLE-description-Value",
				objectVersion: 318,
				objectStatus: 408,
				identifier: "EXAMPLE-identifier-Value",
				type: {
					modelType: "ARRAY_TYPE",					elementType: "EXAMPLE-elementType-Value",
					key: "EXAMPLE-key-Value",
					modelVersion: "EXAMPLE-modelVersion-Value",
					parentRef: {
						parent: "EXAMPLE-parent-Value",
						rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

						}
,
					name: "EXAMPLE-name-Value",
					objectStatus: 692,
					description: "EXAMPLE-description-Value"

					}
,
				configValues: {
					configParamValues: {
						EXAMPLE_KEY_o0t7s :{
							stringValue: "EXAMPLE-stringValue-Value",
							intValue: 50,
							objectValue: "EXAMPLE-objectValue-Value",
							refValue: "EXAMPLE-refValue-Value",
							parameterValue: "EXAMPLE-parameterValue-Value",
							rootObjectValue: "EXAMPLE-rootObjectValue-Value",

							}

						},
					parentRef: {
						parent: "EXAMPLE-parent-Value",
						rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

						}
,

					}
,
				defaultValue: "EXAMPLE-defaultValue-Value",
				rootObjectDefaultValue: {
					key: "EXAMPLE-key-Value",
					modelType: "EXAMPLE-modelType-Value",
					modelVersion: "EXAMPLE-modelVersion-Value",
					parentRef: {
						parent: "EXAMPLE-parent-Value",
						rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

						}
,
					objectStatus: 871,

					}
,

				}
				],
		registryMetadata: {
			aggregatorKey: "EXAMPLE-aggregatorKey-Value",
			labels: ["EXAMPLE--Value"					],
			registryVersion: 728,
			key: "EXAMPLE-key-Value",
			isFavorite: true,

			}
,

		}

	const createPipelineRequest: dataintegration.requests.CreatePipelineRequest = { 
	workspaceId: "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
	createPipelineDetails: createPipelineDetails,
	opcRetryToken: "EXAMPLE-opcRetryToken-Value",
	opcRequestId: "IN752HYIHBDEAP78D31I<unique_ID>",

		}; 


     // Send request to the Client.
     const createPipelineResponse = await client.createPipeline(createPipelineRequest);
     }
     catch (error) {
         console.log("createPipeline Failed with error  " + error);
     }
})();