code: func (s *UpdateChapCredentialsInput) Validate() error {
  	invalidParams := request.ErrInvalidParams{Context: "UpdateChapCredentialsInput"}
  	if s.InitiatorName == nil {
  		invalidParams.Add(request.NewErrParamRequired("InitiatorName"))
  	}
  	if s.InitiatorName != nil && len(*s.InitiatorName) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("InitiatorName", 1))
  	}
  	if s.SecretToAuthenticateInitiator == nil {
  		invalidParams.Add(request.NewErrParamRequired("SecretToAuthenticateInitiator"))
  	}
  	if s.SecretToAuthenticateInitiator != nil && len(*s.SecretToAuthenticateInitiator) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateInitiator", 1))
  	}
  	if s.SecretToAuthenticateTarget != nil && len(*s.SecretToAuthenticateTarget) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateTarget", 1))
  	}
  	if s.TargetARN == nil {
  		invalidParams.Add(request.NewErrParamRequired("TargetARN"))
  	}
  	if s.TargetARN != nil && len(*s.TargetARN) < 50 {
  		invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50))
  	}
  
  	if invalidParams.Len() > 0 {
  		return invalidParams
  	}
  	return nil
  }
docs: // Validate inspects the fields of the type to determine if they are valid.