new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java
public static List<V1Event> listNamespacedEvents(String namespace) throws ApiException {
    List<V1Event> events = null;
    try {
      V1EventList list = coreV1Api.listNamespacedEvent(
              namespace, // String | namespace.
              PRETTY, // String | If 'true', then the output is pretty printed.
              ALLOW_WATCH_BOOKMARKS, // Boolean | allowWatchBookmarks requests watch events with type "BOOKMARK".
              null, // String | The continue option should be set when retrieving more results from the server.
              null, // String | A selector to restrict the list of returned objects by their fields.
              null, // String | A selector to restrict the list of returned objects by their labels.
              null, // Integer | limit is a maximum number of responses to return for a list call.
              RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource.
              TIMEOUT_SECONDS, // Integer | Timeout for the list call.
              Boolean.FALSE // Boolean | Watch for changes to the described resources.
      );
      events = list.getItems();
      events.sort(Comparator.comparing(e -> e.getMetadata().getCreationTimestamp()));
      Collections.reverse(events);
    } catch (ApiException apex) {
      getLogger().warning(apex.getResponseBody());
      throw apex;
    }
    return events;
  }
/**
   * List events in a namespace.
   *
   * @param namespace name of the namespace in which to list events
   * @return List of {@link V1Event} objects
   * @throws ApiException when listing events fails
   */
List events in a namespace.
@param namespace name of the namespace in which to list events
@return List of  V1Event objects
@throws ApiException when listing events fails
List events in a namespace . @param namespace name of the namespace in which to list events @return List of V1Event objects @throws ApiException when listing events fails
public static List<V1Event> listNamespacedEvents(String namespace) throws ApiException {
    List<V1Event> events = null;
    try {
      V1EventList list = coreV1Api.listNamespacedEvent(
              namespace, 
              PRETTY, 
              ALLOW_WATCH_BOOKMARKS, 
              null, 
              null, 
              null, 
              null, 
              RESOURCE_VERSION, 
              TIMEOUT_SECONDS, 
              Boolean.FALSE 
      );
      events = list.getItems();
      events.sort(Comparator.comparing(e -> e.getMetadata().getCreationTimestamp()));
      Collections.reverse(events);
    } catch (ApiException apex) {
      getLogger().warning(apex.getResponseBody());
      throw apex;
    }
    return events;
  }
public static List < V1Event > listNamespacedEvents ( String namespace ) throws ApiException { List < V1Event > events = null ; try { V1EventList list = coreV1Api . listNamespacedEvent ( namespace , PRETTY , ALLOW_WATCH_BOOKMARKS , null , null , null , null , RESOURCE_VERSION , TIMEOUT_SECONDS , Boolean . FALSE ) ; events = list . getItems ( ) ; events . sort ( Comparator . comparing ( e -> e . getMetadata ( ) . getCreationTimestamp ( ) ) ) ; Collections . reverse ( events ) ; } catch ( ApiException apex ) { getLogger ( ) . warning ( apex . getResponseBody ( ) ) ; throw apex ; } return events ; }
List events in a namespace.
List events in a namespace .
// String | namespace. // String | If 'true', then the output is pretty printed. // Boolean | allowWatchBookmarks requests watch events with type "BOOKMARK". // String | The continue option should be set when retrieving more results from the server. // String | A selector to restrict the list of returned objects by their fields. // String | A selector to restrict the list of returned objects by their labels. // Integer | limit is a maximum number of responses to return for a list call. // String | Shows changes that occur after that particular version of a resource. // Integer | Timeout for the list call. // Boolean | Watch for changes to the described resources.