// 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  createConnectionValidationDetails = {
		dataAsset: {
			modelType: "ORACLE_ADWC_DATA_ASSET",			serviceName: "EXAMPLE-serviceName-Value",
			driverClass: "EXAMPLE-driverClass-Value",
			credentialFileContent: "EXAMPLE-credentialFileContent-Value",
			walletSecret: {
				secretConfig: {
					modelType: "OCI_VAULT_SECRET_CONFIG",					secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"

					}
,
				value: "EXAMPLE-value-Value",

				}
,
			walletPasswordSecret: {
				secretConfig: {
					modelType: "OCI_VAULT_SECRET_CONFIG",					secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"

					}
,
				value: "EXAMPLE-value-Value",

				}
,
			regionId: "ocid1.test.oc1..<unique_ID>EXAMPLE-regionId-Value",
			tenancyId: "ocid1.test.oc1..<unique_ID>EXAMPLE-tenancyId-Value",
			compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
			autonomousDbId: "ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousDbId-Value",
			defaultConnection: {
				modelType: "ORACLE_ADWC_CONNECTION",				tnsAlias: "EXAMPLE-tnsAlias-Value",
				tnsNames: ["EXAMPLE--Value"						],
				username: "EXAMPLE-username-Value",
				password: "EXAMPLE-password-Value",
				passwordSecret: {
					secretConfig: {
						modelType: "OCI_VAULT_SECRET_CONFIG",						secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"

						}
,
					value: "EXAMPLE-value-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",
				objectStatus: 555,
				identifier: "EXAMPLE-identifier-Value",
				connectionProperties: [{
						name: "EXAMPLE-name-Value",
						value: "EXAMPLE-value-Value",

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

					}


				}
,
			stagingDataAsset: {
				modelType: "ORACLE_EBS_DATA_ASSET",				host: "EXAMPLE-host-Value",
				port: "EXAMPLE-port-Value",
				serviceName: "EXAMPLE-serviceName-Value",
				driverClass: "EXAMPLE-driverClass-Value",
				sid: "EXAMPLE-sid-Value",
				walletSecret: {
					secretConfig: {
						modelType: "OCI_VAULT_SECRET_CONFIG",						secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"

						}
,
					value: "EXAMPLE-value-Value",

					}
,
				walletPasswordSecret: {
					secretConfig: {
						modelType: "OCI_VAULT_SECRET_CONFIG",						secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"

						}
,
					value: "EXAMPLE-value-Value",

					}
,
				defaultConnection: {
					modelType: "ORACLE_EBS_CONNECTION",					username: "EXAMPLE-username-Value",
					password: "EXAMPLE-password-Value",
					passwordSecret: {
						secretConfig: {
							modelType: "OCI_VAULT_SECRET_CONFIG",							secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"

							}
,
						value: "EXAMPLE-value-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: 329,
					objectStatus: 620,
					identifier: "EXAMPLE-identifier-Value",
					primarySchema: {
						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",
						resourceName: "EXAMPLE-resourceName-Value",
						description: "EXAMPLE-description-Value",
						objectVersion: 974,
						externalKey: "EXAMPLE-externalKey-Value",
						isHasContainers: true,
						defaultConnection: "EXAMPLE-defaultConnection-Value",
						objectStatus: 837,
						identifier: "EXAMPLE-identifier-Value",
						metadata: {
							createdBy: "EXAMPLE-createdBy-Value",
							createdByName: "EXAMPLE-createdByName-Value",
							updatedBy: "EXAMPLE-updatedBy-Value",
							updatedByName: "EXAMPLE-updatedByName-Value",
							timeCreated: new Date("Mon Mar 25 12:51:44 UTC 2024"),
							timeUpdated: new Date("Sun Oct 19 09:33:01 UTC 2003"),
							aggregatorKey: "EXAMPLE-aggregatorKey-Value",
							aggregator: {
								type: "EXAMPLE-type-Value",
								key: "EXAMPLE-key-Value",
								name: "EXAMPLE-name-Value",
								identifier: "EXAMPLE-identifier-Value",
								description: "EXAMPLE-description-Value",

								}
,
							identifierPath: "EXAMPLE-identifierPath-Value",
							infoFields: {
								EXAMPLE_KEY_lnPj8 :"EXAMPLE_VALUE_5NbV9pRK0RiWfT0HUdgh"
								},
							registryVersion: 447,
							labels: ["EXAMPLE--Value"									],
							isFavorite: true,
							countStatistics: {
								objectTypeCountList: [{
										objectType: dataintegration.models.CountStatisticSummary.ObjectType.DataFlow,
										objectCount: 884,

										}
										],

								}
,

							}
,

						}
,
					connectionProperties: [{
							name: "EXAMPLE-name-Value",
							value: "EXAMPLE-value-Value",

							}
							],
					isDefault: true,
					metadata: {
						createdBy: "EXAMPLE-createdBy-Value",
						createdByName: "EXAMPLE-createdByName-Value",
						updatedBy: "EXAMPLE-updatedBy-Value",
						updatedByName: "EXAMPLE-updatedByName-Value",
						timeCreated: new Date("Tue Oct 06 23:19:20 UTC 2015"),
						timeUpdated: new Date("Mon Sep 03 05:00:17 UTC 2035"),
						aggregatorKey: "EXAMPLE-aggregatorKey-Value",
						aggregator: {
							type: "EXAMPLE-type-Value",
							key: "EXAMPLE-key-Value",
							name: "EXAMPLE-name-Value",
							identifier: "EXAMPLE-identifier-Value",
							description: "EXAMPLE-description-Value",

							}
,
						identifierPath: "EXAMPLE-identifierPath-Value",
						infoFields: {
							EXAMPLE_KEY_iuWUJ :"EXAMPLE_VALUE_izT6Wq2J5Xe89uc3ChA2"
							},
						registryVersion: 132,
						labels: ["EXAMPLE--Value"								],
						isFavorite: false,
						countStatistics: {
							objectTypeCountList: [{
									objectType: dataintegration.models.CountStatisticSummary.ObjectType.UserDefinedFunction,
									objectCount: 970,

									}
									],

							}
,

						}


					}
,
				key: "EXAMPLE-key-Value",
				modelVersion: "EXAMPLE-modelVersion-Value",
				name: "EXAMPLE-name-Value",
				description: "EXAMPLE-description-Value",
				objectStatus: 864,
				identifier: "EXAMPLE-identifier-Value",
				externalKey: "EXAMPLE-externalKey-Value",
				assetProperties: {
					EXAMPLE_KEY_S0Fnm :"EXAMPLE_VALUE_u9lLoHxdHJWgh1vFrGSG"
					},
				nativeTypeSystem: {
					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",
					objectVersion: 775,
					typeMappingTo: {
						EXAMPLE_KEY_viCPQ :"EXAMPLE_VALUE_YWUjFt79X3pxMY5DGmFF"
						},
					typeMappingFrom: {
						EXAMPLE_KEY_Pk7wb :"EXAMPLE_VALUE_SWAWFewaDoK5DOyPT3q9"
						},
					objectStatus: 863,
					identifier: "EXAMPLE-identifier-Value",
					types: [{
							modelType: "DATA_TYPE",							dtType: dataintegration.models.DataType.DtType.Primitive,
							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: 234,
								configParameterDefinitions: {
									EXAMPLE_KEY_1bdFt :{
										parameterType: {
											modelType: "COMPOSITE_TYPE",											elements: [{
													modelType: "INPUT_PORT",													portType: dataintegration.models.InputPort.PortType.Model,
													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_Gax7P :{
																stringValue: "EXAMPLE-stringValue-Value",
																intValue: 413,
																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: 406,
													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",

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

											}
,
										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: 156,
							description: "EXAMPLE-description-Value"

							}
							],

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

					}
,
				metadata: {
					createdBy: "EXAMPLE-createdBy-Value",
					createdByName: "EXAMPLE-createdByName-Value",
					updatedBy: "EXAMPLE-updatedBy-Value",
					updatedByName: "EXAMPLE-updatedByName-Value",
					timeCreated: new Date("Fri Jan 19 07:58:09 UTC 2007"),
					timeUpdated: new Date("Sun Oct 05 20:35:49 UTC 2003"),
					aggregatorKey: "EXAMPLE-aggregatorKey-Value",
					aggregator: {
						type: "EXAMPLE-type-Value",
						key: "EXAMPLE-key-Value",
						name: "EXAMPLE-name-Value",
						identifier: "EXAMPLE-identifier-Value",
						description: "EXAMPLE-description-Value",

						}
,
					identifierPath: "EXAMPLE-identifierPath-Value",
					infoFields: {
						EXAMPLE_KEY_gw4o4 :"EXAMPLE_VALUE_6zjUG1T7pCT6xmpWe0fp"
						},
					registryVersion: 813,
					labels: ["EXAMPLE--Value"							],
					isFavorite: false,
					countStatistics: {
						objectTypeCountList: [{
								objectType: dataintegration.models.CountStatisticSummary.ObjectType.Folder,
								objectCount: 279,

								}
								],

						}
,

					}
,
				keyMap: {
					EXAMPLE_KEY_2V1T0 :"EXAMPLE_VALUE_Ozxcshy37jDuEYPx5Xm0"
					}

				}
,
			stagingConnection: {
				modelType: "BIP_CONNECTION",				username: "EXAMPLE-username-Value",
				passwordSecret: {
					secretConfig: {
						modelType: "OCI_VAULT_SECRET_CONFIG",						secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"

						}
,
					value: "EXAMPLE-value-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: 205,
				objectStatus: 930,
				identifier: "EXAMPLE-identifier-Value",
				primarySchema: {
					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",
					resourceName: "EXAMPLE-resourceName-Value",
					description: "EXAMPLE-description-Value",
					objectVersion: 697,
					externalKey: "EXAMPLE-externalKey-Value",
					isHasContainers: false,
					defaultConnection: "EXAMPLE-defaultConnection-Value",
					objectStatus: 7,
					identifier: "EXAMPLE-identifier-Value",
					metadata: {
						createdBy: "EXAMPLE-createdBy-Value",
						createdByName: "EXAMPLE-createdByName-Value",
						updatedBy: "EXAMPLE-updatedBy-Value",
						updatedByName: "EXAMPLE-updatedByName-Value",
						timeCreated: new Date("Thu Jan 23 17:40:59 UTC 2025"),
						timeUpdated: new Date("Fri Feb 21 00:11:50 UTC 2020"),
						aggregatorKey: "EXAMPLE-aggregatorKey-Value",
						aggregator: {
							type: "EXAMPLE-type-Value",
							key: "EXAMPLE-key-Value",
							name: "EXAMPLE-name-Value",
							identifier: "EXAMPLE-identifier-Value",
							description: "EXAMPLE-description-Value",

							}
,
						identifierPath: "EXAMPLE-identifierPath-Value",
						infoFields: {
							EXAMPLE_KEY_HCfLG :"EXAMPLE_VALUE_cvH76UiYdRX0NHg7q4GC"
							},
						registryVersion: 576,
						labels: ["EXAMPLE--Value"								],
						isFavorite: true,
						countStatistics: {
							objectTypeCountList: [{
									objectType: dataintegration.models.CountStatisticSummary.ObjectType.DataAsset,
									objectCount: 68,

									}
									],

							}
,

						}
,

					}
,
				connectionProperties: [{
						name: "EXAMPLE-name-Value",
						value: "EXAMPLE-value-Value",

						}
						],
				isDefault: true,
				metadata: {
					createdBy: "EXAMPLE-createdBy-Value",
					createdByName: "EXAMPLE-createdByName-Value",
					updatedBy: "EXAMPLE-updatedBy-Value",
					updatedByName: "EXAMPLE-updatedByName-Value",
					timeCreated: new Date("Mon Nov 18 04:05:11 UTC 2013"),
					timeUpdated: new Date("Tue Nov 04 19:16:38 UTC 2003"),
					aggregatorKey: "EXAMPLE-aggregatorKey-Value",
					aggregator: {
						type: "EXAMPLE-type-Value",
						key: "EXAMPLE-key-Value",
						name: "EXAMPLE-name-Value",
						identifier: "EXAMPLE-identifier-Value",
						description: "EXAMPLE-description-Value",

						}
,
					identifierPath: "EXAMPLE-identifierPath-Value",
					infoFields: {
						EXAMPLE_KEY_7817M :"EXAMPLE_VALUE_wqoC6B0xfVZ9HZCfsLta"
						},
					registryVersion: 266,
					labels: ["EXAMPLE--Value"							],
					isFavorite: false,
					countStatistics: {
						objectTypeCountList: [{
								objectType: dataintegration.models.CountStatisticSummary.ObjectType.Task,
								objectCount: 471,

								}
								],

						}
,

					}
,
				keyMap: {
					EXAMPLE_KEY_jh9nc :"EXAMPLE_VALUE_lKWHRF5DSEzugE7NupYE"
					}

				}
,
			bucketSchema: {
				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",
				resourceName: "EXAMPLE-resourceName-Value",
				description: "EXAMPLE-description-Value",
				objectVersion: 117,
				externalKey: "EXAMPLE-externalKey-Value",
				isHasContainers: false,
				defaultConnection: "EXAMPLE-defaultConnection-Value",
				objectStatus: 384,
				identifier: "EXAMPLE-identifier-Value",
				metadata: {
					createdBy: "EXAMPLE-createdBy-Value",
					createdByName: "EXAMPLE-createdByName-Value",
					updatedBy: "EXAMPLE-updatedBy-Value",
					updatedByName: "EXAMPLE-updatedByName-Value",
					timeCreated: new Date("Thu Dec 12 07:23:12 UTC 2030"),
					timeUpdated: new Date("Mon Oct 29 00:05:26 UTC 2046"),
					aggregatorKey: "EXAMPLE-aggregatorKey-Value",
					aggregator: {
						type: "EXAMPLE-type-Value",
						key: "EXAMPLE-key-Value",
						name: "EXAMPLE-name-Value",
						identifier: "EXAMPLE-identifier-Value",
						description: "EXAMPLE-description-Value",

						}
,
					identifierPath: "EXAMPLE-identifierPath-Value",
					infoFields: {
						EXAMPLE_KEY_T5AoZ :"EXAMPLE_VALUE_8u0xQF0pyiw0MqF7xrPA"
						},
					registryVersion: 99,
					labels: ["EXAMPLE--Value"							],
					isFavorite: false,
					countStatistics: {
						objectTypeCountList: [{
								objectType: dataintegration.models.CountStatisticSummary.ObjectType.Connection,
								objectCount: 734,

								}
								],

						}
,

					}
,

				}
,
			key: "EXAMPLE-key-Value",
			modelVersion: "EXAMPLE-modelVersion-Value",
			name: "EXAMPLE-name-Value",
			description: "EXAMPLE-description-Value",
			objectStatus: 459,
			identifier: "EXAMPLE-identifier-Value",
			externalKey: "EXAMPLE-externalKey-Value",
			assetProperties: {
				EXAMPLE_KEY_c3My9 :"EXAMPLE_VALUE_4MVfNJTQ7MY7Icm4zciR"
				},
			registryMetadata: {
				aggregatorKey: "EXAMPLE-aggregatorKey-Value",
				labels: ["EXAMPLE--Value"						],
				registryVersion: 221,
				key: "EXAMPLE-key-Value",
				isFavorite: false,

				}


			}
,
		connection: {
			modelType: "REST_NO_AUTH_CONNECTION",			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",
			objectStatus: 560,
			identifier: "EXAMPLE-identifier-Value",
			connectionProperties: [{
					name: "EXAMPLE-name-Value",
					value: "EXAMPLE-value-Value",

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

				}


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

			}
,

		}

	const createConnectionValidationRequest: dataintegration.requests.CreateConnectionValidationRequest = { 
	workspaceId: "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
	createConnectionValidationDetails: createConnectionValidationDetails,
	opcRequestId: "MXM8XY970X5GGQMAQEB6<unique_ID>",
	opcRetryToken: "EXAMPLE-opcRetryToken-Value",

		}; 


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