// 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: "SQL_ENTITY",		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: 535,
		externalKey: "EXAMPLE-externalKey-Value",
		shape: {
			modelType: "SHAPE",			type: {
				modelType: "CONFIGURED_TYPE",				wrappedType: "EXAMPLE-wrappedType-Value",
				configValues: {
					configParamValues: {
						EXAMPLE_KEY_0m4xb :{
							stringValue: "EXAMPLE-stringValue-Value",
							intValue: 975,
							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",

						}
,

					}
,
				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: true,
					objectStatus: 131,
					configParameterDefinitions: {
						EXAMPLE_KEY_PaskN :{
							parameterName: "EXAMPLE-parameterName-Value",
							description: "EXAMPLE-description-Value",
							defaultValue: "EXAMPLE-defaultValue-Value",
							classFieldName: "EXAMPLE-classFieldName-Value",
							isStatic: false,
							isClassFieldValue: false,

							}

						},

					}
,
				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: 674,
				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_vvg7y :{
						stringValue: "EXAMPLE-stringValue-Value",
						intValue: 339,
						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: 414,
			name: "EXAMPLE-name-Value",
			description: "EXAMPLE-description-Value"

			}
,
		shapeId: "ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value",
		entityType: dataintegration.models.CreateEntityShapeFromSQL.EntityType.Table,
		otherTypeLabel: "EXAMPLE-otherTypeLabel-Value",
		uniqueKeys: [{
				modelType: "PRIMARY_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: 694,
						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_wSCnX :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 366,
											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: 299,
								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_OOjIE :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 729,
										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: 667,
							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_6Vd4b :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 149,
											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: 177,
								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_WQ6tB :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 421,
										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: 36,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,

						}
						],
				objectStatus: 798

				}
				],
		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: 175,
						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_XKmHM :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 201,
											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: 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_AakdL :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 869,
										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: 674,
							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_sgI6l :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 866,
											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: 865,
								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_D5GoZ :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 359,
										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: 647,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,

						}
						],
				updateRule: 680,
				deleteRule: 918,
				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: 338,
							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_iCPQY :{
												stringValue: "EXAMPLE-stringValue-Value",
												intValue: 44,
												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: 570,
									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_6vCFw :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 658,
											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: 546,
								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_7pCT6 :{
												stringValue: "EXAMPLE-stringValue-Value",
												intValue: 271,
												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: 817,
									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_ATRpo :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 57,
											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: 207,
								name: "EXAMPLE-name-Value",
								description: "EXAMPLE-description-Value"

								}
,

							}
							],
					objectStatus: 888

					}
,
				objectStatus: 182

				}
				],
		resourceName: "EXAMPLE-resourceName-Value",
		dataFormat: {
			formatAttribute: {
				modelType: "CSV_FORMAT",				encoding: "EXAMPLE-encoding-Value",
				escapeCharacter: "EXAMPLE-escapeCharacter-Value",
				delimiter: "EXAMPLE-delimiter-Value",
				quoteCharacter: "EXAMPLE-quoteCharacter-Value",
				hasHeader: true,
				timestampFormat: "EXAMPLE-timestampFormat-Value",
				isFilePattern: true

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

				}
,

			}
,
		objectStatus: 243,
		identifier: "EXAMPLE-identifier-Value",
		sqlQuery: "EXAMPLE-sqlQuery-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: "Q2V1T0OZXCSHY37JDUEY<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);
     }
})();