// 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 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 type_ interface{}
	type_ = "EXAMPLE-type-Value"
	req := dataintegration.CreateEntityShapeRequest{OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		SchemaResourceName: common.String("EXAMPLE-schemaResourceName-Value"),
		WorkspaceId:        common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
		ConnectionKey:      common.String("EXAMPLE-connectionKey-Value"),
		CreateEntityShapeDetails: dataintegration.CreateEntityShapeFromFile{Identifier: common.String("EXAMPLE-identifier-Value"),
			OtherTypeLabel: common.String("EXAMPLE-otherTypeLabel-Value"),
			Shape: &dataintegration.Shape{Key: common.String("EXAMPLE-key-Value"),
				Name:         common.String("EXAMPLE-name-Value"),
				ObjectStatus: common.Int(265),
				Type: dataintegration.JavaType{Description: common.String("EXAMPLE-description-Value"),
					JavaTypeName: common.String("EXAMPLE-javaTypeName-Value"),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					ConfigDefinition: &dataintegration.ConfigDefinition{IsContained: common.Bool(false),
						Key:          common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						ObjectStatus: common.Int(675),
						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_YT397": dataintegration.ConfigParameterDefinition{ParameterName: common.String("EXAMPLE-parameterName-Value"),
							ClassFieldName:    common.String("EXAMPLE-classFieldName-Value"),
							DefaultValue:      &defaultValue,
							Description:       common.String("EXAMPLE-description-Value"),
							IsClassFieldValue: common.Bool(true),
							IsStatic:          common.Bool(false)}}},
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(89)},
				ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_ItUf7": dataintegration.ConfigParameterValue{IntValue: common.Int(783),
					ObjectValue:     &objectValue,
					ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
					RefValue:        &refValue,
					RootObjectValue: &rootObjectValue,
					StringValue:     common.String("EXAMPLE-stringValue-Value")}},
					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"),
				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")}},
			ShapeId:     common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value"),
			Description: common.String("EXAMPLE-description-Value"),
			ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
				RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
			Types: &dataintegration.TypeLibrary{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Name:          common.String("EXAMPLE-name-Value"),
				ObjectStatus:  common.Int(72),
				ObjectVersion: common.Int(773),
				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"),
				Types: map[string]dataintegration.DerivedType{"EXAMPLE_KEY_ERc1m": dataintegration.DerivedType{Description: common.String("EXAMPLE-description-Value"),
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(339),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}}},
			ExternalKey:   common.String("EXAMPLE-externalKey-Value"),
			ObjectVersion: common.Int(81),
			ResourceName:  common.String("EXAMPLE-resourceName-Value"),
			ObjectStatus:  common.Int(808),
			EntityType:    dataintegration.CreateEntityShapeFromFileEntityTypeView,
			ForeignKeys: []dataintegration.ForeignKey{dataintegration.ForeignKey{DeleteRule: common.Int(6),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				ObjectStatus: common.Int(656),
				ReferenceUniqueKey: dataintegration.UniqueDataKey{AttributeRefs: []dataintegration.KeyAttribute{dataintegration.KeyAttribute{Attribute: &dataintegration.ShapeField{Description: common.String("EXAMPLE-description-Value"),
					Labels:       []string{"EXAMPLE--Value"},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					NativeShapeField: &dataintegration.NativeShapeField{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_fc06y": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(70),
						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"),
						Position:           common.Int(263),
						Type:               &type_},
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_AcdLh": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
						RefValue:        &refValue,
						RootObjectValue: &rootObjectValue,
						StringValue:     common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(339),
						ObjectValue:     &objectValue}},
						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"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(509),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					Type: &type_},
					Position: common.Int(230),
					ShapeField: &dataintegration.ShapeField{Labels: []string{"EXAMPLE--Value"},
						ObjectStatus: common.Int(702),
						Description:  common.String("EXAMPLE-description-Value"),
						Key:          common.String("EXAMPLE-key-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						Name:         common.String("EXAMPLE-name-Value"),
						NativeShapeField: &dataintegration.NativeShapeField{Type: &type_,
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_bfiFj": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
								RefValue:        &refValue,
								RootObjectValue: &rootObjectValue,
								StringValue:     common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(730),
								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(500)},
						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_dmom3": dataintegration.ConfigParameterValue{RefValue: &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(275),
							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")}}}}},
					Key:          common.String("EXAMPLE-key-Value"),
					ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name:         common.String("EXAMPLE-name-Value"),
					ObjectStatus: common.Int(888),
					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{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
					Name: common.String("EXAMPLE-name-Value"),
					NativeShapeField: &dataintegration.NativeShapeField{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_hfPn5": dataintegration.ConfigParameterValue{RefValue: &refValue,
							RootObjectValue: &rootObjectValue,
							StringValue:     common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(334),
							ObjectValue:     &objectValue,
							ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}}},
						DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
						IsMandatory:        common.Bool(true),
						Name:               common.String("EXAMPLE-name-Value"),
						Position:           common.Int(954),
						Type:               &type_},
					ObjectStatus: common.Int(85),
					ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
						RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
					Type:   &type_,
					Key:    common.String("EXAMPLE-key-Value"),
					Labels: []string{"EXAMPLE--Value"},
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_WGGoy": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
						IntValue:        common.Int(266),
						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")}},
					Description: common.String("EXAMPLE-description-Value")},
					Position: common.Int(914),
					ShapeField: &dataintegration.ShapeField{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
						ObjectStatus: common.Int(339),
						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_uRBhL": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
							StringValue:    common.String("EXAMPLE-stringValue-Value"),
							IntValue:       common.Int(618),
							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")}},
						Key:    common.String("EXAMPLE-key-Value"),
						Labels: []string{"EXAMPLE--Value"},
						NativeShapeField: &dataintegration.NativeShapeField{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_3caMH": dataintegration.ConfigParameterValue{RefValue: &refValue,
									RootObjectValue: &rootObjectValue,
									StringValue:     common.String("EXAMPLE-stringValue-Value"),
									IntValue:        common.Int(835),
									ObjectValue:     &objectValue,
									ParameterValue:  common.String("EXAMPLE-parameterValue-Value")}}},
							DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
							IsMandatory:        common.Bool(false),
							Name:               common.String("EXAMPLE-name-Value"),
							Position:           common.Int(748)},
						Type:        &type_,
						Description: common.String("EXAMPLE-description-Value"),
						Name:        common.String("EXAMPLE-name-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")},
				UpdateRule: common.Int(725)}},
			Key:          common.String("EXAMPLE-key-Value"),
			ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
			Name:         common.String("EXAMPLE-name-Value"),
			UniqueKeys: []dataintegration.UniqueKey{dataintegration.PrimaryKey{ObjectStatus: common.Int(81),
				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{Key: common.String("EXAMPLE-key-Value"),
					Name: common.String("EXAMPLE-name-Value"),
					ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_CI8aG": dataintegration.ConfigParameterValue{IntValue: common.Int(917),
						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")}},
					Description: common.String("EXAMPLE-description-Value"),
					NativeShapeField: &dataintegration.NativeShapeField{Type: &type_,
						ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_BVtMP": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
							IntValue:        common.Int(241),
							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"),
						Position:           common.Int(764)},
					ObjectStatus: common.Int(354),
					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"},
					ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
					Position: common.Int(998),
					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_VtK1X": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
							StringValue:    common.String("EXAMPLE-stringValue-Value"),
							IntValue:       common.Int(521),
							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")}},
						Key:    common.String("EXAMPLE-key-Value"),
						Labels: []string{"EXAMPLE--Value"},
						Name:   common.String("EXAMPLE-name-Value"),
						NativeShapeField: &dataintegration.NativeShapeField{Name: common.String("EXAMPLE-name-Value"),
							Position: common.Int(980),
							Type:     &type_,
							ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_w36Fb": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
								IntValue:        common.Int(253),
								ObjectValue:     &objectValue,
								ParameterValue:  common.String("EXAMPLE-parameterValue-Value"),
								RefValue:        &refValue,
								RootObjectValue: &rootObjectValue}},
								ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
									Parent: common.String("EXAMPLE-parent-Value")}},
							DefaultValueString: common.String("EXAMPLE-defaultValueString-Value"),
							IsMandatory:        common.Bool(true)},
						ObjectStatus: common.Int(17),
						Type:         &type_,
						Description:  common.String("EXAMPLE-description-Value"),
						ModelVersion: common.String("EXAMPLE-modelVersion-Value")}}},
				Key:          common.String("EXAMPLE-key-Value"),
				ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
				Name:         common.String("EXAMPLE-name-Value")}},
			DataFormat: &dataintegration.DataFormat{CompressionConfig: &dataintegration.Compression{Codec: dataintegration.CompressionCodecSnappy},
				FormatAttribute: dataintegration.ParquetFormatAttribute{Compression: common.String("EXAMPLE-compression-Value"),
					IsFilePattern: common.Bool(false)},
				Type: dataintegration.DataFormatTypeAvro}},
		IfMatch:      common.String("EXAMPLE-ifMatch-Value"),
		OpcRequestId: common.String("RZOYLL8EQ6XH6XRHBRHY<unique_ID>")}

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