//go:build !no_runtime_type_checking package awscognito 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_CfnUserPool) validateAddDeletionOverrideParameters(path *string) error { if path == nil { return fmt.Errorf("parameter path is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) validateAddDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) validateAddDependsOnParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) 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_CfnUserPool) 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_CfnUserPool) validateAddPropertyDeletionOverrideParameters(propertyPath *string) error { if propertyPath == nil { return fmt.Errorf("parameter propertyPath is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) 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_CfnUserPool) validateApplyRemovalPolicyParameters(options *awscdk.RemovalPolicyOptions) error { if err := _jsii_.ValidateStruct(options, func() string { return "parameter options" }); err != nil { return err } return nil } func (c *jsiiProxy_CfnUserPool) validateGetAttParameters(attributeName *string) error { if attributeName == nil { return fmt.Errorf("parameter attributeName is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) validateGetMetadataParameters(key *string) error { if key == nil { return fmt.Errorf("parameter key is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) validateInspectParameters(inspector awscdk.TreeInspector) error { if inspector == nil { return fmt.Errorf("parameter inspector is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) validateOverrideLogicalIdParameters(newLogicalId *string) error { if newLogicalId == nil { return fmt.Errorf("parameter newLogicalId is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) validateRemoveDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnUserPool) 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_CfnUserPool) 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_CfnUserPool) validateValidatePropertiesParameters(_properties interface{}) error { if _properties == nil { return fmt.Errorf("parameter _properties is required, but nil was provided") } return nil } func validateCfnUserPool_IsCfnElementParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func validateCfnUserPool_IsCfnResourceParameters(construct constructs.IConstruct) error { if construct == nil { return fmt.Errorf("parameter construct is required, but nil was provided") } return nil } func validateCfnUserPool_IsConstructParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnUserPool) validateSetAccountRecoverySettingParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_AccountRecoverySettingProperty: val := val.(*CfnUserPool_AccountRecoverySettingProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_AccountRecoverySettingProperty: val_ := val.(CfnUserPool_AccountRecoverySettingProperty) 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, *CfnUserPool_AccountRecoverySettingProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetAdminCreateUserConfigParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_AdminCreateUserConfigProperty: val := val.(*CfnUserPool_AdminCreateUserConfigProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_AdminCreateUserConfigProperty: val_ := val.(CfnUserPool_AdminCreateUserConfigProperty) 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, *CfnUserPool_AdminCreateUserConfigProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetDeviceConfigurationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_DeviceConfigurationProperty: val := val.(*CfnUserPool_DeviceConfigurationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_DeviceConfigurationProperty: val_ := val.(CfnUserPool_DeviceConfigurationProperty) 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, *CfnUserPool_DeviceConfigurationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetEmailConfigurationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_EmailConfigurationProperty: val := val.(*CfnUserPool_EmailConfigurationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_EmailConfigurationProperty: val_ := val.(CfnUserPool_EmailConfigurationProperty) 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, *CfnUserPool_EmailConfigurationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetLambdaConfigParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_LambdaConfigProperty: val := val.(*CfnUserPool_LambdaConfigProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_LambdaConfigProperty: val_ := val.(CfnUserPool_LambdaConfigProperty) 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, *CfnUserPool_LambdaConfigProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetPoliciesParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_PoliciesProperty: val := val.(*CfnUserPool_PoliciesProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_PoliciesProperty: val_ := val.(CfnUserPool_PoliciesProperty) 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, *CfnUserPool_PoliciesProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetSchemaParameters(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 *CfnUserPool_SchemaAttributeProperty: v := v.(*CfnUserPool_SchemaAttributeProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnUserPool_SchemaAttributeProperty: v_ := v.(CfnUserPool_SchemaAttributeProperty) 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, *CfnUserPool_SchemaAttributeProperty; 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 *CfnUserPool_SchemaAttributeProperty: v := v.(*CfnUserPool_SchemaAttributeProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnUserPool_SchemaAttributeProperty: v_ := v.(CfnUserPool_SchemaAttributeProperty) 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, *CfnUserPool_SchemaAttributeProperty; 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_CfnUserPool) validateSetSmsConfigurationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_SmsConfigurationProperty: val := val.(*CfnUserPool_SmsConfigurationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_SmsConfigurationProperty: val_ := val.(CfnUserPool_SmsConfigurationProperty) 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, *CfnUserPool_SmsConfigurationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetUserAttributeUpdateSettingsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_UserAttributeUpdateSettingsProperty: val := val.(*CfnUserPool_UserAttributeUpdateSettingsProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_UserAttributeUpdateSettingsProperty: val_ := val.(CfnUserPool_UserAttributeUpdateSettingsProperty) 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, *CfnUserPool_UserAttributeUpdateSettingsProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetUsernameConfigurationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_UsernameConfigurationProperty: val := val.(*CfnUserPool_UsernameConfigurationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_UsernameConfigurationProperty: val_ := val.(CfnUserPool_UsernameConfigurationProperty) 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, *CfnUserPool_UsernameConfigurationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetUserPoolAddOnsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_UserPoolAddOnsProperty: val := val.(*CfnUserPool_UserPoolAddOnsProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_UserPoolAddOnsProperty: val_ := val.(CfnUserPool_UserPoolAddOnsProperty) 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, *CfnUserPool_UserPoolAddOnsProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnUserPool) validateSetVerificationMessageTemplateParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnUserPool_VerificationMessageTemplateProperty: val := val.(*CfnUserPool_VerificationMessageTemplateProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnUserPool_VerificationMessageTemplateProperty: val_ := val.(CfnUserPool_VerificationMessageTemplateProperty) 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, *CfnUserPool_VerificationMessageTemplateProperty; received %#v (a %T)", val, val) } } return nil } func validateNewCfnUserPoolParameters(scope constructs.Construct, id *string, props *CfnUserPoolProps) 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 err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { return err } return nil }