// 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 *EventDestination) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "EventDestination"}
	if s.MatchingEventTypes == nil {
		invalidParams.Add(request.NewErrParamRequired("MatchingEventTypes"))
	}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.CloudWatchDestination != nil {
		if err := s.CloudWatchDestination.Validate(); err != nil {
			invalidParams.AddNested("CloudWatchDestination", err.(request.ErrInvalidParams))
		}
	}
	if s.KinesisFirehoseDestination != nil {
		if err := s.KinesisFirehoseDestination.Validate(); err != nil {
			invalidParams.AddNested("KinesisFirehoseDestination", err.(request.ErrInvalidParams))
		}
	}
	if s.SNSDestination != nil {
		if err := s.SNSDestination.Validate(); err != nil {
			invalidParams.AddNested("SNSDestination", err.(request.ErrInvalidParams))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * EventDestination ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . MatchingEventTypes == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Name == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . CloudWatchDestination != nil { if err := s . CloudWatchDestination . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if s . KinesisFirehoseDestination != nil { if err := s . KinesisFirehoseDestination . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if s . SNSDestination != nil { if err := s . SNSDestination . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , 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 .