code: public RepositoryTrigger withEvents(RepositoryTriggerEventEnum... events) {
          java.util.ArrayList<String> eventsCopy = new java.util.ArrayList<String>(events.length);
          for (RepositoryTriggerEventEnum value : events) {
              eventsCopy.add(value.toString());
          }
          if (getEvents() == null) {
              setEvents(eventsCopy);
          } else {
              getEvents().addAll(eventsCopy);
          }
          return this;
      }
docs: <p>
  The repository events that will cause the trigger to run actions in another service, such as sending a
  notification through Amazon Simple Notification Service (SNS).
  </p>
  <note>
  <p>
  The valid value "all" cannot be used with any other values.
  </p>
  </note>
  
  @param events
  The repository events that will cause the trigger to run actions in another service, such as sending a
  notification through Amazon Simple Notification Service (SNS). </p> <note>
  <p>
  The valid value "all" cannot be used with any other values.
  </p>
  @return Returns a reference to this object so that method calls can be chained together.
  @see RepositoryTriggerEventEnum