code: func (s *CreateApplicationInput) Validate() error {
  	invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"}
  	if s.ApplicationName == nil {
  		invalidParams.Add(request.NewErrParamRequired("ApplicationName"))
  	}
  	if s.ApplicationName != nil && len(*s.ApplicationName) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1))
  	}
  	if s.RuntimeEnvironment == nil {
  		invalidParams.Add(request.NewErrParamRequired("RuntimeEnvironment"))
  	}
  	if s.ServiceExecutionRole == nil {
  		invalidParams.Add(request.NewErrParamRequired("ServiceExecutionRole"))
  	}
  	if s.ServiceExecutionRole != nil && len(*s.ServiceExecutionRole) < 1 {
  		invalidParams.Add(request.NewErrParamMinLen("ServiceExecutionRole", 1))
  	}
  	if s.ApplicationConfiguration != nil {
  		if err := s.ApplicationConfiguration.Validate(); err != nil {
  			invalidParams.AddNested("ApplicationConfiguration", err.(request.ErrInvalidParams))
  		}
  	}
  	if s.CloudWatchLoggingOptions != nil {
  		for i, v := range s.CloudWatchLoggingOptions {
  			if v == nil {
  				continue
  			}
  			if err := v.Validate(); err != nil {
  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CloudWatchLoggingOptions", i), 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.