// 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 ExampleUpdateExternalPublication() {
	// 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 objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var scope interface{}
	scope = "EXAMPLE-scope-Value"
	req := dataintegration.UpdateExternalPublicationRequest{OpcRequestId: common.String("QTEQBREHVFKCMI55OBG2<unique_ID>"),
		TaskKey: common.String("EXAMPLE-taskKey-Value"),
		UpdateExternalPublicationDetails: dataintegration.UpdateExternalPublicationDetails{DisplayName: common.String("EXAMPLE-displayName-Value"),
			ResourceConfiguration: &dataintegration.ResourceConfiguration{SparkVersion: common.String("EXAMPLE-sparkVersion-Value"),
				TotalExecutors: common.Int(455),
				DriverShape:    common.String("EXAMPLE-driverShape-Value"),
				ExecutorShape:  common.String("EXAMPLE-executorShape-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{CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
				Connection: dataintegration.ConnectionFromAtp{ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
					Parent: common.String("EXAMPLE-parent-Value")},
					PasswordSecret: &dataintegration.SensitiveAttribute{Value: common.String("EXAMPLE-value-Value"),
						SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")}},
					PrimarySchema: &dataintegration.Schema{ObjectStatus: common.Int(167),
						ObjectVersion:   common.Int(358),
						ResourceName:    common.String("EXAMPLE-resourceName-Value"),
						Description:     common.String("EXAMPLE-description-Value"),
						ExternalKey:     common.String("EXAMPLE-externalKey-Value"),
						Identifier:      common.String("EXAMPLE-identifier-Value"),
						IsHasContainers: common.Bool(true),
						Key:             common.String("EXAMPLE-key-Value"),
						Metadata: &dataintegration.ObjectMetadata{IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
							InfoFields:  map[string]string{"EXAMPLE_KEY_g2L0Z": "EXAMPLE_VALUE_XJEG0x33RDJZf8GgPx0q"},
							IsFavorite:  common.Bool(true),
							Labels:      []string{"EXAMPLE--Value"},
							TimeCreated: &common.SDKTime{Time: time.Now()},
							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"),
							RegistryVersion: common.Int(230),
							TimeUpdated:     &common.SDKTime{Time: time.Now()},
							UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
							UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
							CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(169),
								ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataFlow}}}},
						Name: common.String("EXAMPLE-name-Value"),
						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"),
						ModelVersion:      common.String("EXAMPLE-modelVersion-Value")},
					TnsAlias:     common.String("EXAMPLE-tnsAlias-Value"),
					IsDefault:    common.Bool(false),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(457),
					Password:     common.String("EXAMPLE-password-Value"),
					Username:     common.String("EXAMPLE-username-Value"),
					Description:  common.String("EXAMPLE-description-Value"),
					Metadata: &dataintegration.ObjectMetadata{AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
						CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(296),
							ObjectType: dataintegration.CountStatisticSummaryObjectTypeUserDefinedFunction}}},
						CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
						CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
						IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
						InfoFields:      map[string]string{"EXAMPLE_KEY_5K9Ih": "EXAMPLE_VALUE_9DvG0Xbe1Q8q2uuYZ485"},
						IsFavorite:      common.Bool(true),
						RegistryVersion: common.Int(867),
						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")},
						Labels:        []string{"EXAMPLE--Value"},
						TimeCreated:   &common.SDKTime{Time: time.Now()},
						TimeUpdated:   &common.SDKTime{Time: time.Now()},
						UpdatedBy:     common.String("EXAMPLE-updatedBy-Value"),
						UpdatedByName: common.String("EXAMPLE-updatedByName-Value")},
					Name:     common.String("EXAMPLE-name-Value"),
					TnsNames: []string{"EXAMPLE--Value"},
					KeyMap:   map[string]string{"EXAMPLE_KEY_K4VYf": "EXAMPLE_VALUE_P7DMZmTRRFSUJ9JFGcQv"},
					ConnectionProperties: []dataintegration.ConnectionProperty{dataintegration.ConnectionProperty{Name: common.String("EXAMPLE-name-Value"),
						Value: common.String("EXAMPLE-value-Value")}},
					Identifier:    common.String("EXAMPLE-identifier-Value"),
					Key:           common.String("EXAMPLE-key-Value"),
					ObjectVersion: common.Int(972)},
				DataAsset: dataintegration.DataAssetFromAdwcDetails{NativeTypeSystem: &dataintegration.TypeSystem{Key: common.String("EXAMPLE-key-Value"),
					ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
					Name:          common.String("EXAMPLE-name-Value"),
					ObjectVersion: common.Int(957),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					TypeMappingFrom: map[string]string{"EXAMPLE_KEY_Z2xGE": "EXAMPLE_VALUE_OBbHhuVSsNGqLfrYrkej"},
					TypeMappingTo:   map[string]string{"EXAMPLE_KEY_uOr3F": "EXAMPLE_VALUE_7Ir25UBmk1WsEfz63bzx"},
					Description:     common.String("EXAMPLE-description-Value"),
					Identifier:      common.String("EXAMPLE-identifier-Value"),
					ObjectStatus:    common.Int(593),
					Types: []dataintegration.DataType{dataintegration.DataType{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						ConfigDefinition: &dataintegration.ConfigDefinition{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(18),
							ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
								Parent: common.String("EXAMPLE-parent-Value")},
							ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_znZxj": dataintegration.ConfigParameterDefinition{ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
								DefaultValue:      &defaultValue,
								Description:       common.String("EXAMPLE-description-Value"),
								IsClassFieldValue: common.Bool(false),
								IsStatic:          common.Bool(false),
								ParameterName:     common.String("EXAMPLE-parameterName-Value"),
								ParameterType: dataintegration.DynamicType{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
									Name:         common.String("EXAMPLE-name-Value"),
									ObjectStatus: common.Int(211),
									ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
										RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
									TypeHandler: dataintegration.RuleTypeConfig{IsOrderByRule: common.Bool(true),
										ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
										ObjectStatus: common.Int(90),
										ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
											RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
										ProjectionRules: []dataintegration.ProjectionRule{dataintegration.RenameRule{Key: common.String("EXAMPLE-key-Value"),
											ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
											ObjectStatus: common.Int(337),
											ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_vyfGl": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
												ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
												RefValue:        &refValue,
												RootObjectValue: &rootObjectValue,
												StringValue:     common.String("EXAMPLE-stringValue-Value"),
												IntValue:        common.Int(603)}},
												ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
													RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
											FromName:          common.String("EXAMPLE-fromName-Value"),
											IsJavaRegexSyntax: common.Bool(true),
											ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
												RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
											ToName:                      common.String("EXAMPLE-toName-Value"),
											Description:                 common.String("EXAMPLE-description-Value"),
											IsSkipRemainingRulesOnMatch: common.Bool(true)}},
										ScopeReference: &dataintegration.ScopeReference{RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
											ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
											ReferenceType:   dataintegration.ScopeReferenceReferenceTypeOciFunctionInputShape},
										ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_nOYA3": dataintegration.ConfigParameterValue{IntValue: common.Int(33),
											ObjectValue:     &objectValue,
											ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
											RefValue:        &refValue,
											RootObjectValue: &rootObjectValue,
											StringValue:     common.String("EXAMPLE-stringValue-Value")}},
											ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
												RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
										Key:   common.String("EXAMPLE-key-Value"),
										Scope: &scope},
									Description: common.String("EXAMPLE-description-Value"),
									Key:         common.String("EXAMPLE-key-Value")}}},
							IsContained: common.Bool(true),
							Key:         common.String("EXAMPLE-key-Value")},
						Description:    common.String("EXAMPLE-description-Value"),
						DtType:         dataintegration.DataTypeDtTypePrimitive,
						Key:            common.String("EXAMPLE-key-Value"),
						TypeSystemName: common.String("EXAMPLE-typeSystemName-Value"),
						ModelVersion:   common.String("EXAMPLE-modelVersion-Value"),
						Name:           common.String("EXAMPLE-name-Value"),
						ObjectStatus:   common.Int(150)}}},
					ObjectVersion:   common.Int(26),
					ServiceName:     common.String("EXAMPLE-serviceName-Value"),
					Name:            common.String("EXAMPLE-name-Value"),
					DriverClass:     common.String("EXAMPLE-driverClass-Value"),
					Identifier:      common.String("EXAMPLE-identifier-Value"),
					KeyMap:          map[string]string{"EXAMPLE_KEY_VZ0dY": "EXAMPLE_VALUE_oodgVdnMwcmr1QcML9IW"},
					AssetProperties: map[string]string{"EXAMPLE_KEY_4LxQ5": "EXAMPLE_VALUE_fsLTTp41ExYJhOnyyZbI"},
					BucketSchema: &dataintegration.Schema{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"),
						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{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")},
							CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(533),
								ObjectType: dataintegration.CountStatisticSummaryObjectTypeApplication}}},
							CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
							IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
							InfoFields:      map[string]string{"EXAMPLE_KEY_ZvLaD": "EXAMPLE_VALUE_BtDxr74NNLJDM6wS8R1d"},
							Labels:          []string{"EXAMPLE--Value"},
							RegistryVersion: common.Int(661),
							TimeCreated:     &common.SDKTime{Time: time.Now()},
							AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
							CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
							IsFavorite:      common.Bool(true),
							TimeUpdated:     &common.SDKTime{Time: time.Now()},
							UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
							UpdatedByName:   common.String("EXAMPLE-updatedByName-Value")},
						ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
						Description:   common.String("EXAMPLE-description-Value"),
						Name:          common.String("EXAMPLE-name-Value"),
						ObjectStatus:  common.Int(286),
						ObjectVersion: common.Int(263)},
					ObjectStatus: common.Int(260),
					ServiceNames: []string{"EXAMPLE--Value"},
					DefaultConnection: &dataintegration.ConnectionFromAdwcDetails{Key: common.String("EXAMPLE-key-Value"),
						Metadata: &dataintegration.ObjectMetadata{RegistryVersion: common.Int(321),
							TimeUpdated:    &common.SDKTime{Time: time.Now()},
							AggregatorKey:  common.String("EXAMPLE-aggregatorKey-Value"),
							IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
							InfoFields:     map[string]string{"EXAMPLE_KEY_zBkOL": "EXAMPLE_VALUE_L1CmF6S1c2nvoNZNV1DE"},
							IsFavorite:     common.Bool(true),
							TimeCreated:    &common.SDKTime{Time: time.Now()},
							UpdatedBy:      common.String("EXAMPLE-updatedBy-Value"),
							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")},
							CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(871),
								ObjectType: dataintegration.CountStatisticSummaryObjectTypeUserDefinedFunction}}},
							CreatedBy:     common.String("EXAMPLE-createdBy-Value"),
							CreatedByName: common.String("EXAMPLE-createdByName-Value"),
							Labels:        []string{"EXAMPLE--Value"}},
						ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
							Parent: common.String("EXAMPLE-parent-Value")},
						PrimarySchema: &dataintegration.Schema{ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
							Parent: common.String("EXAMPLE-parent-Value")},
							Description:     common.String("EXAMPLE-description-Value"),
							IsHasContainers: common.Bool(false),
							Metadata: &dataintegration.ObjectMetadata{TimeCreated: &common.SDKTime{Time: time.Now()},
								TimeUpdated:     &common.SDKTime{Time: time.Now()},
								UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
								UpdatedByName:   common.String("EXAMPLE-updatedByName-Value"),
								AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
								CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
								CreatedByName:   common.String("EXAMPLE-createdByName-Value"),
								IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
								InfoFields:      map[string]string{"EXAMPLE_KEY_Bec6i": "EXAMPLE_VALUE_5JglobC1D4OW5dulyNL7"},
								Labels:          []string{"EXAMPLE--Value"},
								RegistryVersion: common.Int(545),
								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")},
								CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(455),
									ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataFlow}}},
								IsFavorite: common.Bool(true)},
							ModelVersion:      common.String("EXAMPLE-modelVersion-Value"),
							Name:              common.String("EXAMPLE-name-Value"),
							ResourceName:      common.String("EXAMPLE-resourceName-Value"),
							DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
							ExternalKey:       common.String("EXAMPLE-externalKey-Value"),
							Identifier:        common.String("EXAMPLE-identifier-Value"),
							Key:               common.String("EXAMPLE-key-Value"),
							ObjectStatus:      common.Int(976),
							ObjectVersion:     common.Int(386)},
						TnsAlias:  common.String("EXAMPLE-tnsAlias-Value"),
						Username:  common.String("EXAMPLE-username-Value"),
						IsDefault: common.Bool(false),
						Name:      common.String("EXAMPLE-name-Value"),
						PasswordSecret: &dataintegration.SensitiveAttribute{Value: common.String("EXAMPLE-value-Value"),
							SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")}},
						TnsNames: []string{"EXAMPLE--Value"},
						ConnectionProperties: []dataintegration.ConnectionProperty{dataintegration.ConnectionProperty{Name: common.String("EXAMPLE-name-Value"),
							Value: common.String("EXAMPLE-value-Value")}},
						Description:   common.String("EXAMPLE-description-Value"),
						ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
						ObjectVersion: common.Int(913),
						Identifier:    common.String("EXAMPLE-identifier-Value"),
						ObjectStatus:  common.Int(80),
						Password:      common.String("EXAMPLE-password-Value")},
					ExternalKey: common.String("EXAMPLE-externalKey-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(669),
							ObjectType: dataintegration.CountStatisticSummaryObjectTypeApplication}}},
						CreatedBy:       common.String("EXAMPLE-createdBy-Value"),
						IsFavorite:      common.Bool(false),
						RegistryVersion: common.Int(124),
						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_QNbuW": "EXAMPLE_VALUE_u2R6P0UOh7u4362WJZ56"},
						Labels:          []string{"EXAMPLE--Value"}},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					StagingConnection: dataintegration.ConnectionFromBicc{Description: common.String("EXAMPLE-description-Value"),
						Identifier: common.String("EXAMPLE-identifier-Value"),
						Key:        common.String("EXAMPLE-key-Value"),
						Metadata: &dataintegration.ObjectMetadata{InfoFields: map[string]string{"EXAMPLE_KEY_ezP6v": "EXAMPLE_VALUE_T6uSgwha5toDFkr9neFA"},
							IsFavorite:      common.Bool(true),
							RegistryVersion: common.Int(398),
							TimeCreated:     &common.SDKTime{Time: time.Now()},
							AggregatorKey:   common.String("EXAMPLE-aggregatorKey-Value"),
							IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
							Labels:          []string{"EXAMPLE--Value"},
							TimeUpdated:     &common.SDKTime{Time: time.Now()},
							UpdatedBy:       common.String("EXAMPLE-updatedBy-Value"),
							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")},
							CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(623),
								ObjectType: dataintegration.CountStatisticSummaryObjectTypeConnection}}},
							CreatedBy:     common.String("EXAMPLE-createdBy-Value"),
							CreatedByName: common.String("EXAMPLE-createdByName-Value")},
						Name: common.String("EXAMPLE-name-Value"),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						PasswordSecret: &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")}},
						ModelVersion:  common.String("EXAMPLE-modelVersion-Value"),
						ObjectStatus:  common.Int(362),
						ObjectVersion: common.Int(393),
						PrimarySchema: &dataintegration.Schema{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(411),
							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"),
							DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
							Description:       common.String("EXAMPLE-description-Value"),
							ExternalKey:       common.String("EXAMPLE-externalKey-Value"),
							Identifier:        common.String("EXAMPLE-identifier-Value"),
							Key:               common.String("EXAMPLE-key-Value"),
							ObjectVersion:     common.Int(812),
							IsHasContainers:   common.Bool(false),
							Metadata: &dataintegration.ObjectMetadata{TimeCreated: &common.SDKTime{Time: time.Now()},
								TimeUpdated: &common.SDKTime{Time: time.Now()},
								Aggregator: &dataintegration.AggregatorSummary{Identifier: common.String("EXAMPLE-identifier-Value"),
									Key:         common.String("EXAMPLE-key-Value"),
									Name:        common.String("EXAMPLE-name-Value"),
									Type:        common.String("EXAMPLE-type-Value"),
									Description: common.String("EXAMPLE-description-Value")},
								CreatedBy:      common.String("EXAMPLE-createdBy-Value"),
								CreatedByName:  common.String("EXAMPLE-createdByName-Value"),
								IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
								UpdatedBy:      common.String("EXAMPLE-updatedBy-Value"),
								UpdatedByName:  common.String("EXAMPLE-updatedByName-Value"),
								AggregatorKey:  common.String("EXAMPLE-aggregatorKey-Value"),
								CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(161),
									ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataAsset}}},
								InfoFields:      map[string]string{"EXAMPLE_KEY_yZ478": "EXAMPLE_VALUE_VZCJgsB4HWKsD983406l"},
								IsFavorite:      common.Bool(false),
								Labels:          []string{"EXAMPLE--Value"},
								RegistryVersion: common.Int(287)}},
						Username:  common.String("EXAMPLE-username-Value"),
						IsDefault: common.Bool(false),
						KeyMap:    map[string]string{"EXAMPLE_KEY_Xw7DH": "EXAMPLE_VALUE_RwIGQmcy7cD5K6XNRo3W"},
						DefaultExternalStorage: &dataintegration.ExternalStorage{Namespace: common.String("EXAMPLE-namespace-Value"),
							StorageId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-storageId-Value"),
							StorageName: common.String("EXAMPLE-storageName-Value"),
							TenancyId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-tenancyId-Value"),
							Bucket:      common.String("EXAMPLE-bucket-Value"),
							Host:        common.String("EXAMPLE-host-Value")}},
					Description: common.String("EXAMPLE-description-Value"),
					Key:         common.String("EXAMPLE-key-Value")},
				Schema: &dataintegration.Schema{ResourceName: common.String("EXAMPLE-resourceName-Value"),
					DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
					ExternalKey:       common.String("EXAMPLE-externalKey-Value"),
					IsHasContainers:   common.Bool(false),
					ModelType:         common.String("EXAMPLE-modelType-Value"),
					ModelVersion:      common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus:      common.Int(482),
					Description:       common.String("EXAMPLE-description-Value"),
					Identifier:        common.String("EXAMPLE-identifier-Value"),
					Key:               common.String("EXAMPLE-key-Value"),
					Metadata: &dataintegration.ObjectMetadata{UpdatedByName: common.String("EXAMPLE-updatedByName-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")},
						AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
						CreatedBy:     common.String("EXAMPLE-createdBy-Value"),
						CreatedByName: common.String("EXAMPLE-createdByName-Value"),
						InfoFields:    map[string]string{"EXAMPLE_KEY_CUwTU": "EXAMPLE_VALUE_3aG8m3ySGp8b0GQ31VPN"},
						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.CountStatisticSummaryObjectTypeUserDefinedFunction,
							ObjectCount: common.Int64(246)}}},
						IdentifierPath:  common.String("EXAMPLE-identifierPath-Value"),
						IsFavorite:      common.Bool(true),
						RegistryVersion: common.Int(770),
						TimeUpdated:     &common.SDKTime{Time: time.Now()}},
					Name:          common.String("EXAMPLE-name-Value"),
					ObjectVersion: common.Int(654),
					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")},
		WorkspaceId:             common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		ExternalPublicationsKey: common.String("EXAMPLE-externalPublicationsKey-Value"),
		IfMatch:                 common.String("EXAMPLE-ifMatch-Value")}

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

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