/** 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 com.oracle.bmc.ConfigFileReader;
import com.oracle.bmc.auth.AuthenticationDetailsProvider;
import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider;
import com.oracle.bmc.dataintegration.DataIntegrationClient;
import com.oracle.bmc.dataintegration.model.*;
import com.oracle.bmc.dataintegration.requests.*;
import com.oracle.bmc.dataintegration.responses.*;
import java.math.BigDecimal;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Date;
import java.util.Arrays;


public class CreateDataAssetExample {
    public static void main(String[] args) throws Exception {

        /**
         * 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.
         */
        final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault();
        final AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(configFile);

        /* Create a service client */
        DataIntegrationClient client = new DataIntegrationClient(provider);

        /* Create a request and dependent object(s). */
	CreateDataAssetDetails createDataAssetDetails = CreateDataAssetFromFusionApp.builder()
		.serviceUrl("EXAMPLE-serviceUrl-Value")
		.defaultConnection(CreateConnectionFromAmazonS3.builder()
			.accessKey(SensitiveAttribute.builder()
				.secretConfig(OciVaultSecretConfig.builder()
					.secretId("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value").build())
				.value("EXAMPLE-value-Value").build())
			.secretKey(SensitiveAttribute.builder()
				.secretConfig(OciVaultSecretConfig.builder()
					.secretId("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value").build())
				.value("EXAMPLE-value-Value").build())
			.key("EXAMPLE-key-Value")
			.modelVersion("EXAMPLE-modelVersion-Value")
			.parentRef(ParentReference.builder()
				.parent("EXAMPLE-parent-Value")
				.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
			.name("EXAMPLE-name-Value")
			.description("EXAMPLE-description-Value")
			.objectStatus(779)
			.identifier("EXAMPLE-identifier-Value")
			.connectionProperties(new ArrayList<>(Arrays.asList(ConnectionProperty.builder()
					.name("EXAMPLE-name-Value")
					.value("EXAMPLE-value-Value").build())))
			.registryMetadata(RegistryMetadata.builder()
				.aggregatorKey("EXAMPLE-aggregatorKey-Value")
				.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
				.registryVersion(82)
				.key("EXAMPLE-key-Value")
				.isFavorite(false).build()).build())
		.stagingDataAsset(DataAssetSummaryFromObjectStorage.builder()
			.ociRegion("EXAMPLE-ociRegion-Value")
			.url("EXAMPLE-url-Value")
			.tenancyId("ocid1.test.oc1..<unique_ID>EXAMPLE-tenancyId-Value")
			.namespace("EXAMPLE-namespace-Value")
			.defaultConnection(ConnectionSummaryFromObjectStorage.builder()
				.credentialFileContent("EXAMPLE-credentialFileContent-Value")
				.userId("ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value")
				.fingerPrint("EXAMPLE-fingerPrint-Value")
				.passPhrase("EXAMPLE-passPhrase-Value")
				.key("EXAMPLE-key-Value")
				.modelVersion("EXAMPLE-modelVersion-Value")
				.parentRef(ParentReference.builder()
					.parent("EXAMPLE-parent-Value")
					.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
				.name("EXAMPLE-name-Value")
				.description("EXAMPLE-description-Value")
				.objectVersion(789)
				.objectStatus(202)
				.identifier("EXAMPLE-identifier-Value")
				.primarySchema(Schema.builder()
					.key("EXAMPLE-key-Value")
					.modelType("EXAMPLE-modelType-Value")
					.modelVersion("EXAMPLE-modelVersion-Value")
					.parentRef(ParentReference.builder()
						.parent("EXAMPLE-parent-Value")
						.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
					.name("EXAMPLE-name-Value")
					.resourceName("EXAMPLE-resourceName-Value")
					.description("EXAMPLE-description-Value")
					.objectVersion(642)
					.externalKey("EXAMPLE-externalKey-Value")
					.isHasContainers(true)
					.defaultConnection("EXAMPLE-defaultConnection-Value")
					.objectStatus(99)
					.identifier("EXAMPLE-identifier-Value")
					.metadata(ObjectMetadata.builder()
						.createdBy("EXAMPLE-createdBy-Value")
						.createdByName("EXAMPLE-createdByName-Value")
						.updatedBy("EXAMPLE-updatedBy-Value")
						.updatedByName("EXAMPLE-updatedByName-Value")
						.timeCreated(new Date("Mon Sep 19 16:32:41 UTC 2033"))
						.timeUpdated(new Date("Mon Oct 14 04:04:18 UTC 2013"))
						.aggregatorKey("EXAMPLE-aggregatorKey-Value")
						.aggregator(AggregatorSummary.builder()
							.type("EXAMPLE-type-Value")
							.key("EXAMPLE-key-Value")
							.name("EXAMPLE-name-Value")
							.identifier("EXAMPLE-identifier-Value")
							.description("EXAMPLE-description-Value").build())
						.identifierPath("EXAMPLE-identifierPath-Value")
						.infoFields(new HashMap<java.lang.String, java.lang.String>() {
								{
									put("EXAMPLE_KEY_3l32b","EXAMPLE_VALUE_KgbgLCG98qwKxuXT1Twx");
								}
 							})
						.registryVersion(208)
						.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
						.isFavorite(true)
						.countStatistics(CountStatistic.builder()
							.objectTypeCountList(new ArrayList<>(Arrays.asList(CountStatisticSummary.builder()
									.objectType(CountStatisticSummary.ObjectType.Project)
									.objectCount(394L).build()))).build()).build()).build())
				.connectionProperties(new ArrayList<>(Arrays.asList(ConnectionProperty.builder()
						.name("EXAMPLE-name-Value")
						.value("EXAMPLE-value-Value").build())))
				.isDefault(false)
				.metadata(ObjectMetadata.builder()
					.createdBy("EXAMPLE-createdBy-Value")
					.createdByName("EXAMPLE-createdByName-Value")
					.updatedBy("EXAMPLE-updatedBy-Value")
					.updatedByName("EXAMPLE-updatedByName-Value")
					.timeCreated(new Date("Tue Jan 24 22:33:25 UTC 2006"))
					.timeUpdated(new Date("Sat Feb 11 11:39:39 UTC 2040"))
					.aggregatorKey("EXAMPLE-aggregatorKey-Value")
					.aggregator(AggregatorSummary.builder()
						.type("EXAMPLE-type-Value")
						.key("EXAMPLE-key-Value")
						.name("EXAMPLE-name-Value")
						.identifier("EXAMPLE-identifier-Value")
						.description("EXAMPLE-description-Value").build())
					.identifierPath("EXAMPLE-identifierPath-Value")
					.infoFields(new HashMap<java.lang.String, java.lang.String>() {
							{
								put("EXAMPLE_KEY_ETkhg","EXAMPLE_VALUE_9Gd6j25x30VRWMGRaPWS");
							}
 						})
					.registryVersion(296)
					.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
					.isFavorite(false)
					.countStatistics(CountStatistic.builder()
						.objectTypeCountList(new ArrayList<>(Arrays.asList(CountStatisticSummary.builder()
								.objectType(CountStatisticSummary.ObjectType.DataFlow)
								.objectCount(278L).build()))).build()).build())
				.keyMap(new HashMap<java.lang.String, java.lang.String>() {
						{
							put("EXAMPLE_KEY_JwA6H","EXAMPLE_VALUE_fYkp1IRfDpv4mqGpZMme");
						}
 					}).build())
			.key("EXAMPLE-key-Value")
			.modelVersion("EXAMPLE-modelVersion-Value")
			.name("EXAMPLE-name-Value")
			.description("EXAMPLE-description-Value")
			.objectStatus(526)
			.identifier("EXAMPLE-identifier-Value")
			.externalKey("EXAMPLE-externalKey-Value")
			.assetProperties(new HashMap<java.lang.String, java.lang.String>() {
					{
						put("EXAMPLE_KEY_f0aK9","EXAMPLE_VALUE_A3l414EWx1ZO7RPTV0pK");
					}
 				})
			.nativeTypeSystem(TypeSystem.builder()
				.key("EXAMPLE-key-Value")
				.modelType("EXAMPLE-modelType-Value")
				.modelVersion("EXAMPLE-modelVersion-Value")
				.parentRef(ParentReference.builder()
					.parent("EXAMPLE-parent-Value")
					.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
				.name("EXAMPLE-name-Value")
				.description("EXAMPLE-description-Value")
				.objectVersion(247)
				.typeMappingTo(new HashMap<java.lang.String, java.lang.String>() {
						{
							put("EXAMPLE_KEY_q5WsN","EXAMPLE_VALUE_MWt368szAN1Vr3ujqlHZ");
						}
 					})
				.typeMappingFrom(new HashMap<java.lang.String, java.lang.String>() {
						{
							put("EXAMPLE_KEY_fG2u1","EXAMPLE_VALUE_T1XOlX5qn7DnR6NJzlr0");
						}
 					})
				.objectStatus(7)
				.identifier("EXAMPLE-identifier-Value")
				.types(new ArrayList<>(Arrays.asList(DataType.builder()
						.dtType(DataType.DtType.Primitive)
						.typeSystemName("EXAMPLE-typeSystemName-Value")
						.configDefinition(ConfigDefinition.builder()
							.key("EXAMPLE-key-Value")
							.modelType("EXAMPLE-modelType-Value")
							.modelVersion("EXAMPLE-modelVersion-Value")
							.parentRef(ParentReference.builder()
								.parent("EXAMPLE-parent-Value")
								.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
							.name("EXAMPLE-name-Value")
							.isContained(false)
							.objectStatus(790)
							.configParameterDefinitions(new HashMap<java.lang.String, com.oracle.bmc.dataintegration.model.ConfigParameterDefinition>() {
									{
										put("EXAMPLE_KEY_b7Kwk",ConfigParameterDefinition.builder()
									.parameterType(MapType.builder()
										.keyElementType("EXAMPLE-keyElementType-Value")
										.valueElementType("EXAMPLE-valueElementType-Value")
										.containsNull(false)
										.key("EXAMPLE-key-Value")
										.modelVersion("EXAMPLE-modelVersion-Value")
										.parentRef(ParentReference.builder()
											.parent("EXAMPLE-parent-Value")
											.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
										.name("EXAMPLE-name-Value")
										.objectStatus(251)
										.description("EXAMPLE-description-Value").build())
									.parameterName("EXAMPLE-parameterName-Value")
									.description("EXAMPLE-description-Value")
									.defaultValue("EXAMPLE-defaultValue-Value")
									.classFieldName("EXAMPLE-classFieldName-Value")
									.isStatic(false)
									.isClassFieldValue(false).build());
									}
 								}).build())
						.key("EXAMPLE-key-Value")
						.modelVersion("EXAMPLE-modelVersion-Value")
						.parentRef(ParentReference.builder()
							.parent("EXAMPLE-parent-Value")
							.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
						.name("EXAMPLE-name-Value")
						.objectStatus(403)
						.description("EXAMPLE-description-Value").build()))).build())
			.objectVersion(247)
			.parentRef(ParentReference.builder()
				.parent("EXAMPLE-parent-Value")
				.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
			.metadata(ObjectMetadata.builder()
				.createdBy("EXAMPLE-createdBy-Value")
				.createdByName("EXAMPLE-createdByName-Value")
				.updatedBy("EXAMPLE-updatedBy-Value")
				.updatedByName("EXAMPLE-updatedByName-Value")
				.timeCreated(new Date("Sun Oct 17 23:47:00 UTC 2027"))
				.timeUpdated(new Date("Wed Mar 16 11:23:11 UTC 2011"))
				.aggregatorKey("EXAMPLE-aggregatorKey-Value")
				.aggregator(AggregatorSummary.builder()
					.type("EXAMPLE-type-Value")
					.key("EXAMPLE-key-Value")
					.name("EXAMPLE-name-Value")
					.identifier("EXAMPLE-identifier-Value")
					.description("EXAMPLE-description-Value").build())
				.identifierPath("EXAMPLE-identifierPath-Value")
				.infoFields(new HashMap<java.lang.String, java.lang.String>() {
						{
							put("EXAMPLE_KEY_P2NuQ","EXAMPLE_VALUE_ybU0ehnaeZpkUhNuG8gJ");
						}
 					})
				.registryVersion(974)
				.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
				.isFavorite(false)
				.countStatistics(CountStatistic.builder()
					.objectTypeCountList(new ArrayList<>(Arrays.asList(CountStatisticSummary.builder()
							.objectType(CountStatisticSummary.ObjectType.Application)
							.objectCount(575L).build()))).build()).build()).build())
		.stagingConnection(ConnectionSummaryFromObjectStorage.builder()
			.credentialFileContent("EXAMPLE-credentialFileContent-Value")
			.userId("ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value")
			.fingerPrint("EXAMPLE-fingerPrint-Value")
			.passPhrase("EXAMPLE-passPhrase-Value")
			.key("EXAMPLE-key-Value")
			.modelVersion("EXAMPLE-modelVersion-Value")
			.parentRef(ParentReference.builder()
				.parent("EXAMPLE-parent-Value")
				.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
			.name("EXAMPLE-name-Value")
			.description("EXAMPLE-description-Value")
			.objectVersion(328)
			.objectStatus(173)
			.identifier("EXAMPLE-identifier-Value")
			.primarySchema(Schema.builder()
				.key("EXAMPLE-key-Value")
				.modelType("EXAMPLE-modelType-Value")
				.modelVersion("EXAMPLE-modelVersion-Value")
				.parentRef(ParentReference.builder()
					.parent("EXAMPLE-parent-Value")
					.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
				.name("EXAMPLE-name-Value")
				.resourceName("EXAMPLE-resourceName-Value")
				.description("EXAMPLE-description-Value")
				.objectVersion(312)
				.externalKey("EXAMPLE-externalKey-Value")
				.isHasContainers(true)
				.defaultConnection("EXAMPLE-defaultConnection-Value")
				.objectStatus(863)
				.identifier("EXAMPLE-identifier-Value")
				.metadata(ObjectMetadata.builder()
					.createdBy("EXAMPLE-createdBy-Value")
					.createdByName("EXAMPLE-createdByName-Value")
					.updatedBy("EXAMPLE-updatedBy-Value")
					.updatedByName("EXAMPLE-updatedByName-Value")
					.timeCreated(new Date("Fri Jun 04 13:50:26 UTC 2038"))
					.timeUpdated(new Date("Tue Nov 28 05:24:09 UTC 2023"))
					.aggregatorKey("EXAMPLE-aggregatorKey-Value")
					.aggregator(AggregatorSummary.builder()
						.type("EXAMPLE-type-Value")
						.key("EXAMPLE-key-Value")
						.name("EXAMPLE-name-Value")
						.identifier("EXAMPLE-identifier-Value")
						.description("EXAMPLE-description-Value").build())
					.identifierPath("EXAMPLE-identifierPath-Value")
					.infoFields(new HashMap<java.lang.String, java.lang.String>() {
							{
								put("EXAMPLE_KEY_gBUho","EXAMPLE_VALUE_0gyAPHvLiPjRVinfEH8b");
							}
 						})
					.registryVersion(704)
					.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
					.isFavorite(true)
					.countStatistics(CountStatistic.builder()
						.objectTypeCountList(new ArrayList<>(Arrays.asList(CountStatisticSummary.builder()
								.objectType(CountStatisticSummary.ObjectType.Folder)
								.objectCount(915L).build()))).build()).build()).build())
			.connectionProperties(new ArrayList<>(Arrays.asList(ConnectionProperty.builder()
					.name("EXAMPLE-name-Value")
					.value("EXAMPLE-value-Value").build())))
			.isDefault(true)
			.metadata(ObjectMetadata.builder()
				.createdBy("EXAMPLE-createdBy-Value")
				.createdByName("EXAMPLE-createdByName-Value")
				.updatedBy("EXAMPLE-updatedBy-Value")
				.updatedByName("EXAMPLE-updatedByName-Value")
				.timeCreated(new Date("Thu May 28 11:26:50 UTC 2043"))
				.timeUpdated(new Date("Fri Sep 29 19:09:09 UTC 2034"))
				.aggregatorKey("EXAMPLE-aggregatorKey-Value")
				.aggregator(AggregatorSummary.builder()
					.type("EXAMPLE-type-Value")
					.key("EXAMPLE-key-Value")
					.name("EXAMPLE-name-Value")
					.identifier("EXAMPLE-identifier-Value")
					.description("EXAMPLE-description-Value").build())
				.identifierPath("EXAMPLE-identifierPath-Value")
				.infoFields(new HashMap<java.lang.String, java.lang.String>() {
						{
							put("EXAMPLE_KEY_mEJJC","EXAMPLE_VALUE_Ww3aG6lG7CbU7YlQ8by7");
						}
 					})
				.registryVersion(279)
				.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
				.isFavorite(false)
				.countStatistics(CountStatistic.builder()
					.objectTypeCountList(new ArrayList<>(Arrays.asList(CountStatisticSummary.builder()
							.objectType(CountStatisticSummary.ObjectType.Connection)
							.objectCount(356L).build()))).build()).build())
			.keyMap(new HashMap<java.lang.String, java.lang.String>() {
					{
						put("EXAMPLE_KEY_sZcDd","EXAMPLE_VALUE_OBIXrF2myhfzzVnkwrgA");
					}
 				}).build())
		.bucketSchema(Schema.builder()
			.key("EXAMPLE-key-Value")
			.modelType("EXAMPLE-modelType-Value")
			.modelVersion("EXAMPLE-modelVersion-Value")
			.parentRef(ParentReference.builder()
				.parent("EXAMPLE-parent-Value")
				.rootDocId("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value").build())
			.name("EXAMPLE-name-Value")
			.resourceName("EXAMPLE-resourceName-Value")
			.description("EXAMPLE-description-Value")
			.objectVersion(849)
			.externalKey("EXAMPLE-externalKey-Value")
			.isHasContainers(true)
			.defaultConnection("EXAMPLE-defaultConnection-Value")
			.objectStatus(385)
			.identifier("EXAMPLE-identifier-Value")
			.metadata(ObjectMetadata.builder()
				.createdBy("EXAMPLE-createdBy-Value")
				.createdByName("EXAMPLE-createdByName-Value")
				.updatedBy("EXAMPLE-updatedBy-Value")
				.updatedByName("EXAMPLE-updatedByName-Value")
				.timeCreated(new Date("Sat May 26 21:30:47 UTC 2040"))
				.timeUpdated(new Date("Sat Jan 25 12:20:58 UTC 2042"))
				.aggregatorKey("EXAMPLE-aggregatorKey-Value")
				.aggregator(AggregatorSummary.builder()
					.type("EXAMPLE-type-Value")
					.key("EXAMPLE-key-Value")
					.name("EXAMPLE-name-Value")
					.identifier("EXAMPLE-identifier-Value")
					.description("EXAMPLE-description-Value").build())
				.identifierPath("EXAMPLE-identifierPath-Value")
				.infoFields(new HashMap<java.lang.String, java.lang.String>() {
						{
							put("EXAMPLE_KEY_HDl3M","EXAMPLE_VALUE_HibgUXHeSH78CVuR0Sx3");
						}
 					})
				.registryVersion(451)
				.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
				.isFavorite(false)
				.countStatistics(CountStatistic.builder()
					.objectTypeCountList(new ArrayList<>(Arrays.asList(CountStatisticSummary.builder()
							.objectType(CountStatisticSummary.ObjectType.DataAsset)
							.objectCount(959L).build()))).build()).build()).build())
		.key("EXAMPLE-key-Value")
		.modelVersion("EXAMPLE-modelVersion-Value")
		.name("EXAMPLE-name-Value")
		.description("EXAMPLE-description-Value")
		.objectStatus(595)
		.identifier("EXAMPLE-identifier-Value")
		.externalKey("EXAMPLE-externalKey-Value")
		.assetProperties(new HashMap<java.lang.String, java.lang.String>() {
				{
					put("EXAMPLE_KEY_ahdI5","EXAMPLE_VALUE_I9teCYMFNpnkdO1Atz9W");
				}
 			})
		.registryMetadata(RegistryMetadata.builder()
			.aggregatorKey("EXAMPLE-aggregatorKey-Value")
			.labels(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
			.registryVersion(687)
			.key("EXAMPLE-key-Value")
			.isFavorite(false).build()).build();

	CreateDataAssetRequest createDataAssetRequest = CreateDataAssetRequest.builder()
		.workspaceId("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")
		.createDataAssetDetails(createDataAssetDetails)
		.opcRequestId("QP47CHDIW85OCAJX2CB4<unique_ID>")
		.opcRetryToken("EXAMPLE-opcRetryToken-Value").build();

        /* Send request to the Client */
        CreateDataAssetResponse response = client.createDataAsset(createDataAssetRequest);
    }

    
}