// 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: 858,
		externalKey: "EXAMPLE-externalKey-Value",
		shape: {
			modelType: "SHAPE",			type: {
				modelType: "MAP_TYPE",				keyElementType: "EXAMPLE-keyElementType-Value",
				valueElementType: "EXAMPLE-valueElementType-Value",
				containsNull: 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: 0,
				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_zN0BC :{
						stringValue: "EXAMPLE-stringValue-Value",
						intValue: 39,
						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: 725,
			name: "EXAMPLE-name-Value",
			description: "EXAMPLE-description-Value"

			}
,
		shapeId: "ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value",
		entityType: dataintegration.models.CreateEntityShapeFromSQL.EntityType.Sql,
		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: 97,
						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_vP9tK :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 496,
											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: 9,
								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_o4Sdf :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 679,
										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: 210,
							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_XnMD3 :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 253,
											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: 603,
								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_0F14f :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 307,
										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: 10,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,

						}
						],
				objectStatus: 879

				}
				],
		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: 340,
						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_U9LFi :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 370,
											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: 119,
								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_U0DSP :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 199,
										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: 932,
							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_bBljq :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 388,
											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_xFiT0 :{
										stringValue: "EXAMPLE-stringValue-Value",
										intValue: 441,
										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: 999,
							name: "EXAMPLE-name-Value",
							description: "EXAMPLE-description-Value"

							}
,

						}
						],
				updateRule: 440,
				deleteRule: 638,
				referenceUniqueKey: {
					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: 177,
							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_s9nfA :{
												stringValue: "EXAMPLE-stringValue-Value",
												intValue: 661,
												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: 167,
									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_74VN8 :{
											stringValue: "EXAMPLE-stringValue-Value",
											intValue: 34,
											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: 33,
								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_hB38R :{
												stringValue: "EXAMPLE-stringValue-Value",
												intValue: 330,
												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: 694,
									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_m7bcq :{
											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",

										}
,

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

								}
,

							}
							],
					objectStatus: 758

					}
,
				objectStatus: 637

				}
				],
		resourceName: "EXAMPLE-resourceName-Value",
		dataFormat: {
			formatAttribute: {
				modelType: "PARQUET_FORMAT",				compression: "EXAMPLE-compression-Value",
				isFilePattern: true

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

				}
,

			}
,
		objectStatus: 724,
		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: "ERDMFQ78KDQS6DR6ELHT<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);
     }
})();