//go:build !no_runtime_type_checking package awsopsworks 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_CfnStack) validateAddDeletionOverrideParameters(path *string) error { if path == nil { return fmt.Errorf("parameter path is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) validateAddDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) validateAddDependsOnParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) 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_CfnStack) 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_CfnStack) validateAddPropertyDeletionOverrideParameters(propertyPath *string) error { if propertyPath == nil { return fmt.Errorf("parameter propertyPath is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) 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_CfnStack) validateApplyRemovalPolicyParameters(options *awscdk.RemovalPolicyOptions) error { if err := _jsii_.ValidateStruct(options, func() string { return "parameter options" }); err != nil { return err } return nil } func (c *jsiiProxy_CfnStack) validateGetAttParameters(attributeName *string) error { if attributeName == nil { return fmt.Errorf("parameter attributeName is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) validateGetMetadataParameters(key *string) error { if key == nil { return fmt.Errorf("parameter key is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) validateInspectParameters(inspector awscdk.TreeInspector) error { if inspector == nil { return fmt.Errorf("parameter inspector is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) validateOverrideLogicalIdParameters(newLogicalId *string) error { if newLogicalId == nil { return fmt.Errorf("parameter newLogicalId is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) validateRemoveDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnStack) 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_CfnStack) 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_CfnStack) validateValidatePropertiesParameters(_properties interface{}) error { if _properties == nil { return fmt.Errorf("parameter _properties is required, but nil was provided") } return nil } func validateCfnStack_IsCfnElementParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func validateCfnStack_IsCfnResourceParameters(construct constructs.IConstruct) error { if construct == nil { return fmt.Errorf("parameter construct is required, but nil was provided") } return nil } func validateCfnStack_IsConstructParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnStack) validateSetAttributesParameters(val interface{}) error { switch val.(type) { case *map[string]*string: // ok case map[string]*string: // ok case awscdk.IResolvable: // ok default: if !_jsii_.IsAnonymousProxy(val) { return fmt.Errorf("parameter val must be one of the allowed types: *map[string]*string, awscdk.IResolvable; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnStack) validateSetChefConfigurationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnStack_ChefConfigurationProperty: val := val.(*CfnStack_ChefConfigurationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnStack_ChefConfigurationProperty: val_ := val.(CfnStack_ChefConfigurationProperty) 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, *CfnStack_ChefConfigurationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnStack) validateSetClonePermissionsParameters(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_CfnStack) validateSetConfigurationManagerParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnStack_StackConfigurationManagerProperty: val := val.(*CfnStack_StackConfigurationManagerProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnStack_StackConfigurationManagerProperty: val_ := val.(CfnStack_StackConfigurationManagerProperty) 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, *CfnStack_StackConfigurationManagerProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnStack) validateSetCustomCookbooksSourceParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnStack_SourceProperty: val := val.(*CfnStack_SourceProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnStack_SourceProperty: val_ := val.(CfnStack_SourceProperty) 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, *CfnStack_SourceProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnStack) validateSetDefaultInstanceProfileArnParameters(val *string) error { if val == nil { return fmt.Errorf("parameter val is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnStack) validateSetElasticIpsParameters(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 *CfnStack_ElasticIpProperty: v := v.(*CfnStack_ElasticIpProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnStack_ElasticIpProperty: v_ := v.(CfnStack_ElasticIpProperty) 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, *CfnStack_ElasticIpProperty; 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 *CfnStack_ElasticIpProperty: v := v.(*CfnStack_ElasticIpProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnStack_ElasticIpProperty: v_ := v.(CfnStack_ElasticIpProperty) 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, *CfnStack_ElasticIpProperty; 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_CfnStack) validateSetNameParameters(val *string) error { if val == nil { return fmt.Errorf("parameter val is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnStack) validateSetRdsDbInstancesParameters(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 *CfnStack_RdsDbInstanceProperty: v := v.(*CfnStack_RdsDbInstanceProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnStack_RdsDbInstanceProperty: v_ := v.(CfnStack_RdsDbInstanceProperty) 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, *CfnStack_RdsDbInstanceProperty; 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 *CfnStack_RdsDbInstanceProperty: v := v.(*CfnStack_RdsDbInstanceProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnStack_RdsDbInstanceProperty: v_ := v.(CfnStack_RdsDbInstanceProperty) 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, *CfnStack_RdsDbInstanceProperty; 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_CfnStack) validateSetServiceRoleArnParameters(val *string) error { if val == nil { return fmt.Errorf("parameter val is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnStack) 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_CfnStack) validateSetUseCustomCookbooksParameters(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_CfnStack) validateSetUseOpsworksSecurityGroupsParameters(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 validateNewCfnStackParameters(scope constructs.Construct, id *string, props *CfnStackProps) 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 }