code: func (s *CreateHITWithHITTypeInput) Validate() error {
  	invalidParams := request.ErrInvalidParams{Context: "CreateHITWithHITTypeInput"}
  	if s.HITLayoutId != nil && len(*s.HITLayoutId) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("HITLayoutId", 1))
  	}
  	if s.HITTypeId == nil {
  		invalidParams.Add(request.NewErrParamRequired("HITTypeId"))
  	}
  	if s.HITTypeId != nil && len(*s.HITTypeId) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("HITTypeId", 1))
  	}
  	if s.LifetimeInSeconds == nil {
  		invalidParams.Add(request.NewErrParamRequired("LifetimeInSeconds"))
  	}
  	if s.UniqueRequestToken != nil && len(*s.UniqueRequestToken) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("UniqueRequestToken", 1))
  	}
  	if s.AssignmentReviewPolicy != nil {
  		if err := s.AssignmentReviewPolicy.Validate(); err != nil {
  			invalidParams.AddNested("AssignmentReviewPolicy", err.(request.ErrInvalidParams))
  		}
  	}
  	if s.HITLayoutParameters != nil {
  		for i, v := range s.HITLayoutParameters {
  			if v == nil {
  				continue
  			}
  			if err := v.Validate(); err != nil {
  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HITLayoutParameters", i), err.(request.ErrInvalidParams))
  			}
  		}
  	}
  	if s.HITReviewPolicy != nil {
  		if err := s.HITReviewPolicy.Validate(); err != nil {
  			invalidParams.AddNested("HITReviewPolicy", 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.