func (s *LambdaFunctionRecipeSource) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionRecipeSource"}
	if s.ComponentName != nil && len(*s.ComponentName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("ComponentName", 1))
	}
	if s.ComponentVersion != nil && len(*s.ComponentVersion) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("ComponentVersion", 1))
	}
	if s.LambdaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("LambdaArn"))
	}
	if s.ComponentDependencies != nil {
		for i, v := range s.ComponentDependencies {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComponentDependencies", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.ComponentLambdaParameters != nil {
		if err := s.ComponentLambdaParameters.Validate(); err != nil {
			invalidParams.AddNested("ComponentLambdaParameters", err.(request.ErrInvalidParams))
		}
	}
	if s.ComponentPlatforms != nil {
		for i, v := range s.ComponentPlatforms {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComponentPlatforms", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
// Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid.
// Validate inspects the fields of the type to determine if they are valid .
func (s *LambdaFunctionRecipeSource) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionRecipeSource"}
	if s.ComponentName != nil && len(*s.ComponentName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("ComponentName", 1))
	}
	if s.ComponentVersion != nil && len(*s.ComponentVersion) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("ComponentVersion", 1))
	}
	if s.LambdaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("LambdaArn"))
	}
	if s.ComponentDependencies != nil {
		for i, v := range s.ComponentDependencies {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComponentDependencies", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.ComponentLambdaParameters != nil {
		if err := s.ComponentLambdaParameters.Validate(); err != nil {
			invalidParams.AddNested("ComponentLambdaParameters", err.(request.ErrInvalidParams))
		}
	}
	if s.ComponentPlatforms != nil {
		for i, v := range s.ComponentPlatforms {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComponentPlatforms", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * LambdaFunctionRecipeSource ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . ComponentName != nil && len ( * s . ComponentName ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . ComponentVersion != nil && len ( * s . ComponentVersion ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . LambdaArn == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . ComponentDependencies != nil { for i , v := range s . ComponentDependencies { if v == nil { continue } if err := v . Validate ( ) ; err != nil { invalidParams . AddNested ( fmt . Sprintf ( " " , " " , i ) , err . ( request . ErrInvalidParams ) ) } } } if s . ComponentLambdaParameters != nil { if err := s . ComponentLambdaParameters . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if s . ComponentPlatforms != nil { for i , v := range s . ComponentPlatforms { if v == nil { continue } if err := v . Validate ( ) ; err != nil { invalidParams . AddNested ( fmt . Sprintf ( " " , " " , i ) , err . ( request . ErrInvalidParams ) ) } } } if invalidParams . Len ( ) > 0 { return invalidParams } return nil }
Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid .