//go:build !no_runtime_type_checking package awsec2 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_CfnInstance) validateAddDeletionOverrideParameters(path *string) error { if path == nil { return fmt.Errorf("parameter path is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) validateAddDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) validateAddDependsOnParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) 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_CfnInstance) 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_CfnInstance) validateAddPropertyDeletionOverrideParameters(propertyPath *string) error { if propertyPath == nil { return fmt.Errorf("parameter propertyPath is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) 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_CfnInstance) validateApplyRemovalPolicyParameters(options *awscdk.RemovalPolicyOptions) error { if err := _jsii_.ValidateStruct(options, func() string { return "parameter options" }); err != nil { return err } return nil } func (c *jsiiProxy_CfnInstance) validateGetAttParameters(attributeName *string) error { if attributeName == nil { return fmt.Errorf("parameter attributeName is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) validateGetMetadataParameters(key *string) error { if key == nil { return fmt.Errorf("parameter key is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) validateInspectParameters(inspector awscdk.TreeInspector) error { if inspector == nil { return fmt.Errorf("parameter inspector is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) validateOverrideLogicalIdParameters(newLogicalId *string) error { if newLogicalId == nil { return fmt.Errorf("parameter newLogicalId is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) validateRemoveDependencyParameters(target awscdk.CfnResource) error { if target == nil { return fmt.Errorf("parameter target is required, but nil was provided") } return nil } func (c *jsiiProxy_CfnInstance) 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_CfnInstance) 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_CfnInstance) validateValidatePropertiesParameters(_properties interface{}) error { if _properties == nil { return fmt.Errorf("parameter _properties is required, but nil was provided") } return nil } func validateCfnInstance_IsCfnElementParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func validateCfnInstance_IsCfnResourceParameters(construct constructs.IConstruct) error { if construct == nil { return fmt.Errorf("parameter construct is required, but nil was provided") } return nil } func validateCfnInstance_IsConstructParameters(x interface{}) error { if x == nil { return fmt.Errorf("parameter x is required, but nil was provided") } return nil } func (j *jsiiProxy_CfnInstance) validateSetBlockDeviceMappingsParameters(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 *CfnInstance_BlockDeviceMappingProperty: v := v.(*CfnInstance_BlockDeviceMappingProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_BlockDeviceMappingProperty: v_ := v.(CfnInstance_BlockDeviceMappingProperty) 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, *CfnInstance_BlockDeviceMappingProperty; 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 *CfnInstance_BlockDeviceMappingProperty: v := v.(*CfnInstance_BlockDeviceMappingProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_BlockDeviceMappingProperty: v_ := v.(CfnInstance_BlockDeviceMappingProperty) 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, *CfnInstance_BlockDeviceMappingProperty; 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_CfnInstance) validateSetCpuOptionsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnInstance_CpuOptionsProperty: val := val.(*CfnInstance_CpuOptionsProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnInstance_CpuOptionsProperty: val_ := val.(CfnInstance_CpuOptionsProperty) 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, *CfnInstance_CpuOptionsProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnInstance) validateSetCreditSpecificationParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnInstance_CreditSpecificationProperty: val := val.(*CfnInstance_CreditSpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnInstance_CreditSpecificationProperty: val_ := val.(CfnInstance_CreditSpecificationProperty) 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, *CfnInstance_CreditSpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnInstance) validateSetDisableApiTerminationParameters(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_CfnInstance) validateSetEbsOptimizedParameters(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_CfnInstance) validateSetElasticGpuSpecificationsParameters(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 *CfnInstance_ElasticGpuSpecificationProperty: v := v.(*CfnInstance_ElasticGpuSpecificationProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_ElasticGpuSpecificationProperty: v_ := v.(CfnInstance_ElasticGpuSpecificationProperty) 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, *CfnInstance_ElasticGpuSpecificationProperty; 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 *CfnInstance_ElasticGpuSpecificationProperty: v := v.(*CfnInstance_ElasticGpuSpecificationProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_ElasticGpuSpecificationProperty: v_ := v.(CfnInstance_ElasticGpuSpecificationProperty) 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, *CfnInstance_ElasticGpuSpecificationProperty; 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_CfnInstance) validateSetElasticInferenceAcceleratorsParameters(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 *CfnInstance_ElasticInferenceAcceleratorProperty: v := v.(*CfnInstance_ElasticInferenceAcceleratorProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_ElasticInferenceAcceleratorProperty: v_ := v.(CfnInstance_ElasticInferenceAcceleratorProperty) 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, *CfnInstance_ElasticInferenceAcceleratorProperty; 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 *CfnInstance_ElasticInferenceAcceleratorProperty: v := v.(*CfnInstance_ElasticInferenceAcceleratorProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_ElasticInferenceAcceleratorProperty: v_ := v.(CfnInstance_ElasticInferenceAcceleratorProperty) 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, *CfnInstance_ElasticInferenceAcceleratorProperty; 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_CfnInstance) validateSetEnclaveOptionsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnInstance_EnclaveOptionsProperty: val := val.(*CfnInstance_EnclaveOptionsProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnInstance_EnclaveOptionsProperty: val_ := val.(CfnInstance_EnclaveOptionsProperty) 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, *CfnInstance_EnclaveOptionsProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnInstance) validateSetHibernationOptionsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnInstance_HibernationOptionsProperty: val := val.(*CfnInstance_HibernationOptionsProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnInstance_HibernationOptionsProperty: val_ := val.(CfnInstance_HibernationOptionsProperty) 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, *CfnInstance_HibernationOptionsProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnInstance) validateSetIpv6AddressesParameters(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 *CfnInstance_InstanceIpv6AddressProperty: v := v.(*CfnInstance_InstanceIpv6AddressProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_InstanceIpv6AddressProperty: v_ := v.(CfnInstance_InstanceIpv6AddressProperty) 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, *CfnInstance_InstanceIpv6AddressProperty; 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 *CfnInstance_InstanceIpv6AddressProperty: v := v.(*CfnInstance_InstanceIpv6AddressProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_InstanceIpv6AddressProperty: v_ := v.(CfnInstance_InstanceIpv6AddressProperty) 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, *CfnInstance_InstanceIpv6AddressProperty; 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_CfnInstance) validateSetLaunchTemplateParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnInstance_LaunchTemplateSpecificationProperty: val := val.(*CfnInstance_LaunchTemplateSpecificationProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnInstance_LaunchTemplateSpecificationProperty: val_ := val.(CfnInstance_LaunchTemplateSpecificationProperty) 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, *CfnInstance_LaunchTemplateSpecificationProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnInstance) validateSetLicenseSpecificationsParameters(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 *CfnInstance_LicenseSpecificationProperty: v := v.(*CfnInstance_LicenseSpecificationProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_LicenseSpecificationProperty: v_ := v.(CfnInstance_LicenseSpecificationProperty) 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, *CfnInstance_LicenseSpecificationProperty; 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 *CfnInstance_LicenseSpecificationProperty: v := v.(*CfnInstance_LicenseSpecificationProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_LicenseSpecificationProperty: v_ := v.(CfnInstance_LicenseSpecificationProperty) 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, *CfnInstance_LicenseSpecificationProperty; 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_CfnInstance) validateSetMonitoringParameters(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_CfnInstance) validateSetNetworkInterfacesParameters(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 *CfnInstance_NetworkInterfaceProperty: v := v.(*CfnInstance_NetworkInterfaceProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_NetworkInterfaceProperty: v_ := v.(CfnInstance_NetworkInterfaceProperty) 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, *CfnInstance_NetworkInterfaceProperty; 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 *CfnInstance_NetworkInterfaceProperty: v := v.(*CfnInstance_NetworkInterfaceProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_NetworkInterfaceProperty: v_ := v.(CfnInstance_NetworkInterfaceProperty) 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, *CfnInstance_NetworkInterfaceProperty; 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_CfnInstance) validateSetPrivateDnsNameOptionsParameters(val interface{}) error { switch val.(type) { case awscdk.IResolvable: // ok case *CfnInstance_PrivateDnsNameOptionsProperty: val := val.(*CfnInstance_PrivateDnsNameOptionsProperty) if err := _jsii_.ValidateStruct(val, func() string { return "parameter val" }); err != nil { return err } case CfnInstance_PrivateDnsNameOptionsProperty: val_ := val.(CfnInstance_PrivateDnsNameOptionsProperty) 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, *CfnInstance_PrivateDnsNameOptionsProperty; received %#v (a %T)", val, val) } } return nil } func (j *jsiiProxy_CfnInstance) validateSetPropagateTagsToVolumeOnCreationParameters(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_CfnInstance) validateSetSourceDestCheckParameters(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_CfnInstance) validateSetSsmAssociationsParameters(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 *CfnInstance_SsmAssociationProperty: v := v.(*CfnInstance_SsmAssociationProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_SsmAssociationProperty: v_ := v.(CfnInstance_SsmAssociationProperty) 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, *CfnInstance_SsmAssociationProperty; 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 *CfnInstance_SsmAssociationProperty: v := v.(*CfnInstance_SsmAssociationProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_SsmAssociationProperty: v_ := v.(CfnInstance_SsmAssociationProperty) 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, *CfnInstance_SsmAssociationProperty; 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_CfnInstance) 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_CfnInstance) validateSetVolumesParameters(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 *CfnInstance_VolumeProperty: v := v.(*CfnInstance_VolumeProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_VolumeProperty: v_ := v.(CfnInstance_VolumeProperty) 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, *CfnInstance_VolumeProperty; 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 *CfnInstance_VolumeProperty: v := v.(*CfnInstance_VolumeProperty) if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { return err } case CfnInstance_VolumeProperty: v_ := v.(CfnInstance_VolumeProperty) 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, *CfnInstance_VolumeProperty; 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 validateNewCfnInstanceParameters(scope constructs.Construct, id *string, props *CfnInstanceProps) 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 }