code: func (s *OutputSettings) Validate() error {
  	invalidParams := request.ErrInvalidParams{Context: "OutputSettings"}
  	if s.ArchiveOutputSettings != nil {
  		if err := s.ArchiveOutputSettings.Validate(); err != nil {
  			invalidParams.AddNested("ArchiveOutputSettings", err.(request.ErrInvalidParams))
  		}
  	}
  	if s.HlsOutputSettings != nil {
  		if err := s.HlsOutputSettings.Validate(); err != nil {
  			invalidParams.AddNested("HlsOutputSettings", err.(request.ErrInvalidParams))
  		}
  	}
  	if s.RtmpOutputSettings != nil {
  		if err := s.RtmpOutputSettings.Validate(); err != nil {
  			invalidParams.AddNested("RtmpOutputSettings", err.(request.ErrInvalidParams))
  		}
  	}
  	if s.UdpOutputSettings != nil {
  		if err := s.UdpOutputSettings.Validate(); err != nil {
  			invalidParams.AddNested("UdpOutputSettings", err.(request.ErrInvalidParams))
  		}
  	}
  
  	if invalidParams.Len() > 0 {
  		return invalidParams
  	}
  	return nil
  }
docs: // Validate inspects the fields of the type to determine if they are valid.