authority = $authority; } /** * @return string */ public function getAuthority() { return $this->authority; } /** * Output only. The time when the subscription is created. * * @param string $createTime */ public function setCreateTime($createTime) { $this->createTime = $createTime; } /** * @return string */ public function getCreateTime() { return $this->createTime; } /** * Optional. Features that are supported only for subscriptions on Drive * resources. * * @param DriveOptions $driveOptions */ public function setDriveOptions(DriveOptions $driveOptions) { $this->driveOptions = $driveOptions; } /** * @return DriveOptions */ public function getDriveOptions() { return $this->driveOptions; } /** * Optional. This checksum is computed by the server based on the value of * other fields, and might be sent on update requests to ensure the client has * an up-to-date value before proceeding. * * @param string $etag */ public function setEtag($etag) { $this->etag = $etag; } /** * @return string */ public function getEtag() { return $this->etag; } /** * Required. Unordered list. Input for creating a subscription. Otherwise, * output only. One or more types of events to receive about the target * resource. Formatted according to the CloudEvents specification. The * supported event types depend on the target resource of your subscription. * For details, see [Supported Google Workspace * events](https://developers.google.com/workspace/events/guides#supported- * events). By default, you also receive events about the [lifecycle of your * subscription](https://developers.google.com/workspace/events/guides/events- * lifecycle). You don't need to specify lifecycle events for this field. If * you specify an event type that doesn't exist for the target resource, the * request returns an HTTP `400 Bad Request` status code. * * @param string[] $eventTypes */ public function setEventTypes($eventTypes) { $this->eventTypes = $eventTypes; } /** * @return string[] */ public function getEventTypes() { return $this->eventTypes; } /** * Non-empty default. The timestamp in UTC when the subscription expires. * Always displayed on output, regardless of what was used on input. * * @param string $expireTime */ public function setExpireTime($expireTime) { $this->expireTime = $expireTime; } /** * @return string */ public function getExpireTime() { return $this->expireTime; } /** * Identifier. Resource name of the subscription. Format: * `subscriptions/{subscription}` * * @param string $name */ public function setName($name) { $this->name = $name; } /** * @return string */ public function getName() { return $this->name; } /** * Required. Immutable. The endpoint where the subscription delivers events, * such as a Pub/Sub topic. * * @param NotificationEndpoint $notificationEndpoint */ public function setNotificationEndpoint(NotificationEndpoint $notificationEndpoint) { $this->notificationEndpoint = $notificationEndpoint; } /** * @return NotificationEndpoint */ public function getNotificationEndpoint() { return $this->notificationEndpoint; } /** * Optional. Options about what data to include in the event payload. Only * supported for Google Chat and Google Drive events. * * @param PayloadOptions $payloadOptions */ public function setPayloadOptions(PayloadOptions $payloadOptions) { $this->payloadOptions = $payloadOptions; } /** * @return PayloadOptions */ public function getPayloadOptions() { return $this->payloadOptions; } /** * Output only. If `true`, the subscription is in the process of being * updated. * * @param bool $reconciling */ public function setReconciling($reconciling) { $this->reconciling = $reconciling; } /** * @return bool */ public function getReconciling() { return $this->reconciling; } /** * Output only. The service account that was used to authorize the creation of * the subscription. This service account must be owned by the same Google * Cloud project where you created this subscription. Format: * `projects/{project_id}/serviceAccounts/{service_account_id}` * * @param string $serviceAccountAuthority */ public function setServiceAccountAuthority($serviceAccountAuthority) { $this->serviceAccountAuthority = $serviceAccountAuthority; } /** * @return string */ public function getServiceAccountAuthority() { return $this->serviceAccountAuthority; } /** * Output only. The state of the subscription. Determines whether the * subscription can receive events and deliver them to the notification * endpoint. * * Accepted values: STATE_UNSPECIFIED, ACTIVE, SUSPENDED, DELETED * * @param self::STATE_* $state */ public function setState($state) { $this->state = $state; } /** * @return self::STATE_* */ public function getState() { return $this->state; } /** * Output only. The error that suspended the subscription. To reactivate the * subscription, resolve the error and call the `ReactivateSubscription` * method. * * Accepted values: ERROR_TYPE_UNSPECIFIED, USER_SCOPE_REVOKED, * APP_SCOPE_REVOKED, RESOURCE_DELETED, USER_AUTHORIZATION_FAILURE, * APP_AUTHORIZATION_FAILURE, ENDPOINT_PERMISSION_DENIED, ENDPOINT_NOT_FOUND, * ENDPOINT_RESOURCE_EXHAUSTED, OTHER * * @param self::SUSPENSION_REASON_* $suspensionReason */ public function setSuspensionReason($suspensionReason) { $this->suspensionReason = $suspensionReason; } /** * @return self::SUSPENSION_REASON_* */ public function getSuspensionReason() { return $this->suspensionReason; } /** * Required. Immutable. The Google Workspace resource that's monitored for * events, formatted as the [full resource * name](https://google.aip.dev/122#full-resource-names). To learn about * target resources and the events that they support, see [Supported Google * Workspace events](https://developers.google.com/workspace/events#supported- * events). A user can only authorize your app to create one subscription for * a given target resource. If your app tries to create another subscription * with the same user credentials, the request returns an `ALREADY_EXISTS` * error. * * @param string $targetResource */ public function setTargetResource($targetResource) { $this->targetResource = $targetResource; } /** * @return string */ public function getTargetResource() { return $this->targetResource; } /** * Input only. The time-to-live (TTL) or duration for the subscription. If * unspecified or set to `0`, uses the maximum possible duration. * * @param string $ttl */ public function setTtl($ttl) { $this->ttl = $ttl; } /** * @return string */ public function getTtl() { return $this->ttl; } /** * Output only. System-assigned unique identifier for the subscription. * * @param string $uid */ public function setUid($uid) { $this->uid = $uid; } /** * @return string */ public function getUid() { return $this->uid; } /** * Output only. The last time that the subscription is updated. * * @param string $updateTime */ public function setUpdateTime($updateTime) { $this->updateTime = $updateTime; } /** * @return string */ public function getUpdateTime() { return $this->updateTime; } /** * Output only. The user who authorized the creation of the subscription. The * user must be able to view the `target_resource`. For Google Workspace * users, the `{user}` value is the [`user.id`](https://developers.google.com/ * workspace/admin/directory/reference/rest/v1/users#User.FIELDS.id) field * from the Directory API. Format: `users/{user}` * * @param string $userAuthority */ public function setUserAuthority($userAuthority) { $this->userAuthority = $userAuthority; } /** * @return string */ public function getUserAuthority() { return $this->userAuthority; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Subscription::class, 'Google_Service_WorkspaceEvents_Subscription');