// 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"

	"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 ExampleCreateEntityShape() {
	// 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 objectValue interface{}
	objectValue = "EXAMPLE-objectValue-Value"
	var refValue interface{}
	refValue = "EXAMPLE-refValue-Value"
	var rootObjectValue interface{}
	rootObjectValue = "EXAMPLE-rootObjectValue-Value"
	var type_ interface{}
	type_ = "EXAMPLE-type-Value"
	req := dataintegration.CreateEntityShapeRequest{ConnectionKey: common.String("EXAMPLE-connectionKey-Value"),
		CreateEntityShapeDetails: dataintegration.CreateEntityShapeFromFile{Name: common.String("EXAMPLE-name-Value"),
			OtherTypeLabel: common.String("EXAMPLE-otherTypeLabel-Value"),
			Shape: &dataintegration.Shape{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")},
				Description:  common.String("EXAMPLE-description-Value"),
				Key:          common.String("EXAMPLE-key-Value"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Type: dataintegration.ArrayType{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"),
					ElementType:  common.String("EXAMPLE-elementType-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(205)},
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_6C8r1": dataintegration.ConfigParameterValue{IntValue: common.Int(481),
					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")}},
				ObjectStatus: common.Int(907)},
			ShapeId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value"),
			ForeignKeys: []dataintegration.ForeignKey{dataintegration.ForeignKey{ObjectStatus: common.Int(209),
				UpdateRule:   common.Int(489),
				DeleteRule:   common.Int(337),
				ModelVersion: common.String("EXAMPLE-modelVersion-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")},
				ReferenceUniqueKey: dataintegration.PrimaryKey{Name: common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(554),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					AttributeRefs: []dataintegration.KeyAttribute{dataintegration.KeyAttribute{Attribute: &dataintegration.ShapeField{Labels: []string{"EXAMPLE--Value"},
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						NativeShapeField: &dataintegration.NativeShapeField{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_oicTV": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(691),
							ObjectValue:     &objectValue}},
							ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
								RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
							DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
							IsMandatory:        common.Bool(false),
							Name:               common.String("EXAMPLE-name-Value"),
							Position:           common.Int(721),
							Type:               &type_},
						ObjectStatus: common.Int(415),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						Type: &type_,
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_J7EpI": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
							StringValue:    common.String("EXAMPLE-stringValue-Value"),
							IntValue:       common.Int(532),
							ObjectValue:    &objectValue,
							ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
							RefValue:       &refValue}},
							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"),
						Key:         common.String("EXAMPLE-key-Value"),
						Name:        common.String("EXAMPLE-name-Value")},
						Position: common.Int(418),
						ShapeField: &dataintegration.ShapeField{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_nvdQn": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
								RefValue:        &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(760),
								ObjectValue:     &objectValue}},
								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"),
							Key:          common.String("EXAMPLE-key-Value"),
							Labels:       []string{"EXAMPLE--Value"},
							ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
							NativeShapeField: &dataintegration.NativeShapeField{DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
								IsMandatory: common.Bool(true),
								Name:        common.String("EXAMPLE-name-Value"),
								Position:    common.Int(540),
								Type:        &type_,
								ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_jp6Jc": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
									RefValue:        &refValue,
									RootObjectValue: &rootObjectValue,
									StringValue:     common.String("EXAMPLE-stringValue-Value"),
									IntValue:        common.Int(64),
									ObjectValue:     &objectValue}},
									ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
										RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}},
							Name:         common.String("EXAMPLE-name-Value"),
							ObjectStatus: common.Int(569),
							Type:         &type_}}},
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
				AttributeRefs: []dataintegration.KeyAttribute{dataintegration.KeyAttribute{Attribute: &dataintegration.ShapeField{NativeShapeField: &dataintegration.NativeShapeField{IsMandatory: common.Bool(false),
					Name:     common.String("EXAMPLE-name-Value"),
					Position: common.Int(228),
					Type:     &type_,
					ConfigValues: &dataintegration.ConfigValues{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_5MVcX": dataintegration.ConfigParameterValue{IntValue: common.Int(301),
							ObjectValue:     &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value")}}},
					DefaultValueString: common.String("EXAMPLE-defaultValueString-Value")},
					ObjectStatus: common.Int(111),
					ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
						Parent: common.String("EXAMPLE-parent-Value")},
					Labels:       []string{"EXAMPLE--Value"},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					Type:         &type_,
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_zbXHv": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
						RefValue:        &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(941),
						ObjectValue:     &objectValue}},
						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"),
					Key:         common.String("EXAMPLE-key-Value")},
					Position: common.Int(5),
					ShapeField: &dataintegration.ShapeField{Description: common.String("EXAMPLE-description-Value"),
						Key: common.String("EXAMPLE-key-Value"),
						NativeShapeField: &dataintegration.NativeShapeField{IsMandatory: common.Bool(false),
							Name:     common.String("EXAMPLE-name-Value"),
							Position: common.Int(667),
							Type:     &type_,
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_VqHqo": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
								StringValue:    common.String("EXAMPLE-stringValue-Value"),
								IntValue:       common.Int(916),
								ObjectValue:    &objectValue,
								ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
								RefValue:       &refValue}},
								ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
									RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
							DefaultValueString: common.String("EXAMPLE-defaultValueString-Value")},
						ObjectStatus: common.Int(314),
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
						ConfigValues: &dataintegration.ConfigValues{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
							ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_C7Z5k": dataintegration.ConfigParameterValue{RefValue: &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(149),
								ObjectValue:     &objectValue,
								ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}}},
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						Type:         &type_,
						Labels:       []string{"EXAMPLE--Value"}}}},
				Key: common.String("EXAMPLE-key-Value")}},
			ExternalKey:  common.String("EXAMPLE-externalKey-Value"),
			ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
			ResourceName: common.String("EXAMPLE-resourceName-Value"),
			Types: &dataintegration.TypeLibrary{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus:  common.Int(554),
				ObjectVersion: common.Int(862),
				Description:   common.String("EXAMPLE-description-Value"),
				Identifier:    common.String("EXAMPLE-identifier-Value"),
				Key:           common.String("EXAMPLE-key-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")},
				Types: map[string]dataintegration.DerivedType{"EXAMPLE_KEY_hJsog": dataintegration.DerivedType{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(256),
					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"),
					Key:         common.String("EXAMPLE-key-Value")}}},
			EntityType:    dataintegration.CreateEntityShapeFromFileEntityTypeOther,
			Key:           common.String("EXAMPLE-key-Value"),
			ObjectVersion: common.Int(446),
			Description:   common.String("EXAMPLE-description-Value"),
			Identifier:    common.String("EXAMPLE-identifier-Value"),
			ObjectStatus:  common.Int(738),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			UniqueKeys: []dataintegration.UniqueKey{dataintegration.UniqueDataKey{AttributeRefs: []dataintegration.KeyAttribute{dataintegration.KeyAttribute{Position: common.Int(883),
				ShapeField: &dataintegration.ShapeField{Key: common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					NativeShapeField: &dataintegration.NativeShapeField{IsMandatory: common.Bool(true),
						Name:     common.String("EXAMPLE-name-Value"),
						Position: common.Int(125),
						Type:     &type_,
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_5SpL3": dataintegration.ConfigParameterValue{IntValue: common.Int(830),
							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")}},
						DefaultValueString: common.String("EXAMPLE-defaultValueString-Value")},
					Type:         &type_,
					Description:  common.String("EXAMPLE-description-Value"),
					Labels:       []string{"EXAMPLE--Value"},
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(497),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_yqSz6": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
						StringValue:    common.String("EXAMPLE-stringValue-Value"),
						IntValue:       common.Int(683),
						ObjectValue:    &objectValue,
						ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
						RefValue:       &refValue}},
						ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
							RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}},
				Attribute: &dataintegration.ShapeField{Description: common.String("EXAMPLE-description-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					ObjectStatus: common.Int(128),
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_uqOLV": dataintegration.ConfigParameterValue{RefValue: &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(62),
						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")}},
					Name: common.String("EXAMPLE-name-Value"),
					NativeShapeField: &dataintegration.NativeShapeField{Position: common.Int(563),
						Type: &type_,
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_fK3aQ": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(974),
							ObjectValue:     &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
							RefValue:        &refValue,
							RootObjectValue: &rootObjectValue}},
							ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
								RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
						DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
						IsMandatory:        common.Bool(false),
						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")},
					Type:   &type_,
					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(690),
				ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
					Parent: common.String("EXAMPLE-parent-Value")}}},
			DataFormat: &dataintegration.DataFormat{Type: dataintegration.DataFormatTypeJson,
				CompressionConfig: &dataintegration.Compression{Codec: dataintegration.CompressionCodecGzip},
				FormatAttribute: dataintegration.AvroFormatAttribute{Compression: common.String("EXAMPLE-compression-Value"),
					IsFilePattern: common.Bool(true)}}},
		IfMatch:            common.String("EXAMPLE-ifMatch-Value"),
		OpcRequestId:       common.String("KBQLMQ42V0OF3T4JI9OW<unique_ID>"),
		OpcRetryToken:      common.String("EXAMPLE-opcRetryToken-Value"),
		SchemaResourceName: common.String("EXAMPLE-schemaResourceName-Value"),
		WorkspaceId:        common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")}

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

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