# Admin Directory API . notifications

## Instance Methods

Deletes a notification

Retrieves a notification.

Retrieves a list of notifications.

Retrieves the next page of results.

Updates a notification. This method supports patch semantics.

Updates a notification.

### Method Details

`delete(customer, notificationId)`

    Deletes a notification

    Args:
      customer: string, The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource. (required)
      notificationId: string, The unique ID of the notification. (required)

`get(customer, notificationId)`

    Retrieves a notification.

    Args:
      customer: string, The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource. (required)
      notificationId: string, The unique ID of the notification. (required)

    Returns:
      An object of the form:

        { # Template for a notification resource.
        "body": "A String", # Body of the notification (Read-only)
        "etag": "A String", # ETag of the resource.
        "fromAddress": "A String", # Address from which the notification is received (Read-only)
        "isUnread": True or False, # Boolean indicating whether the notification is unread or not.
        "kind": "admin#directory#notification", # The type of the resource.
        "notificationId": "A String",
        "sendTime": "A String", # Time at which notification was sent (Read-only)
        "subject": "A String", # Subject of the notification (Read-only)
      }

`list(customer, language=None, maxResults=None, pageToken=None)`

    Retrieves a list of notifications.

    Args:
      customer: string, The unique ID for the customer's G Suite account. (required)
      language: string, The ISO 639-1 code of the language notifications are returned in. The default is English (en).
      maxResults: integer, Maximum number of notifications to return per page. The default is 100.
      pageToken: string, The token to specify the page of results to retrieve.

    Returns:
      An object of the form:

        { # Template for notifications list response.
        "etag": "A String", # ETag of the resource.
        "items": [ # List of notifications in this page.
          { # Template for a notification resource.
            "body": "A String", # Body of the notification (Read-only)
            "etag": "A String", # ETag of the resource.
            "fromAddress": "A String", # Address from which the notification is received (Read-only)
            "isUnread": True or False, # Boolean indicating whether the notification is unread or not.
            "kind": "admin#directory#notification", # The type of the resource.
            "notificationId": "A String",
            "sendTime": "A String", # Time at which notification was sent (Read-only)
            "subject": "A String", # Subject of the notification (Read-only)
          },
        ],
        "kind": "admin#directory#notifications", # The type of the resource.
        "nextPageToken": "A String", # Token for fetching the next page of notifications.
        "unreadNotificationsCount": 42, # Number of unread notification for the domain.
      }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.

`patch(customer, notificationId, body=None)`

    Updates a notification. This method supports patch semantics.

    Args:
      customer: string, The unique ID for the customer's G Suite account. (required)
      notificationId: string, The unique ID of the notification. (required)
      body: object, The request body.
        The object takes the form of:

    { # Template for a notification resource.
      "body": "A String", # Body of the notification (Read-only)
      "etag": "A String", # ETag of the resource.
      "fromAddress": "A String", # Address from which the notification is received (Read-only)
      "isUnread": True or False, # Boolean indicating whether the notification is unread or not.
      "kind": "admin#directory#notification", # The type of the resource.
      "notificationId": "A String",
      "sendTime": "A String", # Time at which notification was sent (Read-only)
      "subject": "A String", # Subject of the notification (Read-only)
    }

    Returns:
      An object of the form:

        { # Template for a notification resource.
        "body": "A String", # Body of the notification (Read-only)
        "etag": "A String", # ETag of the resource.
        "fromAddress": "A String", # Address from which the notification is received (Read-only)
        "isUnread": True or False, # Boolean indicating whether the notification is unread or not.
        "kind": "admin#directory#notification", # The type of the resource.
        "notificationId": "A String",
        "sendTime": "A String", # Time at which notification was sent (Read-only)
        "subject": "A String", # Subject of the notification (Read-only)
      }

`update(customer, notificationId, body=None)`

    Updates a notification.

    Args:
      customer: string, The unique ID for the customer's G Suite account. (required)
      notificationId: string, The unique ID of the notification. (required)
      body: object, The request body.
        The object takes the form of:

    { # Template for a notification resource.
      "body": "A String", # Body of the notification (Read-only)
      "etag": "A String", # ETag of the resource.
      "fromAddress": "A String", # Address from which the notification is received (Read-only)
      "isUnread": True or False, # Boolean indicating whether the notification is unread or not.
      "kind": "admin#directory#notification", # The type of the resource.
      "notificationId": "A String",
      "sendTime": "A String", # Time at which notification was sent (Read-only)
      "subject": "A String", # Subject of the notification (Read-only)
    }

    Returns:
      An object of the form:

        { # Template for a notification resource.
        "body": "A String", # Body of the notification (Read-only)
        "etag": "A String", # ETag of the resource.
        "fromAddress": "A String", # Address from which the notification is received (Read-only)
        "isUnread": True or False, # Boolean indicating whether the notification is unread or not.
        "kind": "admin#directory#notification", # The type of the resource.
        "notificationId": "A String",
        "sendTime": "A String", # Time at which notification was sent (Read-only)
        "subject": "A String", # Subject of the notification (Read-only)
      }