// 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).

package main

import (
	"context"
	"fmt"
	"time"

	"github.com/oracle/oci-go-sdk/v65/common"
	"github.com/oracle/oci-go-sdk/v65/dataintegration"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
)

func ExampleCreateExternalPublication() {
	// 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.
	client, err := dataintegration.NewDataIntegrationClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

	// Create a request and dependent object(s).
	var defaultValue interface{}
	defaultValue = "EXAMPLE-defaultValue-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	req := dataintegration.CreateExternalPublicationRequest{TaskKey: common.String("EXAMPLE-taskKey-Value"),
		WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		CreateExternalPublicationDetails: dataintegration.CreateExternalPublicationDetails{Description: common.String("EXAMPLE-description-Value"),
			DisplayName: common.String("EXAMPLE-displayName-Value"),
			ResourceConfiguration: &dataintegration.ResourceConfiguration{TotalExecutors: common.Int(481),
				DriverShape:   common.String("EXAMPLE-driverShape-Value"),
				ExecutorShape: common.String("EXAMPLE-executorShape-Value"),
				SparkVersion:  common.String("EXAMPLE-sparkVersion-Value")},
			ApplicationCompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-applicationCompartmentId-Value"),
			ApplicationId:            common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value"),
			ConfigurationDetails: &dataintegration.ConfigurationDetails{DataAsset: dataintegration.DataAssetFromAdwcDetails{Name: common.String("EXAMPLE-name-Value"),
				AssetProperties: map[string]string{"EXAMPLE_KEY_S8ecN": "EXAMPLE_VALUE_f9BlnUMFY7pQAkt8405s"},
				DefaultConnection: &dataintegration.ConnectionFromAdwcDetails{Key: common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(824),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					TnsNames:    []string{"EXAMPLE--Value"},
					Description: common.String("EXAMPLE-description-Value"),
					Identifier:  common.String("EXAMPLE-identifier-Value"),
					Metadata: &dataintegration.ObjectMetadata{TimeCreated: &common.SDKTime{Time: time.Now()},
						TimeUpdated: &common.SDKTime{Time: time.Now()},
						UpdatedBy:   common.String("EXAMPLE-updatedBy-Value"),
						Aggregator: &dataintegration.AggregatorSummary{Type: common.String("EXAMPLE-type-Value"),
							Description: common.String("EXAMPLE-description-Value"),
							Identifier:  common.String("EXAMPLE-identifier-Value"),
							Key:         common.String("EXAMPLE-key-Value"),
							Name:        common.String("EXAMPLE-name-Value")},
						CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(136),
							ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataFlow}}},
						CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
						IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
						InfoFields:      map[string]string{"EXAMPLE_KEY_lMKhi": "EXAMPLE_VALUE_KVPd5soszfkk9ousSKug"},
						IsFavorite:      common.Bool(false),
						UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
						AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
						CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
						Labels:          []string{"EXAMPLE--Value"},
						RegistryVersion: common.Int(792)},
					PasswordSecret: &dataintegration.SensitiveAttribute{SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")},
						Value: common.String("EXAMPLE-value-Value")},
					Name:          common.String("EXAMPLE-name-Value"),
					ObjectVersion: common.Int(456),
					PrimarySchema: &dataintegration.Schema{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						ObjectStatus:      common.Int(334),
						ResourceName:      common.String("EXAMPLE-resourceName-Value"),
						DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
						Identifier:        common.String("EXAMPLE-identifier-Value"),
						Metadata: &dataintegration.ObjectMetadata{InfoFields: map[string]string{"EXAMPLE_KEY_zLpLb": "EXAMPLE_VALUE_sRAWO6hzWZCebyBeV5iB"},
							Labels:      []string{"EXAMPLE--Value"},
							TimeUpdated: &common.SDKTime{Time: time.Now()},
							UpdatedBy:   common.String("EXAMPLE-updatedBy-Value"),
							Aggregator: &dataintegration.AggregatorSummary{Key: common.String("EXAMPLE-key-Value"),
								Name:        common.String("EXAMPLE-name-Value"),
								Type:        common.String("EXAMPLE-type-Value"),
								Description: common.String("EXAMPLE-description-Value"),
								Identifier:  common.String("EXAMPLE-identifier-Value")},
							CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
							IsFavorite:      common.Bool(false),
							RegistryVersion: common.Int(617),
							TimeCreated:     &common.SDKTime{Time: time.Now()},
							UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
							AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
							CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(574),
								ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataFlow}}},
							CreatedBy:      common.String("EXAMPLE-createdBy-Value"),
							IdentifierPath: common.String("EXAMPLE-identifierPath-Value")},
						Name:          common.String("EXAMPLE-name-Value"),
						ObjectVersion: common.Int(241),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						Description:     common.String("EXAMPLE-description-Value"),
						ExternalKey:     common.String("EXAMPLE-externalKey-Value"),
						IsHasContainers: common.Bool(true),
						Key:             common.String("EXAMPLE-key-Value")},
					Username: common.String("EXAMPLE-username-Value"),
					ConnectionProperties: []dataintegration.ConnectionProperty{dataintegration.ConnectionProperty{Name: common.String("EXAMPLE-name-Value"),
						Value: common.String("EXAMPLE-value-Value")}},
					Password:  common.String("EXAMPLE-password-Value"),
					TnsAlias:  common.String("EXAMPLE-tnsAlias-Value"),
					IsDefault: common.Bool(false)},
				DriverClass: common.String("EXAMPLE-driverClass-Value"),
				KeyMap:      map[string]string{"EXAMPLE_KEY_zfosY": "EXAMPLE_VALUE_IYJbntLbDo2avBQYJywk"},
				Metadata: &dataintegration.ObjectMetadata{IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
					IsFavorite:      common.Bool(true),
					Labels:          []string{"EXAMPLE--Value"},
					RegistryVersion: common.Int(383),
					TimeUpdated:     &common.SDKTime{Time: time.Now()},
					UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
					Aggregator: &dataintegration.AggregatorSummary{Type: common.String("EXAMPLE-type-Value"),
						Description: common.String("EXAMPLE-description-Value"),
						Identifier:  common.String("EXAMPLE-identifier-Value"),
						Key:         common.String("EXAMPLE-key-Value"),
						Name:        common.String("EXAMPLE-name-Value")},
					CreatedBy:     common.String("EXAMPLE-createdBy-Value"),
					CreatedByName: common.String("EXAMPLE-createdByName-Value"),
					InfoFields:    map[string]string{"EXAMPLE_KEY_XU4M5": "EXAMPLE_VALUE_v4adIMpXyZc4B7wmf4Qu"},
					TimeCreated:   &common.SDKTime{Time: time.Now()},
					UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
					AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
					CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(693),
						ObjectType: dataintegration.CountStatisticSummaryObjectTypeFunctionLibrary}}}},
				ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
					RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
				ServiceNames: []string{"EXAMPLE--Value"},
				BucketSchema: &dataintegration.Schema{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:            common.String("EXAMPLE-name-Value"),
					ResourceName:    common.String("EXAMPLE-resourceName-Value"),
					Description:     common.String("EXAMPLE-description-Value"),
					Identifier:      common.String("EXAMPLE-identifier-Value"),
					IsHasContainers: common.Bool(false),
					Key:             common.String("EXAMPLE-key-Value"),
					Metadata: &dataintegration.ObjectMetadata{TimeCreated: &common.SDKTime{Time: time.Now()},
						TimeUpdated: &common.SDKTime{Time: time.Now()},
						Aggregator: &dataintegration.AggregatorSummary{Type: common.String("EXAMPLE-type-Value"),
							Description: common.String("EXAMPLE-description-Value"),
							Identifier:  common.String("EXAMPLE-identifier-Value"),
							Key:         common.String("EXAMPLE-key-Value"),
							Name:        common.String("EXAMPLE-name-Value")},
						CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(439),
							ObjectType: dataintegration.CountStatisticSummaryObjectTypeFunctionLibrary}}},
						CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
						RegistryVersion: common.Int(20),
						UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
						UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
						AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
						CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
						IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
						InfoFields:      map[string]string{"EXAMPLE_KEY_FLIjA": "EXAMPLE_VALUE_xjKFVRvIQSxI9yoBMU9U"},
						IsFavorite:      common.Bool(false),
						Labels:          []string{"EXAMPLE--Value"}},
					ObjectStatus:  common.Int(86),
					ObjectVersion: common.Int(775),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
					ExternalKey:       common.String("EXAMPLE-externalKey-Value")},
				ExternalKey:   common.String("EXAMPLE-externalKey-Value"),
				ObjectVersion: common.Int(273),
				NativeTypeSystem: &dataintegration.TypeSystem{TypeMappingTo: map[string]string{"EXAMPLE_KEY_s2HK2": "EXAMPLE_VALUE_Nj2gLfRUi5SvOe5DFkfN"},
					Types: []dataintegration.DataType{dataintegration.DataType{TypeSystemName: common.String("EXAMPLE-typeSystemName-Value"),
						ConfigDefinition: &dataintegration.ConfigDefinition{ObjectStatus: common.Int(326),
							ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
								RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
							ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_Aqv1q": dataintegration.ConfigParameterDefinition{DefaultValue: &defaultValue,
								Description:       common.String("EXAMPLE-description-Value"),
								IsClassFieldValue: common.Bool(false),
								IsStatic:          common.Bool(false),
								ParameterName:     common.String("EXAMPLE-parameterName-Value"),
								ParameterType: dataintegration.CompositeType{Elements: []dataintegration.TypedObject{dataintegration.DynamicProxyField{Name: common.String("EXAMPLE-name-Value"),
									ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_rup8D": dataintegration.ConfigParameterValue{RefValue: &refValue,
										RootObjectValue: &rootObjectValue,
										StringValue:     common.String("EXAMPLE-stringValue-Value"),
										IntValue:        common.Int(625),
										ObjectValue:     &objectValue,
										ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}},
										ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
											RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
									Description:  common.String("EXAMPLE-description-Value"),
									ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
									ObjectStatus: common.Int(752),
									ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
										Parent: common.String("EXAMPLE-parent-Value")},
									Key:    common.String("EXAMPLE-key-Value"),
									Labels: []string{"EXAMPLE--Value"}}},
									Key:          common.String("EXAMPLE-key-Value"),
									ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
									Name:         common.String("EXAMPLE-name-Value"),
									ObjectStatus: common.Int(590),
									ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
										RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
									Description: common.String("EXAMPLE-description-Value")},
								ClassFieldName: common.String("EXAMPLE-classFieldName-Value")}},
							IsContained:  common.Bool(true),
							Key:          common.String("EXAMPLE-key-Value"),
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value")},
						Description:  common.String("EXAMPLE-description-Value"),
						DtType:       dataintegration.DataTypeDtTypeStructured,
						Key:          common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(401),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}},
					Identifier:      common.String("EXAMPLE-identifier-Value"),
					Key:             common.String("EXAMPLE-key-Value"),
					ModelVersion:    common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus:    common.Int(915),
					TypeMappingFrom: map[string]string{"EXAMPLE_KEY_IG1lh": "EXAMPLE_VALUE_PGQ5FJ1BkdJPXbfOSUM8"},
					Description:     common.String("EXAMPLE-description-Value"),
					Name:            common.String("EXAMPLE-name-Value"),
					ObjectVersion:   common.Int(41),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
				Description:  common.String("EXAMPLE-description-Value"),
				Identifier:   common.String("EXAMPLE-identifier-Value"),
				Key:          common.String("EXAMPLE-key-Value"),
				ObjectStatus: common.Int(844),
				ServiceName:  common.String("EXAMPLE-serviceName-Value"),
				StagingConnection: dataintegration.ConnectionFromAmazonS3{Name: common.String("EXAMPLE-name-Value"),
					ObjectStatus:  common.Int(385),
					ObjectVersion: common.Int(968),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					PrimarySchema: &dataintegration.Schema{Identifier: common.String("EXAMPLE-identifier-Value"),
						IsHasContainers:   common.Bool(true),
						Key:               common.String("EXAMPLE-key-Value"),
						ModelVersion:      common.String("EXAMPLE-modelVersion-Value"),
						Name:              common.String("EXAMPLE-name-Value"),
						ObjectVersion:     common.Int(446),
						ResourceName:      common.String("EXAMPLE-resourceName-Value"),
						DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
						Description:       common.String("EXAMPLE-description-Value"),
						ExternalKey:       common.String("EXAMPLE-externalKey-Value"),
						Metadata: &dataintegration.ObjectMetadata{CreatedBy: common.String("EXAMPLE-createdBy-Value"),
							InfoFields:      map[string]string{"EXAMPLE_KEY_D6jAk": "EXAMPLE_VALUE_YyI1yRdL0nAz0q4hd7iC"},
							IsFavorite:      common.Bool(false),
							RegistryVersion: common.Int(153),
							TimeCreated:     &common.SDKTime{Time: time.Now()},
							TimeUpdated:     &common.SDKTime{Time: time.Now()},
							CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(560),
								ObjectType: dataintegration.CountStatisticSummaryObjectTypeTask}}},
							CreatedByName:  common.String("EXAMPLE-createdByName-Value"),
							IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
							Labels:         []string{"EXAMPLE--Value"},
							UpdatedBy:      common.String("EXAMPLE-updatedBy-Value"),
							UpdatedByName:  common.String("EXAMPLE-updatedByName-Value"),
							Aggregator: &dataintegration.AggregatorSummary{Name: common.String("EXAMPLE-name-Value"),
								Type:        common.String("EXAMPLE-type-Value"),
								Description: common.String("EXAMPLE-description-Value"),
								Identifier:  common.String("EXAMPLE-identifier-Value"),
								Key:         common.String("EXAMPLE-key-Value")},
							AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value")},
						ObjectStatus: common.Int(728),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
					AccessKey: &dataintegration.SensitiveAttribute{SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")},
						Value: common.String("EXAMPLE-value-Value")},
					ConnectionProperties: []dataintegration.ConnectionProperty{dataintegration.ConnectionProperty{Name: common.String("EXAMPLE-name-Value"),
						Value: common.String("EXAMPLE-value-Value")}},
					Description: common.String("EXAMPLE-description-Value"),
					IsDefault:   common.Bool(false),
					Key:         common.String("EXAMPLE-key-Value"),
					KeyMap:      map[string]string{"EXAMPLE_KEY_i9ICS": "EXAMPLE_VALUE_5dlyj173Z5IGlTOSCQFG"},
					SecretKey: &dataintegration.SensitiveAttribute{SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")},
						Value: common.String("EXAMPLE-value-Value")},
					Identifier: common.String("EXAMPLE-identifier-Value"),
					Metadata: &dataintegration.ObjectMetadata{Aggregator: &dataintegration.AggregatorSummary{Key: common.String("EXAMPLE-key-Value"),
						Name:        common.String("EXAMPLE-name-Value"),
						Type:        common.String("EXAMPLE-type-Value"),
						Description: common.String("EXAMPLE-description-Value"),
						Identifier:  common.String("EXAMPLE-identifier-Value")},
						CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
						IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
						Labels:          []string{"EXAMPLE--Value"},
						RegistryVersion: common.Int(744),
						TimeCreated:     &common.SDKTime{Time: time.Now()},
						UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
						AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
						CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(747),
							ObjectType: dataintegration.CountStatisticSummaryObjectTypeApplication}}},
						CreatedByName: common.String("EXAMPLE-createdByName-Value"),
						InfoFields:    map[string]string{"EXAMPLE_KEY_Hq7LW": "EXAMPLE_VALUE_RAW32PyocWxjpuKDrKaW"},
						IsFavorite:    common.Bool(true),
						TimeUpdated:   &common.SDKTime{Time: time.Now()},
						UpdatedByName: common.String("EXAMPLE-updatedByName-Value")},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
				ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
				Schema: &dataintegration.Schema{DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
					ExternalKey:     common.String("EXAMPLE-externalKey-Value"),
					Identifier:      common.String("EXAMPLE-identifier-Value"),
					IsHasContainers: common.Bool(false),
					Key:             common.String("EXAMPLE-key-Value"),
					Metadata: &dataintegration.ObjectMetadata{Labels: []string{"EXAMPLE--Value"},
						TimeUpdated:   &common.SDKTime{Time: time.Now()},
						UpdatedBy:     common.String("EXAMPLE-updatedBy-Value"),
						AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
						CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(725),
							ObjectType: dataintegration.CountStatisticSummaryObjectTypeTask}}},
						CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
						IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
						IsFavorite:      common.Bool(false),
						RegistryVersion: common.Int(722),
						TimeCreated:     &common.SDKTime{Time: time.Now()},
						UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
						Aggregator: &dataintegration.AggregatorSummary{Description: common.String("EXAMPLE-description-Value"),
							Identifier: common.String("EXAMPLE-identifier-Value"),
							Key:        common.String("EXAMPLE-key-Value"),
							Name:       common.String("EXAMPLE-name-Value"),
							Type:       common.String("EXAMPLE-type-Value")},
						CreatedByName: common.String("EXAMPLE-createdByName-Value"),
						InfoFields:    map[string]string{"EXAMPLE_KEY_uUmIq": "EXAMPLE_VALUE_btwOPON01PlhXor1LTj8"}},
					Name:          common.String("EXAMPLE-name-Value"),
					ObjectStatus:  common.Int(943),
					Description:   common.String("EXAMPLE-description-Value"),
					ModelType:     common.String("EXAMPLE-modelType-Value"),
					ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
					ObjectVersion: common.Int(93),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					ResourceName: common.String("EXAMPLE-resourceName-Value")},
				CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
				Connection: dataintegration.ConnectionFromMySqlHeatWave{Name: common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(800),
					PasswordSecret: &dataintegration.SensitiveAttribute{SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")},
						Value: common.String("EXAMPLE-value-Value")},
					Description: common.String("EXAMPLE-description-Value"),
					Metadata: &dataintegration.ObjectMetadata{UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
						CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(517),
							ObjectType: dataintegration.CountStatisticSummaryObjectTypeProject}}},
						IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
						InfoFields:     map[string]string{"EXAMPLE_KEY_IjO06": "EXAMPLE_VALUE_Dx9bhXfw7d3chM0HdMfc"},
						Labels:         []string{"EXAMPLE--Value"},
						TimeCreated:    &common.SDKTime{Time: time.Now()},
						TimeUpdated:    &common.SDKTime{Time: time.Now()},
						UpdatedBy:      common.String("EXAMPLE-updatedBy-Value"),
						Aggregator: &dataintegration.AggregatorSummary{Description: common.String("EXAMPLE-description-Value"),
							Identifier: common.String("EXAMPLE-identifier-Value"),
							Key:        common.String("EXAMPLE-key-Value"),
							Name:       common.String("EXAMPLE-name-Value"),
							Type:       common.String("EXAMPLE-type-Value")},
						AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
						CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
						CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
						IsFavorite:      common.Bool(false),
						RegistryVersion: common.Int(218)},
					ObjectVersion: common.Int(487),
					Password:      common.String("EXAMPLE-password-Value"),
					Username:      common.String("EXAMPLE-username-Value"),
					KeyMap:        map[string]string{"EXAMPLE_KEY_aRJDB": "EXAMPLE_VALUE_daoddWlqpNeehycCMj9s"},
					ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
					ConnectionProperties: []dataintegration.ConnectionProperty{dataintegration.ConnectionProperty{Name: common.String("EXAMPLE-name-Value"),
						Value: common.String("EXAMPLE-value-Value")}},
					IsDefault: common.Bool(false),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					PrimarySchema: &dataintegration.Schema{DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
						Description:     common.String("EXAMPLE-description-Value"),
						Identifier:      common.String("EXAMPLE-identifier-Value"),
						IsHasContainers: common.Bool(true),
						ObjectVersion:   common.Int(519),
						ResourceName:    common.String("EXAMPLE-resourceName-Value"),
						ExternalKey:     common.String("EXAMPLE-externalKey-Value"),
						Key:             common.String("EXAMPLE-key-Value"),
						Metadata: &dataintegration.ObjectMetadata{AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
							CreatedBy:      common.String("EXAMPLE-createdBy-Value"),
							IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
							IsFavorite:     common.Bool(true),
							Labels:         []string{"EXAMPLE--Value"},
							TimeCreated:    &common.SDKTime{Time: time.Now()},
							UpdatedBy:      common.String("EXAMPLE-updatedBy-Value"),
							CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataFlow,
								ObjectCount: common.Int64(304)}}},
							CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
							InfoFields:      map[string]string{"EXAMPLE_KEY_WQW67": "EXAMPLE_VALUE_iZBaykQL7lrkE6nl8xJU"},
							RegistryVersion: common.Int(242),
							TimeUpdated:     &common.SDKTime{Time: time.Now()},
							UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
							Aggregator: &dataintegration.AggregatorSummary{Key: common.String("EXAMPLE-key-Value"),
								Name:        common.String("EXAMPLE-name-Value"),
								Type:        common.String("EXAMPLE-type-Value"),
								Description: common.String("EXAMPLE-description-Value"),
								Identifier:  common.String("EXAMPLE-identifier-Value")}},
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(529),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
					Identifier: common.String("EXAMPLE-identifier-Value"),
					Key:        common.String("EXAMPLE-key-Value")}}},
		OpcRequestId:  common.String("TLGLP1BX3PGTE5Y1FDGD<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value")}

	// Send the request using the service client
	resp, err := client.CreateExternalPublication(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}