code: func (a *AliasAddAction) Validate() error {
  	var invalid []string
  	if len(a.alias) == 0 {
  		invalid = append(invalid, "Alias")
  	}
  	if len(a.index) == 0 {
  		invalid = append(invalid, "Index")
  	}
  	if len(invalid) > 0 {
  		return fmt.Errorf("missing required fields: %v", invalid)
  	}
  	if a.isWriteIndex != nil && len(a.index) > 1 {
  		return fmt.Errorf("more than 1 target index specified in operation with 'is_write_index' flag present")
  	}
  	return nil
  }
docs: // Validate checks if the operation is valid.