//go:build !no_runtime_type_checking package awssam 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_CfnFunction) validateAddDeletionOverrideParameters(path *string) error { if path == nil { return fmt.Errorf("parameter path is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) validateAddDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) validateAddDependsOnParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) 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_CfnFunction) 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_CfnFunction) validateAddPropertyDeletionOverrideParameters(propertyPath *string) error { if propertyPath == nil { return fmt.Errorf("parameter propertyPath is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) 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_CfnFunction) validateApplyRemovalPolicyParameters(options *awscdk.RemovalPolicyOptions) error { if err := _jsii_.ValidateStruct(options, func() string { return "parameter options" }); err != nil { return err } return nil } func (c *jsiiProxy_CfnFunction) validateGetAttParameters(attributeName *string) error { if attributeName == nil { return fmt.Errorf("parameter attributeName is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) validateGetMetadataParameters(key *string) error { if key == nil { return fmt.Errorf("parameter key is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) validateInspectParameters(inspector awscdk.TreeInspector) error { if inspector == nil { return fmt.Errorf("parameter inspector is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) validateOverrideLogicalIdParameters(newLogicalId *string) error { if newLogicalId == nil { return fmt.Errorf("parameter newLogicalId is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) validateRemoveDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnFunction) 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_CfnFunction) 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_CfnFunction) validateValidatePropertiesParameters(_properties interface{}) error { if _properties == nil { return fmt.Errorf("parameter _properties is required, but nil was provided") } return nil } func validateCfnFunction_IsCfnElementParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func validateCfnFunction_IsCfnResourceParameters(construct constructs.IConstruct) error { if construct == nil { return fmt.Errorf("parameter construct is required, but nil was provided") } return nil } func validateCfnFunction_IsConstructParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnFunction) validateSetCodeUriParameters(val interface{}) error { switch val.(type) { case *string: // ok case string: // ok case awscdk.IResolvable: // ok case *CfnFunction_S3LocationProperty: val := val.(*CfnFunction_S3LocationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_S3LocationProperty: val_ := val.(CfnFunction_S3LocationProperty) 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: *string, awscdk.IResolvable, *CfnFunction_S3LocationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetDeadLetterQueueParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnFunction_DeadLetterQueueProperty: val := val.(*CfnFunction_DeadLetterQueueProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_DeadLetterQueueProperty: val_ := val.(CfnFunction_DeadLetterQueueProperty) 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, *CfnFunction_DeadLetterQueueProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetDeploymentPreferenceParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnFunction_DeploymentPreferenceProperty: val := val.(*CfnFunction_DeploymentPreferenceProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_DeploymentPreferenceProperty: val_ := val.(CfnFunction_DeploymentPreferenceProperty) 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, *CfnFunction_DeploymentPreferenceProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetEnvironmentParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnFunction_FunctionEnvironmentProperty: val := val.(*CfnFunction_FunctionEnvironmentProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_FunctionEnvironmentProperty: val_ := val.(CfnFunction_FunctionEnvironmentProperty) 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, *CfnFunction_FunctionEnvironmentProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetEventInvokeConfigParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnFunction_EventInvokeConfigProperty: val := val.(*CfnFunction_EventInvokeConfigProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_EventInvokeConfigProperty: val_ := val.(CfnFunction_EventInvokeConfigProperty) 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, *CfnFunction_EventInvokeConfigProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetEventsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *map[string]interface{}: val := val.(*map[string]interface{}) for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnFunction_EventSourceProperty: v := v.(*CfnFunction_EventSourceProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_EventSourceProperty: v_ := v.(CfnFunction_EventSourceProperty) 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, *CfnFunction_EventSourceProperty; received %#v (a %T)", idx_97dfc6, v, v) } } } case map[string]interface{}: val_ := val.(map[string]interface{}) val := &val_ for idx_97dfc6, v := range *val { switch v.(type) { case awscdk.IResolvable: // ok case *CfnFunction_EventSourceProperty: v := v.(*CfnFunction_EventSourceProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_EventSourceProperty: v_ := v.(CfnFunction_EventSourceProperty) 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, *CfnFunction_EventSourceProperty; 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, *map[string]interface{}; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetFileSystemConfigsParameters(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 *CfnFunction_FileSystemConfigProperty: v := v.(*CfnFunction_FileSystemConfigProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_FileSystemConfigProperty: v_ := v.(CfnFunction_FileSystemConfigProperty) 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, *CfnFunction_FileSystemConfigProperty; 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 *CfnFunction_FileSystemConfigProperty: v := v.(*CfnFunction_FileSystemConfigProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_FileSystemConfigProperty: v_ := v.(CfnFunction_FileSystemConfigProperty) 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, *CfnFunction_FileSystemConfigProperty; 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_CfnFunction) validateSetImageConfigParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnFunction_ImageConfigProperty: val := val.(*CfnFunction_ImageConfigProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_ImageConfigProperty: val_ := val.(CfnFunction_ImageConfigProperty) 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, *CfnFunction_ImageConfigProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetPoliciesParameters(val interface{}) error { switch val.(type) { case *string: // ok case string: // ok case awscdk.IResolvable: // ok case *CfnFunction_IAMPolicyDocumentProperty: val := val.(*CfnFunction_IAMPolicyDocumentProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_IAMPolicyDocumentProperty: val_ := val.(CfnFunction_IAMPolicyDocumentProperty) val := &val_ if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case *[]interface{}: val := val.(*[]interface{}) for idx_97dfc6, v := range *val { switch v.(type) { case *string: // ok case string: // ok case awscdk.IResolvable: // ok case *CfnFunction_IAMPolicyDocumentProperty: v := v.(*CfnFunction_IAMPolicyDocumentProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_IAMPolicyDocumentProperty: v_ := v.(CfnFunction_IAMPolicyDocumentProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case *CfnFunction_SAMPolicyTemplateProperty: v := v.(*CfnFunction_SAMPolicyTemplateProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_SAMPolicyTemplateProperty: v_ := v.(CfnFunction_SAMPolicyTemplateProperty) 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: *string, awscdk.IResolvable, *CfnFunction_IAMPolicyDocumentProperty, *CfnFunction_SAMPolicyTemplateProperty; 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 *string: // ok case string: // ok case awscdk.IResolvable: // ok case *CfnFunction_IAMPolicyDocumentProperty: v := v.(*CfnFunction_IAMPolicyDocumentProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_IAMPolicyDocumentProperty: v_ := v.(CfnFunction_IAMPolicyDocumentProperty) v := &v_ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case *CfnFunction_SAMPolicyTemplateProperty: v := v.(*CfnFunction_SAMPolicyTemplateProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnFunction_SAMPolicyTemplateProperty: v_ := v.(CfnFunction_SAMPolicyTemplateProperty) 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: *string, awscdk.IResolvable, *CfnFunction_IAMPolicyDocumentProperty, *CfnFunction_SAMPolicyTemplateProperty; 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: *string, awscdk.IResolvable, *CfnFunction_IAMPolicyDocumentProperty, *[]interface{}; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetProvisionedConcurrencyConfigParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnFunction_ProvisionedConcurrencyConfigProperty: val := val.(*CfnFunction_ProvisionedConcurrencyConfigProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_ProvisionedConcurrencyConfigProperty: val_ := val.(CfnFunction_ProvisionedConcurrencyConfigProperty) 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, *CfnFunction_ProvisionedConcurrencyConfigProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnFunction) validateSetVpcConfigParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnFunction_VpcConfigProperty: val := val.(*CfnFunction_VpcConfigProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnFunction_VpcConfigProperty: val_ := val.(CfnFunction_VpcConfigProperty) 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, *CfnFunction_VpcConfigProperty; received %#v (a %T)", val, val) } } return nil } func validateNewCfnFunctionParameters(scope constructs.Construct, id *string, props *CfnFunctionProps) 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 }