//go:build !no_runtime_type_checking package awsdynamodb import ( "fmt" _jsii_ "github.com/aws/jsii-runtime-go/runtime" "github.com/aws/aws-cdk-go/awscdk/v2" "github.com/aws/constructs-go/constructs/v10" ) func (c *jsiiProxy_CfnTable) validateAddDeletionOverrideParameters(path *string) error { if path == nil { return fmt.Errorf("parameter path is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateAddDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateAddDependsOnParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateAddMetadataParameters(key *string, value interface{}) error { if key == nil { return fmt.Errorf("parameter key is required, but nil was provided") } if value == nil { return fmt.Errorf("parameter value is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateAddOverrideParameters(path *string, value interface{}) error { if path == nil { return fmt.Errorf("parameter path is required, but nil was provided") } if value == nil { return fmt.Errorf("parameter value is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateAddPropertyDeletionOverrideParameters(propertyPath *string) error { if propertyPath == nil { return fmt.Errorf("parameter propertyPath is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateAddPropertyOverrideParameters(propertyPath *string, value interface{}) error { if propertyPath == nil { return fmt.Errorf("parameter propertyPath is required, but nil was provided") } if value == nil { return fmt.Errorf("parameter value is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateApplyRemovalPolicyParameters(options *awscdk.RemovalPolicyOptions) error { if err := _jsii_.ValidateStruct(options, func() string { return "parameter options" }); err != nil { return err } return nil } func (c *jsiiProxy_CfnTable) validateGetAttParameters(attributeName *string) error { if attributeName == nil { return fmt.Errorf("parameter attributeName is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateGetMetadataParameters(key *string) error { if key == nil { return fmt.Errorf("parameter key is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateInspectParameters(inspector awscdk.TreeInspector) error { if inspector == nil { return fmt.Errorf("parameter inspector is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateOverrideLogicalIdParameters(newLogicalId *string) error { if newLogicalId == nil { return fmt.Errorf("parameter newLogicalId is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateRemoveDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateRenderPropertiesParameters(props *map[string]interface{}) error { if props == nil { return fmt.Errorf("parameter props is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateReplaceDependencyParameters(target awscdk.CfnResource, newTarget awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } if newTarget == nil { return fmt.Errorf("parameter newTarget is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnTable) validateValidatePropertiesParameters(_properties interface{}) error { if _properties == nil { return fmt.Errorf("parameter _properties is required, but nil was provided") } return nil } func validateCfnTable_IsCfnElementParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func validateCfnTable_IsCfnResourceParameters(construct constructs.IConstruct) error { if construct == nil { return fmt.Errorf("parameter construct is required, but nil was provided") } return nil } func validateCfnTable_IsConstructParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnTable) validateSetAttributeDefinitionsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *[]interface{}: val := val.(*[]interface{}) for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_AttributeDefinitionProperty: v := v.(*CfnTable_AttributeDefinitionProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_AttributeDefinitionProperty: v_ := v.(CfnTable_AttributeDefinitionProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_AttributeDefinitionProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } case []interface{}: val_ := val.([]interface{}) val := &val_ for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_AttributeDefinitionProperty: v := v.(*CfnTable_AttributeDefinitionProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_AttributeDefinitionProperty: v_ := v.(CfnTable_AttributeDefinitionProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_AttributeDefinitionProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *[]interface{}; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetContributorInsightsSpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_ContributorInsightsSpecificationProperty: val := val.(*CfnTable_ContributorInsightsSpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_ContributorInsightsSpecificationProperty: val_ := val.(CfnTable_ContributorInsightsSpecificationProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_ContributorInsightsSpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetDeletionProtectionEnabledParameters(val interface{}) error { switch val.(type) { case *bool: // ok case bool: // ok case awscdk.IResolvable: // ok default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: *bool, awscdk.IResolvable; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetGlobalSecondaryIndexesParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *[]interface{}: val := val.(*[]interface{}) for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_GlobalSecondaryIndexProperty: v := v.(*CfnTable_GlobalSecondaryIndexProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_GlobalSecondaryIndexProperty: v_ := v.(CfnTable_GlobalSecondaryIndexProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_GlobalSecondaryIndexProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } case []interface{}: val_ := val.([]interface{}) val := &val_ for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_GlobalSecondaryIndexProperty: v := v.(*CfnTable_GlobalSecondaryIndexProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_GlobalSecondaryIndexProperty: v_ := v.(CfnTable_GlobalSecondaryIndexProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_GlobalSecondaryIndexProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *[]interface{}; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetImportSourceSpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_ImportSourceSpecificationProperty: val := val.(*CfnTable_ImportSourceSpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_ImportSourceSpecificationProperty: val_ := val.(CfnTable_ImportSourceSpecificationProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_ImportSourceSpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetKeySchemaParameters(val interface{}) error { if val == nil { return fmt.Errorf("parameter val is required, but nil was provided") } switch val.(type) { case awscdk.IResolvable: // ok case *[]interface{}: val := val.(*[]interface{}) for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_KeySchemaProperty: v := v.(*CfnTable_KeySchemaProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_KeySchemaProperty: v_ := v.(CfnTable_KeySchemaProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_KeySchemaProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } case []interface{}: val_ := val.([]interface{}) val := &val_ for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_KeySchemaProperty: v := v.(*CfnTable_KeySchemaProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_KeySchemaProperty: v_ := v.(CfnTable_KeySchemaProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_KeySchemaProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *[]interface{}; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetKinesisStreamSpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_KinesisStreamSpecificationProperty: val := val.(*CfnTable_KinesisStreamSpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_KinesisStreamSpecificationProperty: val_ := val.(CfnTable_KinesisStreamSpecificationProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_KinesisStreamSpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetLocalSecondaryIndexesParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *[]interface{}: val := val.(*[]interface{}) for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_LocalSecondaryIndexProperty: v := v.(*CfnTable_LocalSecondaryIndexProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_LocalSecondaryIndexProperty: v_ := v.(CfnTable_LocalSecondaryIndexProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_LocalSecondaryIndexProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } case []interface{}: val_ := val.([]interface{}) val := &val_ for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnTable_LocalSecondaryIndexProperty: v := v.(*CfnTable_LocalSecondaryIndexProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnTable_LocalSecondaryIndexProperty: v_ := v.(CfnTable_LocalSecondaryIndexProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(v) { return fmt.Errorf("parameter val[%#v] must be one of the allowed types: awscdk.IResolvable, *CfnTable_LocalSecondaryIndexProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *[]interface{}; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetPointInTimeRecoverySpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_PointInTimeRecoverySpecificationProperty: val := val.(*CfnTable_PointInTimeRecoverySpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_PointInTimeRecoverySpecificationProperty: val_ := val.(CfnTable_PointInTimeRecoverySpecificationProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_PointInTimeRecoverySpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetProvisionedThroughputParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_ProvisionedThroughputProperty: val := val.(*CfnTable_ProvisionedThroughputProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_ProvisionedThroughputProperty: val_ := val.(CfnTable_ProvisionedThroughputProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_ProvisionedThroughputProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetSseSpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_SSESpecificationProperty: val := val.(*CfnTable_SSESpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_SSESpecificationProperty: val_ := val.(CfnTable_SSESpecificationProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_SSESpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetStreamSpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_StreamSpecificationProperty: val := val.(*CfnTable_StreamSpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_StreamSpecificationProperty: val_ := val.(CfnTable_StreamSpecificationProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_StreamSpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnTable) validateSetTagsRawParameters(val *[]*awscdk.CfnTag) error { for idx_97dfc6, v := range *val { if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } } return nil } func (j *jsiiProxy_CfnTable) validateSetTimeToLiveSpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnTable_TimeToLiveSpecificationProperty: val := val.(*CfnTable_TimeToLiveSpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnTable_TimeToLiveSpecificationProperty: val_ := val.(CfnTable_TimeToLiveSpecificationProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: awscdk.IResolvable, *CfnTable_TimeToLiveSpecificationProperty; received %#v (a %T)", val, val) } } return nil } func validateNewCfnTableParameters(scope constructs.Construct, id *string, props *CfnTableProps) error { if scope == nil { return fmt.Errorf("parameter scope is required, but nil was provided") } if id == nil { return fmt.Errorf("parameter id is required, but nil was provided") } if props == nil { return fmt.Errorf("parameter props is required, but nil was provided") } if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { return err } return nil }