func (k KeySchemaElement) IsEmpty() bool {
	switch {
	case k.AttributeName != "",
		k.KeyType != "":
		return false
	}
	return true
}
IsEmpty checks if the data is empty or not.
package dynamodb
import (
	"strconv"
	"time"
	SDK "github.com/aws/aws-sdk-go/service/dynamodb"
	"github.com/evalphobia/aws-sdk-go-wrapper/private/pointers"
)
type BillingModeSummary struct {
	BillingMode               string
	LastUpdateToPayPerRequest time.Time
}
func NewBillingModeSummary(out *SDK.BillingModeSummary) BillingModeSummary {
	v := BillingModeSummary{}
	if out == nil {
		return v
	}
	if out.BillingMode != nil {
		v.BillingMode = *out.BillingMode
	}
	if out.LastUpdateToPayPerRequestDateTime != nil {
		v.LastUpdateToPayPerRequest = *out.LastUpdateToPayPerRequestDateTime
	}
	return v
}
func (s BillingModeSummary) IsEmpty() bool {
	switch {
	case s.BillingMode != "",
		!s.LastUpdateToPayPerRequest.IsZero():
		return false
	}
	return true
}
type GSIDescription struct {
	Backfilling           bool
	IndexARN              string
	IndexName             string
	IndexSizeBytes        int64
	IndexStatus           string
	ItemCount             int64
	KeySchema             []KeySchemaElement
	Projection            Projection
	ProvisionedThroughput ProvisionedThroughputDescription
}
func NewGSIDescription(out *SDK.GlobalSecondaryIndexDescription) GSIDescription {
	v := GSIDescription{}
	if out == nil {
		return v
	}
	if out.Backfilling != nil {
		v.Backfilling = *out.Backfilling
	}
	if out.IndexArn != nil {
		v.IndexARN = *out.IndexArn
	}
	if out.IndexName != nil {
		v.IndexName = *out.IndexName
	}
	if out.IndexSizeBytes != nil {
		v.IndexSizeBytes = *out.IndexSizeBytes
	}
	if out.IndexStatus != nil {
		v.IndexStatus = *out.IndexStatus
	}
	if out.ItemCount != nil {
		v.ItemCount = *out.ItemCount
	}
	v.KeySchema = NewKeySchemaElementList(out.KeySchema)
	v.Projection = NewProjection(out.Projection)
	v.ProvisionedThroughput = NewProvisionedThroughputDescription(out.ProvisionedThroughput)
	return v
}
func (d GSIDescription) IsEmpty() bool {
	switch {
	case d.IndexARN != "",
		d.IndexName != "",
		d.IndexStatus != "",
		d.IndexSizeBytes != 0,
		d.ItemCount != 0:
		return false
	}
	return true
}
func (d GSIDescription) ToGSI() *SDK.GlobalSecondaryIndex {
	if d.IsEmpty() {
		return nil
	}
	gsi := &SDK.GlobalSecondaryIndex{
		IndexName:             pointers.String(d.IndexName),
		ProvisionedThroughput: d.ProvisionedThroughput.ToProvisionedThroughput(),
		Projection:            d.Projection.ToSDKType(),
	}
	if len(d.KeySchema) != 0 {
		data := make([]*SDK.KeySchemaElement, 0, len(d.KeySchema))
		for _, s := range d.KeySchema {
			if !s.IsEmpty() {
				data = append(data, s.ToSDKType())
			}
		}
		gsi.KeySchema = data
	}
	return gsi
}
func NewGSIDescriptionList(list []*SDK.GlobalSecondaryIndexDescription) []GSIDescription {
	if len(list) == 0 {
		return nil
	}
	result := make([]GSIDescription, len(list))
	for i, out := range list {
		result[i] = NewGSIDescription(out)
	}
	return result
}
type KeySchemaElement struct {
	AttributeName string
	KeyType       string
}
func NewKeySchemaElement(out *SDK.KeySchemaElement) KeySchemaElement {
	v := KeySchemaElement{}
	if out == nil {
		return v
	}
	if out.AttributeName != nil {
		v.AttributeName = *out.AttributeName
	}
	if out.KeyType != nil {
		v.KeyType = *out.KeyType
	}
	return v
}