// 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  createEntityShapeDetails = {
		modelType: "OBJECT_ENTITY",		key: "EXAMPLE-key-Value",
		parentRef: {
			parent: "EXAMPLE-parent-Value",
			rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",

			}
,
		name: "EXAMPLE-name-Value",
		description: "EXAMPLE-description-Value",
		externalKey: "EXAMPLE-externalKey-Value",
		shape: {
			modelType: "SHAPE",			type: {
				modelType: "DATA_TYPE",				dtType: dataintegration.models.DataType.DtType.Structured,
				typeSystemName: "EXAMPLE-typeSystemName-Value",
				configDefinition: {
					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",
					isContained: false,
					objectStatus: 564,
					configParameterDefinitions: {
						EXAMPLE_KEY_rLltN :{
							parameterName: "EXAMPLE-parameterName-Value",
							description: "EXAMPLE-description-Value",
							defaultValue: "EXAMPLE-defaultValue-Value",
							classFieldName: "EXAMPLE-classFieldName-Value",
							isStatic: false,
							isClassFieldValue: 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: 299,
				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_OOcZh :{
						stringValue: "EXAMPLE-stringValue-Value",
						intValue: 984,
						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: 85,
			name: "EXAMPLE-name-Value",
			description: "EXAMPLE-description-Value"

			}
,
		shapeId: "ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value",
		entityType: dataintegration.models.CreateEntityShapeFromObject.EntityType.Sql,
		otherTypeLabel: "EXAMPLE-otherTypeLabel-Value",
		uniqueKeys: [{
				modelType: "UNIQUE_KEY",				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",
				attributeRefs: [{
						position: 576,
						shapeField: {
							modelType: "SHAPE_FIELD",							type: "EXAMPLE-type-Value",
							labels: ["EXAMPLE--Value"									],
							nativeShapeField: {
								name: "EXAMPLE-name-Value",
								modelType: "EXAMPLE-modelType-Value",
								type: "EXAMPLE-type-Value",
								configValues: {
									configParamValues: {
										EXAMPLE_KEY_A7ZaJ :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 520,
											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",

										}
,

									}
,
								position: 697,
								defaultValueString: "EXAMPLE-defaultValueString-Value",
								isMandatory: true,

								}
,
							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_P94H1 :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 883,
										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: 70,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,
						attribute: {
							modelType: "SHAPE_FIELD",							type: "EXAMPLE-type-Value",
							labels: ["EXAMPLE--Value"									],
							nativeShapeField: {
								name: "EXAMPLE-name-Value",
								modelType: "EXAMPLE-modelType-Value",
								type: "EXAMPLE-type-Value",
								configValues: {
									configParamValues: {
										EXAMPLE_KEY_pyK6Z :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 642,
											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",

										}
,

									}
,
								position: 867,
								defaultValueString: "EXAMPLE-defaultValueString-Value",
								isMandatory: true,

								}
,
							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_NEjK3 :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 226,
										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: 48,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,

						}
						],
				objectStatus: 788

				}
				],
		foreignKeys: [{
				modelType: "FOREIGN_KEY",				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",
				attributeRefs: [{
						position: 933,
						shapeField: {
							modelType: "SHAPE_FIELD",							type: "EXAMPLE-type-Value",
							labels: ["EXAMPLE--Value"									],
							nativeShapeField: {
								name: "EXAMPLE-name-Value",
								modelType: "EXAMPLE-modelType-Value",
								type: "EXAMPLE-type-Value",
								configValues: {
									configParamValues: {
										EXAMPLE_KEY_QJN11 :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 186,
											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",

										}
,

									}
,
								position: 368,
								defaultValueString: "EXAMPLE-defaultValueString-Value",
								isMandatory: false,

								}
,
							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_4k5xw :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 569,
										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: 273,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,
						attribute: {
							modelType: "SHAPE_FIELD",							type: "EXAMPLE-type-Value",
							labels: ["EXAMPLE--Value"									],
							nativeShapeField: {
								name: "EXAMPLE-name-Value",
								modelType: "EXAMPLE-modelType-Value",
								type: "EXAMPLE-type-Value",
								configValues: {
									configParamValues: {
										EXAMPLE_KEY_sW3za :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 432,
											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",

										}
,

									}
,
								position: 393,
								defaultValueString: "EXAMPLE-defaultValueString-Value",
								isMandatory: true,

								}
,
							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_Dnd0O :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 949,
										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: 581,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,

						}
						],
				updateRule: 396,
				deleteRule: 824,
				referenceUniqueKey: {
					modelType: "UNIQUE_KEY",					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",
					attributeRefs: [{
							position: 620,
							shapeField: {
								modelType: "SHAPE_FIELD",								type: "EXAMPLE-type-Value",
								labels: ["EXAMPLE--Value"										],
								nativeShapeField: {
									name: "EXAMPLE-name-Value",
									modelType: "EXAMPLE-modelType-Value",
									type: "EXAMPLE-type-Value",
									configValues: {
										configParamValues: {
											EXAMPLE_KEY_0dQVt :{
												stringValue: "EXAMPLE-stringValue-Value",
												intValue: 724,
												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",

											}
,

										}
,
									position: 392,
									defaultValueString: "EXAMPLE-defaultValueString-Value",
									isMandatory: false,

									}
,
								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_g6zVD :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 298,
											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: 285,
								name: "EXAMPLE-name-Value",
								description: "EXAMPLE-description-Value"

								}
,
							attribute: {
								modelType: "SHAPE_FIELD",								type: "EXAMPLE-type-Value",
								labels: ["EXAMPLE--Value"										],
								nativeShapeField: {
									name: "EXAMPLE-name-Value",
									modelType: "EXAMPLE-modelType-Value",
									type: "EXAMPLE-type-Value",
									configValues: {
										configParamValues: {
											EXAMPLE_KEY_csiLT :{
												stringValue: "EXAMPLE-stringValue-Value",
												intValue: 868,
												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",

											}
,

										}
,
									position: 241,
									defaultValueString: "EXAMPLE-defaultValueString-Value",
									isMandatory: false,

									}
,
								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_lbJuA :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 162,
											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: 301,
								name: "EXAMPLE-name-Value",
								description: "EXAMPLE-description-Value"

								}
,

							}
							],
					objectStatus: 916

					}
,
				objectStatus: 190

				}
				],
		resourceName: "EXAMPLE-resourceName-Value",
		dataFormat: {
			formatAttribute: {
				modelType: "JSON_FORMAT",				encoding: "EXAMPLE-encoding-Value",
				sampleEntityData: "EXAMPLE-sampleEntityData-Value",
				isFilePattern: false

				}
,
			type: dataintegration.models.DataFormat.Type.Parquet,
			compressionConfig: {
				codec: dataintegration.models.Compression.Codec.Bzip2,

				}
,

			}
,
		identifier: "EXAMPLE-identifier-Value"

		}

	const createEntityShapeRequest: dataintegration.requests.CreateEntityShapeRequest = { 
	workspaceId: "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
	connectionKey: "EXAMPLE-connectionKey-Value",
	schemaResourceName: "EXAMPLE-schemaResourceName-Value",
	createEntityShapeDetails: createEntityShapeDetails,
	opcRequestId: "IGOFZYAMPU103GABGRRR<unique_ID>",
	opcRetryToken: "EXAMPLE-opcRetryToken-Value",
	ifMatch: "EXAMPLE-ifMatch-Value",

		}; 


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