func (s *Header) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "Header"}
	if s.Destination == nil {
		invalidParams.Add(request.NewErrParamRequired("Destination"))
	}
	if s.Destination != nil && len(*s.Destination) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Destination", 1))
	}
	if s.DestinationPort == nil {
		invalidParams.Add(request.NewErrParamRequired("DestinationPort"))
	}
	if s.DestinationPort != nil && len(*s.DestinationPort) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("DestinationPort", 1))
	}
	if s.Direction == nil {
		invalidParams.Add(request.NewErrParamRequired("Direction"))
	}
	if s.Protocol == nil {
		invalidParams.Add(request.NewErrParamRequired("Protocol"))
	}
	if s.Source == nil {
		invalidParams.Add(request.NewErrParamRequired("Source"))
	}
	if s.Source != nil && len(*s.Source) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Source", 1))
	}
	if s.SourcePort == nil {
		invalidParams.Add(request.NewErrParamRequired("SourcePort"))
	}
	if s.SourcePort != nil && len(*s.SourcePort) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("SourcePort", 1))
	}

	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 *Header) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "Header"}
	if s.Destination == nil {
		invalidParams.Add(request.NewErrParamRequired("Destination"))
	}
	if s.Destination != nil && len(*s.Destination) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Destination", 1))
	}
	if s.DestinationPort == nil {
		invalidParams.Add(request.NewErrParamRequired("DestinationPort"))
	}
	if s.DestinationPort != nil && len(*s.DestinationPort) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("DestinationPort", 1))
	}
	if s.Direction == nil {
		invalidParams.Add(request.NewErrParamRequired("Direction"))
	}
	if s.Protocol == nil {
		invalidParams.Add(request.NewErrParamRequired("Protocol"))
	}
	if s.Source == nil {
		invalidParams.Add(request.NewErrParamRequired("Source"))
	}
	if s.Source != nil && len(*s.Source) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Source", 1))
	}
	if s.SourcePort == nil {
		invalidParams.Add(request.NewErrParamRequired("SourcePort"))
	}
	if s.SourcePort != nil && len(*s.SourcePort) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("SourcePort", 1))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * Header ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . Destination == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Destination != nil && len ( * s . Destination ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . DestinationPort == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . DestinationPort != nil && len ( * s . DestinationPort ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . Direction == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Protocol == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Source == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Source != nil && len ( * s . Source ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . SourcePort == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . SourcePort != nil && len ( * s . SourcePort ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } 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 .