gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -0,0 +1,117 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class AutoForwarding extends \Google\Model
{
/**
* Unspecified disposition.
*/
public const DISPOSITION_dispositionUnspecified = 'dispositionUnspecified';
/**
* Leave the message in the `INBOX`.
*/
public const DISPOSITION_leaveInInbox = 'leaveInInbox';
/**
* Archive the message.
*/
public const DISPOSITION_archive = 'archive';
/**
* Move the message to the `TRASH`.
*/
public const DISPOSITION_trash = 'trash';
/**
* Leave the message in the `INBOX` and mark it as read.
*/
public const DISPOSITION_markRead = 'markRead';
/**
* The state that a message should be left in after it has been forwarded.
*
* @var string
*/
public $disposition;
/**
* Email address to which all incoming messages are forwarded. This email
* address must be a verified member of the forwarding addresses.
*
* @var string
*/
public $emailAddress;
/**
* Whether all incoming mail is automatically forwarded to another address.
*
* @var bool
*/
public $enabled;
/**
* The state that a message should be left in after it has been forwarded.
*
* Accepted values: dispositionUnspecified, leaveInInbox, archive, trash,
* markRead
*
* @param self::DISPOSITION_* $disposition
*/
public function setDisposition($disposition)
{
$this->disposition = $disposition;
}
/**
* @return self::DISPOSITION_*
*/
public function getDisposition()
{
return $this->disposition;
}
/**
* Email address to which all incoming messages are forwarded. This email
* address must be a verified member of the forwarding addresses.
*
* @param string $emailAddress
*/
public function setEmailAddress($emailAddress)
{
$this->emailAddress = $emailAddress;
}
/**
* @return string
*/
public function getEmailAddress()
{
return $this->emailAddress;
}
/**
* Whether all incoming mail is automatically forwarded to another address.
*
* @param bool $enabled
*/
public function setEnabled($enabled)
{
$this->enabled = $enabled;
}
/**
* @return bool
*/
public function getEnabled()
{
return $this->enabled;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AutoForwarding::class, 'Google_Service_Gmail_AutoForwarding');
@@ -0,0 +1,49 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class BatchDeleteMessagesRequest extends \Google\Collection
{
protected $collection_key = 'ids';
/**
* The IDs of the messages to delete.
*
* @var string[]
*/
public $ids;
/**
* The IDs of the messages to delete.
*
* @param string[] $ids
*/
public function setIds($ids)
{
$this->ids = $ids;
}
/**
* @return string[]
*/
public function getIds()
{
return $this->ids;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BatchDeleteMessagesRequest::class, 'Google_Service_Gmail_BatchDeleteMessagesRequest');
@@ -0,0 +1,141 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class BatchModifyMessagesRequest extends \Google\Collection
{
protected $collection_key = 'removeLabelIds';
protected $addClassificationLabelsType = ClassificationLabelValue::class;
protected $addClassificationLabelsDataType = 'array';
/**
* A list of label IDs to add to messages.
*
* @var string[]
*/
public $addLabelIds;
/**
* The IDs of the messages to modify. There is a limit of 1000 ids per
* request.
*
* @var string[]
*/
public $ids;
/**
* A list of Classification Label values to remove from messages.
*
* @var string[]
*/
public $removeClassificationLabelIds;
/**
* A list of label IDs to remove from messages.
*
* @var string[]
*/
public $removeLabelIds;
/**
* A list of Classification Label values to add. If a Classification Label
* with the same label ID is already applied to the message, fields with
* existing field IDs will be updated and fields with new field IDs will be
* added. There's a limit of 20 Classification Label values per request. If
* the message is already classified and the final total number of
* Classification Label values exceeds the maximum allowed number of
* Classification Label values per message, the modification fails.
*
* @param ClassificationLabelValue[] $addClassificationLabels
*/
public function setAddClassificationLabels($addClassificationLabels)
{
$this->addClassificationLabels = $addClassificationLabels;
}
/**
* @return ClassificationLabelValue[]
*/
public function getAddClassificationLabels()
{
return $this->addClassificationLabels;
}
/**
* A list of label IDs to add to messages.
*
* @param string[] $addLabelIds
*/
public function setAddLabelIds($addLabelIds)
{
$this->addLabelIds = $addLabelIds;
}
/**
* @return string[]
*/
public function getAddLabelIds()
{
return $this->addLabelIds;
}
/**
* The IDs of the messages to modify. There is a limit of 1000 ids per
* request.
*
* @param string[] $ids
*/
public function setIds($ids)
{
$this->ids = $ids;
}
/**
* @return string[]
*/
public function getIds()
{
return $this->ids;
}
/**
* A list of Classification Label values to remove from messages.
*
* @param string[] $removeClassificationLabelIds
*/
public function setRemoveClassificationLabelIds($removeClassificationLabelIds)
{
$this->removeClassificationLabelIds = $removeClassificationLabelIds;
}
/**
* @return string[]
*/
public function getRemoveClassificationLabelIds()
{
return $this->removeClassificationLabelIds;
}
/**
* A list of label IDs to remove from messages.
*
* @param string[] $removeLabelIds
*/
public function setRemoveLabelIds($removeLabelIds)
{
$this->removeLabelIds = $removeLabelIds;
}
/**
* @return string[]
*/
public function getRemoveLabelIds()
{
return $this->removeLabelIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BatchModifyMessagesRequest::class, 'Google_Service_Gmail_BatchModifyMessagesRequest');
@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ClassificationLabelFieldValue extends \Google\Model
{
/**
* Required. The field ID for the Classification Label Value. Maps to the ID
* field of the Google Drive `Label.Field` object.
*
* @var string
*/
public $fieldId;
/**
* Selection choice ID for the selection option. Should only be set if the
* field type is `SELECTION` in the Google Drive `Label.Field` object. Maps to
* the id field of the Google Drive `Label.Field.SelectionOptions` resource.
*
* @var string
*/
public $selection;
/**
* Required. The field ID for the Classification Label Value. Maps to the ID
* field of the Google Drive `Label.Field` object.
*
* @param string $fieldId
*/
public function setFieldId($fieldId)
{
$this->fieldId = $fieldId;
}
/**
* @return string
*/
public function getFieldId()
{
return $this->fieldId;
}
/**
* Selection choice ID for the selection option. Should only be set if the
* field type is `SELECTION` in the Google Drive `Label.Field` object. Maps to
* the id field of the Google Drive `Label.Field.SelectionOptions` resource.
*
* @param string $selection
*/
public function setSelection($selection)
{
$this->selection = $selection;
}
/**
* @return string
*/
public function getSelection()
{
return $this->selection;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ClassificationLabelFieldValue::class, 'Google_Service_Gmail_ClassificationLabelFieldValue');
@@ -0,0 +1,69 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ClassificationLabelValue extends \Google\Collection
{
protected $collection_key = 'fields';
protected $fieldsType = ClassificationLabelFieldValue::class;
protected $fieldsDataType = 'array';
/**
* Required. The canonical or raw alphanumeric classification label ID. Maps
* to the ID field of the Google Drive Label resource.
*
* @var string
*/
public $labelId;
/**
* Field values for the given classification label ID.
*
* @param ClassificationLabelFieldValue[] $fields
*/
public function setFields($fields)
{
$this->fields = $fields;
}
/**
* @return ClassificationLabelFieldValue[]
*/
public function getFields()
{
return $this->fields;
}
/**
* Required. The canonical or raw alphanumeric classification label ID. Maps
* to the ID field of the Google Drive Label resource.
*
* @param string $labelId
*/
public function setLabelId($labelId)
{
$this->labelId = $labelId;
}
/**
* @return string
*/
public function getLabelId()
{
return $this->labelId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ClassificationLabelValue::class, 'Google_Service_Gmail_ClassificationLabelValue');
@@ -0,0 +1,91 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class CseIdentity extends \Google\Model
{
/**
* The email address for the sending identity. The email address must be the
* primary email address of the authenticated user.
*
* @var string
*/
public $emailAddress;
/**
* If a key pair is associated, the ID of the key pair, CseKeyPair.
*
* @var string
*/
public $primaryKeyPairId;
protected $signAndEncryptKeyPairsType = SignAndEncryptKeyPairs::class;
protected $signAndEncryptKeyPairsDataType = '';
/**
* The email address for the sending identity. The email address must be the
* primary email address of the authenticated user.
*
* @param string $emailAddress
*/
public function setEmailAddress($emailAddress)
{
$this->emailAddress = $emailAddress;
}
/**
* @return string
*/
public function getEmailAddress()
{
return $this->emailAddress;
}
/**
* If a key pair is associated, the ID of the key pair, CseKeyPair.
*
* @param string $primaryKeyPairId
*/
public function setPrimaryKeyPairId($primaryKeyPairId)
{
$this->primaryKeyPairId = $primaryKeyPairId;
}
/**
* @return string
*/
public function getPrimaryKeyPairId()
{
return $this->primaryKeyPairId;
}
/**
* The configuration of a CSE identity that uses different key pairs for
* signing and encryption.
*
* @param SignAndEncryptKeyPairs $signAndEncryptKeyPairs
*/
public function setSignAndEncryptKeyPairs(SignAndEncryptKeyPairs $signAndEncryptKeyPairs)
{
$this->signAndEncryptKeyPairs = $signAndEncryptKeyPairs;
}
/**
* @return SignAndEncryptKeyPairs
*/
public function getSignAndEncryptKeyPairs()
{
return $this->signAndEncryptKeyPairs;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CseIdentity::class, 'Google_Service_Gmail_CseIdentity');
@@ -0,0 +1,211 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class CseKeyPair extends \Google\Collection
{
/**
* The current state of the key pair is not set. The key pair is neither
* turned on nor turned off.
*/
public const ENABLEMENT_STATE_stateUnspecified = 'stateUnspecified';
/**
* The key pair is turned on. For any email messages that this key pair
* encrypts, Gmail decrypts the messages and signs any outgoing mail with the
* private key. To turn on a key pair, use the EnableCseKeyPair method.
*/
public const ENABLEMENT_STATE_enabled = 'enabled';
/**
* The key pair is turned off. Authenticated users cannot decrypt email
* messages nor sign outgoing messages. If a key pair is turned off for more
* than 30 days, you can permanently delete it. To turn off a key pair, use
* the DisableCseKeyPair method.
*/
public const ENABLEMENT_STATE_disabled = 'disabled';
protected $collection_key = 'subjectEmailAddresses';
/**
* Output only. If a key pair is set to `DISABLED`, the time that the key
* pair's state changed from `ENABLED` to `DISABLED`. This field is present
* only when the key pair is in state `DISABLED`.
*
* @var string
*/
public $disableTime;
/**
* Output only. The current state of the key pair.
*
* @var string
*/
public $enablementState;
/**
* Output only. The immutable ID for the client-side encryption S/MIME key
* pair.
*
* @var string
*/
public $keyPairId;
/**
* Output only. The public key and its certificate chain, in
* [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
*
* @var string
*/
public $pem;
/**
* Input only. The public key and its certificate chain. The chain must be in
* [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding
* and ASCII armor.
*
* @var string
*/
public $pkcs7;
protected $privateKeyMetadataType = CsePrivateKeyMetadata::class;
protected $privateKeyMetadataDataType = 'array';
/**
* Output only. The email address identities that are specified on the leaf
* certificate.
*
* @var string[]
*/
public $subjectEmailAddresses;
/**
* Output only. If a key pair is set to `DISABLED`, the time that the key
* pair's state changed from `ENABLED` to `DISABLED`. This field is present
* only when the key pair is in state `DISABLED`.
*
* @param string $disableTime
*/
public function setDisableTime($disableTime)
{
$this->disableTime = $disableTime;
}
/**
* @return string
*/
public function getDisableTime()
{
return $this->disableTime;
}
/**
* Output only. The current state of the key pair.
*
* Accepted values: stateUnspecified, enabled, disabled
*
* @param self::ENABLEMENT_STATE_* $enablementState
*/
public function setEnablementState($enablementState)
{
$this->enablementState = $enablementState;
}
/**
* @return self::ENABLEMENT_STATE_*
*/
public function getEnablementState()
{
return $this->enablementState;
}
/**
* Output only. The immutable ID for the client-side encryption S/MIME key
* pair.
*
* @param string $keyPairId
*/
public function setKeyPairId($keyPairId)
{
$this->keyPairId = $keyPairId;
}
/**
* @return string
*/
public function getKeyPairId()
{
return $this->keyPairId;
}
/**
* Output only. The public key and its certificate chain, in
* [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
*
* @param string $pem
*/
public function setPem($pem)
{
$this->pem = $pem;
}
/**
* @return string
*/
public function getPem()
{
return $this->pem;
}
/**
* Input only. The public key and its certificate chain. The chain must be in
* [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding
* and ASCII armor.
*
* @param string $pkcs7
*/
public function setPkcs7($pkcs7)
{
$this->pkcs7 = $pkcs7;
}
/**
* @return string
*/
public function getPkcs7()
{
return $this->pkcs7;
}
/**
* Metadata for instances of this key pair's private key.
*
* @param CsePrivateKeyMetadata[] $privateKeyMetadata
*/
public function setPrivateKeyMetadata($privateKeyMetadata)
{
$this->privateKeyMetadata = $privateKeyMetadata;
}
/**
* @return CsePrivateKeyMetadata[]
*/
public function getPrivateKeyMetadata()
{
return $this->privateKeyMetadata;
}
/**
* Output only. The email address identities that are specified on the leaf
* certificate.
*
* @param string[] $subjectEmailAddresses
*/
public function setSubjectEmailAddresses($subjectEmailAddresses)
{
$this->subjectEmailAddresses = $subjectEmailAddresses;
}
/**
* @return string[]
*/
public function getSubjectEmailAddresses()
{
return $this->subjectEmailAddresses;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CseKeyPair::class, 'Google_Service_Gmail_CseKeyPair');
@@ -0,0 +1,85 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class CsePrivateKeyMetadata extends \Google\Model
{
protected $hardwareKeyMetadataType = HardwareKeyMetadata::class;
protected $hardwareKeyMetadataDataType = '';
protected $kaclsKeyMetadataType = KaclsKeyMetadata::class;
protected $kaclsKeyMetadataDataType = '';
/**
* Output only. The immutable ID for the private key metadata instance.
*
* @var string
*/
public $privateKeyMetadataId;
/**
* Metadata for hardware keys.
*
* @param HardwareKeyMetadata $hardwareKeyMetadata
*/
public function setHardwareKeyMetadata(HardwareKeyMetadata $hardwareKeyMetadata)
{
$this->hardwareKeyMetadata = $hardwareKeyMetadata;
}
/**
* @return HardwareKeyMetadata
*/
public function getHardwareKeyMetadata()
{
return $this->hardwareKeyMetadata;
}
/**
* Metadata for a private key instance managed by an external key access
* control list service.
*
* @param KaclsKeyMetadata $kaclsKeyMetadata
*/
public function setKaclsKeyMetadata(KaclsKeyMetadata $kaclsKeyMetadata)
{
$this->kaclsKeyMetadata = $kaclsKeyMetadata;
}
/**
* @return KaclsKeyMetadata
*/
public function getKaclsKeyMetadata()
{
return $this->kaclsKeyMetadata;
}
/**
* Output only. The immutable ID for the private key metadata instance.
*
* @param string $privateKeyMetadataId
*/
public function setPrivateKeyMetadataId($privateKeyMetadataId)
{
$this->privateKeyMetadataId = $privateKeyMetadataId;
}
/**
* @return string
*/
public function getPrivateKeyMetadataId()
{
return $this->privateKeyMetadataId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CsePrivateKeyMetadata::class, 'Google_Service_Gmail_CsePrivateKeyMetadata');
+98
View File
@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class Delegate extends \Google\Model
{
/**
* Unspecified verification status.
*/
public const VERIFICATION_STATUS_verificationStatusUnspecified = 'verificationStatusUnspecified';
/**
* The address can act a delegate for the account.
*/
public const VERIFICATION_STATUS_accepted = 'accepted';
/**
* A verification request was mailed to the address, and the owner has not yet
* accepted it.
*/
public const VERIFICATION_STATUS_pending = 'pending';
/**
* A verification request was mailed to the address, and the owner rejected
* it.
*/
public const VERIFICATION_STATUS_rejected = 'rejected';
/**
* A verification request was mailed to the address, and it expired without
* verification.
*/
public const VERIFICATION_STATUS_expired = 'expired';
/**
* The email address of the delegate.
*
* @var string
*/
public $delegateEmail;
/**
* Indicates whether this address has been verified and can act as a delegate
* for the account. Read-only.
*
* @var string
*/
public $verificationStatus;
/**
* The email address of the delegate.
*
* @param string $delegateEmail
*/
public function setDelegateEmail($delegateEmail)
{
$this->delegateEmail = $delegateEmail;
}
/**
* @return string
*/
public function getDelegateEmail()
{
return $this->delegateEmail;
}
/**
* Indicates whether this address has been verified and can act as a delegate
* for the account. Read-only.
*
* Accepted values: verificationStatusUnspecified, accepted, pending,
* rejected, expired
*
* @param self::VERIFICATION_STATUS_* $verificationStatus
*/
public function setVerificationStatus($verificationStatus)
{
$this->verificationStatus = $verificationStatus;
}
/**
* @return self::VERIFICATION_STATUS_*
*/
public function getVerificationStatus()
{
return $this->verificationStatus;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Delegate::class, 'Google_Service_Gmail_Delegate');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class DisableCseKeyPairRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DisableCseKeyPairRequest::class, 'Google_Service_Gmail_DisableCseKeyPairRequest');
+66
View File
@@ -0,0 +1,66 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class Draft extends \Google\Model
{
/**
* The immutable ID of the draft.
*
* @var string
*/
public $id;
protected $messageType = Message::class;
protected $messageDataType = '';
/**
* The immutable ID of the draft.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* The message content of the draft.
*
* @param Message $message
*/
public function setMessage(Message $message)
{
$this->message = $message;
}
/**
* @return Message
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Draft::class, 'Google_Service_Gmail_Draft');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class EnableCseKeyPairRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EnableCseKeyPairRequest::class, 'Google_Service_Gmail_EnableCseKeyPairRequest');
+84
View File
@@ -0,0 +1,84 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class Filter extends \Google\Model
{
protected $actionType = FilterAction::class;
protected $actionDataType = '';
protected $criteriaType = FilterCriteria::class;
protected $criteriaDataType = '';
/**
* The server assigned ID of the filter.
*
* @var string
*/
public $id;
/**
* Action that the filter performs.
*
* @param FilterAction $action
*/
public function setAction(FilterAction $action)
{
$this->action = $action;
}
/**
* @return FilterAction
*/
public function getAction()
{
return $this->action;
}
/**
* Matching criteria for the filter.
*
* @param FilterCriteria $criteria
*/
public function setCriteria(FilterCriteria $criteria)
{
$this->criteria = $criteria;
}
/**
* @return FilterCriteria
*/
public function getCriteria()
{
return $this->criteria;
}
/**
* The server assigned ID of the filter.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Filter::class, 'Google_Service_Gmail_Filter');
@@ -0,0 +1,97 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class FilterAction extends \Google\Collection
{
protected $collection_key = 'removeLabelIds';
/**
* List of labels to add to the message.
*
* @var string[]
*/
public $addLabelIds;
/**
* Email address that the message should be forwarded to. This effectively
* redirects the message to the address specified in this field, maintaining
* the original sender in the "From" field.
*
* @var string
*/
public $forward;
/**
* List of labels to remove from the message.
*
* @var string[]
*/
public $removeLabelIds;
/**
* List of labels to add to the message.
*
* @param string[] $addLabelIds
*/
public function setAddLabelIds($addLabelIds)
{
$this->addLabelIds = $addLabelIds;
}
/**
* @return string[]
*/
public function getAddLabelIds()
{
return $this->addLabelIds;
}
/**
* Email address that the message should be forwarded to. This effectively
* redirects the message to the address specified in this field, maintaining
* the original sender in the "From" field.
*
* @param string $forward
*/
public function setForward($forward)
{
$this->forward = $forward;
}
/**
* @return string
*/
public function getForward()
{
return $this->forward;
}
/**
* List of labels to remove from the message.
*
* @param string[] $removeLabelIds
*/
public function setRemoveLabelIds($removeLabelIds)
{
$this->removeLabelIds = $removeLabelIds;
}
/**
* @return string[]
*/
public function getRemoveLabelIds()
{
return $this->removeLabelIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FilterAction::class, 'Google_Service_Gmail_FilterAction');
@@ -0,0 +1,253 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class FilterCriteria extends \Google\Model
{
public const SIZE_COMPARISON_unspecified = 'unspecified';
/**
* Find messages smaller than the given size.
*/
public const SIZE_COMPARISON_smaller = 'smaller';
/**
* Find messages larger than the given size.
*/
public const SIZE_COMPARISON_larger = 'larger';
/**
* Whether the response should exclude chats.
*
* @var bool
*/
public $excludeChats;
/**
* The sender's display name or email address.
*
* @var string
*/
public $from;
/**
* Whether the message has any attachment.
*
* @var bool
*/
public $hasAttachment;
/**
* Only return messages not matching the specified query. Supports the same
* query format as the Gmail search box. For example,
* `"from:someuser@example.com rfc822msgid: is:unread"`.
*
* @var string
*/
public $negatedQuery;
/**
* Only return messages matching the specified query. Supports the same query
* format as the Gmail search box. For example, `"from:someuser@example.com
* rfc822msgid: is:unread"`.
*
* @var string
*/
public $query;
/**
* The size of the entire RFC822 message in bytes, including all headers and
* attachments.
*
* @var int
*/
public $size;
/**
* How the message size in bytes should be in relation to the size field.
*
* @var string
*/
public $sizeComparison;
/**
* Case-insensitive phrase found in the message's subject. Trailing and
* leading whitespace are be trimmed and adjacent spaces are collapsed.
*
* @var string
*/
public $subject;
/**
* The recipient's display name or email address. Includes recipients in the
* "to", "cc", and "bcc" header fields. You can use simply the local part of
* the email address. For example, "example" and "example@" both match
* "example@gmail.com". This field is case-insensitive.
*
* @var string
*/
public $to;
/**
* Whether the response should exclude chats.
*
* @param bool $excludeChats
*/
public function setExcludeChats($excludeChats)
{
$this->excludeChats = $excludeChats;
}
/**
* @return bool
*/
public function getExcludeChats()
{
return $this->excludeChats;
}
/**
* The sender's display name or email address.
*
* @param string $from
*/
public function setFrom($from)
{
$this->from = $from;
}
/**
* @return string
*/
public function getFrom()
{
return $this->from;
}
/**
* Whether the message has any attachment.
*
* @param bool $hasAttachment
*/
public function setHasAttachment($hasAttachment)
{
$this->hasAttachment = $hasAttachment;
}
/**
* @return bool
*/
public function getHasAttachment()
{
return $this->hasAttachment;
}
/**
* Only return messages not matching the specified query. Supports the same
* query format as the Gmail search box. For example,
* `"from:someuser@example.com rfc822msgid: is:unread"`.
*
* @param string $negatedQuery
*/
public function setNegatedQuery($negatedQuery)
{
$this->negatedQuery = $negatedQuery;
}
/**
* @return string
*/
public function getNegatedQuery()
{
return $this->negatedQuery;
}
/**
* Only return messages matching the specified query. Supports the same query
* format as the Gmail search box. For example, `"from:someuser@example.com
* rfc822msgid: is:unread"`.
*
* @param string $query
*/
public function setQuery($query)
{
$this->query = $query;
}
/**
* @return string
*/
public function getQuery()
{
return $this->query;
}
/**
* The size of the entire RFC822 message in bytes, including all headers and
* attachments.
*
* @param int $size
*/
public function setSize($size)
{
$this->size = $size;
}
/**
* @return int
*/
public function getSize()
{
return $this->size;
}
/**
* How the message size in bytes should be in relation to the size field.
*
* Accepted values: unspecified, smaller, larger
*
* @param self::SIZE_COMPARISON_* $sizeComparison
*/
public function setSizeComparison($sizeComparison)
{
$this->sizeComparison = $sizeComparison;
}
/**
* @return self::SIZE_COMPARISON_*
*/
public function getSizeComparison()
{
return $this->sizeComparison;
}
/**
* Case-insensitive phrase found in the message's subject. Trailing and
* leading whitespace are be trimmed and adjacent spaces are collapsed.
*
* @param string $subject
*/
public function setSubject($subject)
{
$this->subject = $subject;
}
/**
* @return string
*/
public function getSubject()
{
return $this->subject;
}
/**
* The recipient's display name or email address. Includes recipients in the
* "to", "cc", and "bcc" header fields. You can use simply the local part of
* the email address. For example, "example" and "example@" both match
* "example@gmail.com". This field is case-insensitive.
*
* @param string $to
*/
public function setTo($to)
{
$this->to = $to;
}
/**
* @return string
*/
public function getTo()
{
return $this->to;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FilterCriteria::class, 'Google_Service_Gmail_FilterCriteria');
@@ -0,0 +1,86 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ForwardingAddress extends \Google\Model
{
/**
* Unspecified verification status.
*/
public const VERIFICATION_STATUS_verificationStatusUnspecified = 'verificationStatusUnspecified';
/**
* The address is ready to use for forwarding.
*/
public const VERIFICATION_STATUS_accepted = 'accepted';
/**
* The address is awaiting verification by the owner.
*/
public const VERIFICATION_STATUS_pending = 'pending';
/**
* An email address to which messages can be forwarded.
*
* @var string
*/
public $forwardingEmail;
/**
* Indicates whether this address has been verified and is usable for
* forwarding. Read-only.
*
* @var string
*/
public $verificationStatus;
/**
* An email address to which messages can be forwarded.
*
* @param string $forwardingEmail
*/
public function setForwardingEmail($forwardingEmail)
{
$this->forwardingEmail = $forwardingEmail;
}
/**
* @return string
*/
public function getForwardingEmail()
{
return $this->forwardingEmail;
}
/**
* Indicates whether this address has been verified and is usable for
* forwarding. Read-only.
*
* Accepted values: verificationStatusUnspecified, accepted, pending
*
* @param self::VERIFICATION_STATUS_* $verificationStatus
*/
public function setVerificationStatus($verificationStatus)
{
$this->verificationStatus = $verificationStatus;
}
/**
* @return self::VERIFICATION_STATUS_*
*/
public function getVerificationStatus()
{
return $this->verificationStatus;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ForwardingAddress::class, 'Google_Service_Gmail_ForwardingAddress');
@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class HardwareKeyMetadata extends \Google\Model
{
/**
* Description about the hardware key.
*
* @var string
*/
public $description;
/**
* Description about the hardware key.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HardwareKeyMetadata::class, 'Google_Service_Gmail_HardwareKeyMetadata');
+141
View File
@@ -0,0 +1,141 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class History extends \Google\Collection
{
protected $collection_key = 'messagesDeleted';
/**
* The mailbox sequence ID.
*
* @var string
*/
public $id;
protected $labelsAddedType = HistoryLabelAdded::class;
protected $labelsAddedDataType = 'array';
protected $labelsRemovedType = HistoryLabelRemoved::class;
protected $labelsRemovedDataType = 'array';
protected $messagesType = Message::class;
protected $messagesDataType = 'array';
protected $messagesAddedType = HistoryMessageAdded::class;
protected $messagesAddedDataType = 'array';
protected $messagesDeletedType = HistoryMessageDeleted::class;
protected $messagesDeletedDataType = 'array';
/**
* The mailbox sequence ID.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Labels added to messages in this history record.
*
* @param HistoryLabelAdded[] $labelsAdded
*/
public function setLabelsAdded($labelsAdded)
{
$this->labelsAdded = $labelsAdded;
}
/**
* @return HistoryLabelAdded[]
*/
public function getLabelsAdded()
{
return $this->labelsAdded;
}
/**
* Labels removed from messages in this history record.
*
* @param HistoryLabelRemoved[] $labelsRemoved
*/
public function setLabelsRemoved($labelsRemoved)
{
$this->labelsRemoved = $labelsRemoved;
}
/**
* @return HistoryLabelRemoved[]
*/
public function getLabelsRemoved()
{
return $this->labelsRemoved;
}
/**
* List of messages changed in this history record. The fields for specific
* change types, such as `messagesAdded` may duplicate messages in this field.
* We recommend using the specific change-type fields instead of this.
*
* @param Message[] $messages
*/
public function setMessages($messages)
{
$this->messages = $messages;
}
/**
* @return Message[]
*/
public function getMessages()
{
return $this->messages;
}
/**
* Messages added to the mailbox in this history record.
*
* @param HistoryMessageAdded[] $messagesAdded
*/
public function setMessagesAdded($messagesAdded)
{
$this->messagesAdded = $messagesAdded;
}
/**
* @return HistoryMessageAdded[]
*/
public function getMessagesAdded()
{
return $this->messagesAdded;
}
/**
* Messages deleted (not Trashed) from the mailbox in this history record.
*
* @param HistoryMessageDeleted[] $messagesDeleted
*/
public function setMessagesDeleted($messagesDeleted)
{
$this->messagesDeleted = $messagesDeleted;
}
/**
* @return HistoryMessageDeleted[]
*/
public function getMessagesDeleted()
{
return $this->messagesDeleted;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(History::class, 'Google_Service_Gmail_History');
@@ -0,0 +1,65 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class HistoryLabelAdded extends \Google\Collection
{
protected $collection_key = 'labelIds';
/**
* Label IDs added to the message.
*
* @var string[]
*/
public $labelIds;
protected $messageType = Message::class;
protected $messageDataType = '';
/**
* Label IDs added to the message.
*
* @param string[] $labelIds
*/
public function setLabelIds($labelIds)
{
$this->labelIds = $labelIds;
}
/**
* @return string[]
*/
public function getLabelIds()
{
return $this->labelIds;
}
/**
* @param Message $message
*/
public function setMessage(Message $message)
{
$this->message = $message;
}
/**
* @return Message
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HistoryLabelAdded::class, 'Google_Service_Gmail_HistoryLabelAdded');
@@ -0,0 +1,65 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class HistoryLabelRemoved extends \Google\Collection
{
protected $collection_key = 'labelIds';
/**
* Label IDs removed from the message.
*
* @var string[]
*/
public $labelIds;
protected $messageType = Message::class;
protected $messageDataType = '';
/**
* Label IDs removed from the message.
*
* @param string[] $labelIds
*/
public function setLabelIds($labelIds)
{
$this->labelIds = $labelIds;
}
/**
* @return string[]
*/
public function getLabelIds()
{
return $this->labelIds;
}
/**
* @param Message $message
*/
public function setMessage(Message $message)
{
$this->message = $message;
}
/**
* @return Message
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HistoryLabelRemoved::class, 'Google_Service_Gmail_HistoryLabelRemoved');
@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class HistoryMessageAdded extends \Google\Model
{
protected $messageType = Message::class;
protected $messageDataType = '';
/**
* @param Message $message
*/
public function setMessage(Message $message)
{
$this->message = $message;
}
/**
* @return Message
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HistoryMessageAdded::class, 'Google_Service_Gmail_HistoryMessageAdded');
@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class HistoryMessageDeleted extends \Google\Model
{
protected $messageType = Message::class;
protected $messageDataType = '';
/**
* @param Message $message
*/
public function setMessage(Message $message)
{
$this->message = $message;
}
/**
* @return Message
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HistoryMessageDeleted::class, 'Google_Service_Gmail_HistoryMessageDeleted');
@@ -0,0 +1,143 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ImapSettings extends \Google\Model
{
/**
* Unspecified behavior.
*/
public const EXPUNGE_BEHAVIOR_expungeBehaviorUnspecified = 'expungeBehaviorUnspecified';
/**
* Archive messages marked as deleted.
*/
public const EXPUNGE_BEHAVIOR_archive = 'archive';
/**
* Move messages marked as deleted to the trash.
*/
public const EXPUNGE_BEHAVIOR_trash = 'trash';
/**
* Immediately and permanently delete messages marked as deleted. The expunged
* messages cannot be recovered.
*/
public const EXPUNGE_BEHAVIOR_deleteForever = 'deleteForever';
/**
* If this value is true, Gmail will immediately expunge a message when it is
* marked as deleted in IMAP. Otherwise, Gmail will wait for an update from
* the client before expunging messages marked as deleted.
*
* @var bool
*/
public $autoExpunge;
/**
* Whether IMAP is enabled for the account.
*
* @var bool
*/
public $enabled;
/**
* The action that will be executed on a message when it is marked as deleted
* and expunged from the last visible IMAP folder.
*
* @var string
*/
public $expungeBehavior;
/**
* An optional limit on the number of messages that an IMAP folder may
* contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is
* interpreted to mean that there is no limit.
*
* @var int
*/
public $maxFolderSize;
/**
* If this value is true, Gmail will immediately expunge a message when it is
* marked as deleted in IMAP. Otherwise, Gmail will wait for an update from
* the client before expunging messages marked as deleted.
*
* @param bool $autoExpunge
*/
public function setAutoExpunge($autoExpunge)
{
$this->autoExpunge = $autoExpunge;
}
/**
* @return bool
*/
public function getAutoExpunge()
{
return $this->autoExpunge;
}
/**
* Whether IMAP is enabled for the account.
*
* @param bool $enabled
*/
public function setEnabled($enabled)
{
$this->enabled = $enabled;
}
/**
* @return bool
*/
public function getEnabled()
{
return $this->enabled;
}
/**
* The action that will be executed on a message when it is marked as deleted
* and expunged from the last visible IMAP folder.
*
* Accepted values: expungeBehaviorUnspecified, archive, trash, deleteForever
*
* @param self::EXPUNGE_BEHAVIOR_* $expungeBehavior
*/
public function setExpungeBehavior($expungeBehavior)
{
$this->expungeBehavior = $expungeBehavior;
}
/**
* @return self::EXPUNGE_BEHAVIOR_*
*/
public function getExpungeBehavior()
{
return $this->expungeBehavior;
}
/**
* An optional limit on the number of messages that an IMAP folder may
* contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is
* interpreted to mean that there is no limit.
*
* @param int $maxFolderSize
*/
public function setMaxFolderSize($maxFolderSize)
{
$this->maxFolderSize = $maxFolderSize;
}
/**
* @return int
*/
public function getMaxFolderSize()
{
return $this->maxFolderSize;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ImapSettings::class, 'Google_Service_Gmail_ImapSettings');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class KaclsKeyMetadata extends \Google\Model
{
/**
* Opaque data generated and used by the key access control list service.
* Maximum size: 8 KiB.
*
* @var string
*/
public $kaclsData;
/**
* The URI of the key access control list service that manages the private
* key.
*
* @var string
*/
public $kaclsUri;
/**
* Opaque data generated and used by the key access control list service.
* Maximum size: 8 KiB.
*
* @param string $kaclsData
*/
public function setKaclsData($kaclsData)
{
$this->kaclsData = $kaclsData;
}
/**
* @return string
*/
public function getKaclsData()
{
return $this->kaclsData;
}
/**
* The URI of the key access control list service that manages the private
* key.
*
* @param string $kaclsUri
*/
public function setKaclsUri($kaclsUri)
{
$this->kaclsUri = $kaclsUri;
}
/**
* @return string
*/
public function getKaclsUri()
{
return $this->kaclsUri;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KaclsKeyMetadata::class, 'Google_Service_Gmail_KaclsKeyMetadata');
+293
View File
@@ -0,0 +1,293 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class Label extends \Google\Model
{
/**
* Show the label in the label list.
*/
public const LABEL_LIST_VISIBILITY_labelShow = 'labelShow';
/**
* Show the label if there are any unread messages with that label.
*/
public const LABEL_LIST_VISIBILITY_labelShowIfUnread = 'labelShowIfUnread';
/**
* Do not show the label in the label list.
*/
public const LABEL_LIST_VISIBILITY_labelHide = 'labelHide';
/**
* Show the label in the message list.
*/
public const MESSAGE_LIST_VISIBILITY_show = 'show';
/**
* Do not show the label in the message list.
*/
public const MESSAGE_LIST_VISIBILITY_hide = 'hide';
/**
* Labels created by Gmail.
*/
public const TYPE_system = 'system';
/**
* Custom labels created by the user or application.
*/
public const TYPE_user = 'user';
protected $colorType = LabelColor::class;
protected $colorDataType = '';
/**
* The immutable ID of the label.
*
* @var string
*/
public $id;
/**
* The visibility of the label in the label list in the Gmail web interface.
*
* @var string
*/
public $labelListVisibility;
/**
* The visibility of messages with this label in the message list in the Gmail
* web interface.
*
* @var string
*/
public $messageListVisibility;
/**
* The total number of messages with the label.
*
* @var int
*/
public $messagesTotal;
/**
* The number of unread messages with the label.
*
* @var int
*/
public $messagesUnread;
/**
* The display name of the label.
*
* @var string
*/
public $name;
/**
* The total number of threads with the label.
*
* @var int
*/
public $threadsTotal;
/**
* The number of unread threads with the label.
*
* @var int
*/
public $threadsUnread;
/**
* The owner type for the label. User labels are created by the user and can
* be modified and deleted by the user and can be applied to any message or
* thread. System labels are internally created and cannot be added, modified,
* or deleted. System labels may be able to be applied to or removed from
* messages and threads under some circumstances but this is not guaranteed.
* For example, users can apply and remove the `INBOX` and `UNREAD` labels
* from messages and threads, but cannot apply or remove the `DRAFTS` or
* `SENT` labels from messages or threads.
*
* @var string
*/
public $type;
/**
* The color to assign to the label. Color is only available for labels that
* have their `type` set to `user`.
*
* @param LabelColor $color
*/
public function setColor(LabelColor $color)
{
$this->color = $color;
}
/**
* @return LabelColor
*/
public function getColor()
{
return $this->color;
}
/**
* The immutable ID of the label.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* The visibility of the label in the label list in the Gmail web interface.
*
* Accepted values: labelShow, labelShowIfUnread, labelHide
*
* @param self::LABEL_LIST_VISIBILITY_* $labelListVisibility
*/
public function setLabelListVisibility($labelListVisibility)
{
$this->labelListVisibility = $labelListVisibility;
}
/**
* @return self::LABEL_LIST_VISIBILITY_*
*/
public function getLabelListVisibility()
{
return $this->labelListVisibility;
}
/**
* The visibility of messages with this label in the message list in the Gmail
* web interface.
*
* Accepted values: show, hide
*
* @param self::MESSAGE_LIST_VISIBILITY_* $messageListVisibility
*/
public function setMessageListVisibility($messageListVisibility)
{
$this->messageListVisibility = $messageListVisibility;
}
/**
* @return self::MESSAGE_LIST_VISIBILITY_*
*/
public function getMessageListVisibility()
{
return $this->messageListVisibility;
}
/**
* The total number of messages with the label.
*
* @param int $messagesTotal
*/
public function setMessagesTotal($messagesTotal)
{
$this->messagesTotal = $messagesTotal;
}
/**
* @return int
*/
public function getMessagesTotal()
{
return $this->messagesTotal;
}
/**
* The number of unread messages with the label.
*
* @param int $messagesUnread
*/
public function setMessagesUnread($messagesUnread)
{
$this->messagesUnread = $messagesUnread;
}
/**
* @return int
*/
public function getMessagesUnread()
{
return $this->messagesUnread;
}
/**
* The display name of the label.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The total number of threads with the label.
*
* @param int $threadsTotal
*/
public function setThreadsTotal($threadsTotal)
{
$this->threadsTotal = $threadsTotal;
}
/**
* @return int
*/
public function getThreadsTotal()
{
return $this->threadsTotal;
}
/**
* The number of unread threads with the label.
*
* @param int $threadsUnread
*/
public function setThreadsUnread($threadsUnread)
{
$this->threadsUnread = $threadsUnread;
}
/**
* @return int
*/
public function getThreadsUnread()
{
return $this->threadsUnread;
}
/**
* The owner type for the label. User labels are created by the user and can
* be modified and deleted by the user and can be applied to any message or
* thread. System labels are internally created and cannot be added, modified,
* or deleted. System labels may be able to be applied to or removed from
* messages and threads under some circumstances but this is not guaranteed.
* For example, users can apply and remove the `INBOX` and `UNREAD` labels
* from messages and threads, but cannot apply or remove the `DRAFTS` or
* `SENT` labels from messages or threads.
*
* Accepted values: system, user
*
* @param self::TYPE_* $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return self::TYPE_*
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Label::class, 'Google_Service_Gmail_Label');
@@ -0,0 +1,130 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class LabelColor extends \Google\Model
{
/**
* The background color represented as hex string #RRGGBB (ex #000000). This
* field is required in order to set the color of a label. Only the following
* predefined set of color values are allowed: \#000000, #434343, #666666,
* #999999, #cccccc, #efefef, #f3f3f3, #ffffff, \#fb4c2f, #ffad47, #fad165,
* #16a766, #43d692, #4a86e8, #a479e2, #f691b3, \#f6c5be, #ffe6c7, #fef1d1,
* #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, \#efa093, #ffd6a2, #fce8b3,
* #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, \#e66550, #ffbc6b, #fcda83,
* #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, \#cc3a21, #eaa041, #f2c960,
* #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, \#ac2b16, #cf8933, #d5ae49,
* #0b804b, #2a9c68, #285bac, #653e9b, #b65775, \#822111, #a46a21, #aa8831,
* #076239, #1a764d, #1c4587, #41236d, #83334c, \#464646, #e7e7e7, #0d3472,
* #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, \#711a36, #fbd3e0, #8a1c0a,
* #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, \#594c05, #fbe983, #684e07,
* #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, \#c2c2c2, #4986e7, #2da2bb,
* #b99aff, #994a64, #f691b2, #ff7537, #ffad46, \#662e37, #ebdbde, #cca6ac,
* #094228, #42d692, #16a765
*
* @var string
*/
public $backgroundColor;
/**
* The text color of the label, represented as hex string. This field is
* required in order to set the color of a label. Only the following
* predefined set of color values are allowed: \#000000, #434343, #666666,
* #999999, #cccccc, #efefef, #f3f3f3, #ffffff, \#fb4c2f, #ffad47, #fad165,
* #16a766, #43d692, #4a86e8, #a479e2, #f691b3, \#f6c5be, #ffe6c7, #fef1d1,
* #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, \#efa093, #ffd6a2, #fce8b3,
* #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, \#e66550, #ffbc6b, #fcda83,
* #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, \#cc3a21, #eaa041, #f2c960,
* #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, \#ac2b16, #cf8933, #d5ae49,
* #0b804b, #2a9c68, #285bac, #653e9b, #b65775, \#822111, #a46a21, #aa8831,
* #076239, #1a764d, #1c4587, #41236d, #83334c, \#464646, #e7e7e7, #0d3472,
* #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, \#711a36, #fbd3e0, #8a1c0a,
* #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, \#594c05, #fbe983, #684e07,
* #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, \#c2c2c2, #4986e7, #2da2bb,
* #b99aff, #994a64, #f691b2, #ff7537, #ffad46, \#662e37, #ebdbde, #cca6ac,
* #094228, #42d692, #16a765
*
* @var string
*/
public $textColor;
/**
* The background color represented as hex string #RRGGBB (ex #000000). This
* field is required in order to set the color of a label. Only the following
* predefined set of color values are allowed: \#000000, #434343, #666666,
* #999999, #cccccc, #efefef, #f3f3f3, #ffffff, \#fb4c2f, #ffad47, #fad165,
* #16a766, #43d692, #4a86e8, #a479e2, #f691b3, \#f6c5be, #ffe6c7, #fef1d1,
* #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, \#efa093, #ffd6a2, #fce8b3,
* #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, \#e66550, #ffbc6b, #fcda83,
* #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, \#cc3a21, #eaa041, #f2c960,
* #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, \#ac2b16, #cf8933, #d5ae49,
* #0b804b, #2a9c68, #285bac, #653e9b, #b65775, \#822111, #a46a21, #aa8831,
* #076239, #1a764d, #1c4587, #41236d, #83334c, \#464646, #e7e7e7, #0d3472,
* #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, \#711a36, #fbd3e0, #8a1c0a,
* #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, \#594c05, #fbe983, #684e07,
* #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, \#c2c2c2, #4986e7, #2da2bb,
* #b99aff, #994a64, #f691b2, #ff7537, #ffad46, \#662e37, #ebdbde, #cca6ac,
* #094228, #42d692, #16a765
*
* @param string $backgroundColor
*/
public function setBackgroundColor($backgroundColor)
{
$this->backgroundColor = $backgroundColor;
}
/**
* @return string
*/
public function getBackgroundColor()
{
return $this->backgroundColor;
}
/**
* The text color of the label, represented as hex string. This field is
* required in order to set the color of a label. Only the following
* predefined set of color values are allowed: \#000000, #434343, #666666,
* #999999, #cccccc, #efefef, #f3f3f3, #ffffff, \#fb4c2f, #ffad47, #fad165,
* #16a766, #43d692, #4a86e8, #a479e2, #f691b3, \#f6c5be, #ffe6c7, #fef1d1,
* #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, \#efa093, #ffd6a2, #fce8b3,
* #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, \#e66550, #ffbc6b, #fcda83,
* #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, \#cc3a21, #eaa041, #f2c960,
* #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, \#ac2b16, #cf8933, #d5ae49,
* #0b804b, #2a9c68, #285bac, #653e9b, #b65775, \#822111, #a46a21, #aa8831,
* #076239, #1a764d, #1c4587, #41236d, #83334c, \#464646, #e7e7e7, #0d3472,
* #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, \#711a36, #fbd3e0, #8a1c0a,
* #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, \#594c05, #fbe983, #684e07,
* #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, \#c2c2c2, #4986e7, #2da2bb,
* #b99aff, #994a64, #f691b2, #ff7537, #ffad46, \#662e37, #ebdbde, #cca6ac,
* #094228, #42d692, #16a765
*
* @param string $textColor
*/
public function setTextColor($textColor)
{
$this->textColor = $textColor;
}
/**
* @return string
*/
public function getTextColor()
{
return $this->textColor;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LabelColor::class, 'Google_Service_Gmail_LabelColor');
@@ -0,0 +1,68 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class LanguageSettings extends \Google\Model
{
/**
* The language to display Gmail in, formatted as an RFC 3066 Language Tag
* (for example `en-GB`, `fr` or `ja` for British English, French, or Japanese
* respectively). The set of languages supported by Gmail evolves over time,
* so please refer to the "Language" dropdown in the Gmail settings for all
* available options, as described in the language settings help article. For
* a table of sample values, see [Manage language settings](https://developers
* .google.com/workspace/gmail/api/guides/language-settings). Not all Gmail
* clients can display the same set of languages. In the case that a user's
* display language is not available for use on a particular client, said
* client automatically chooses to display in the closest supported variant
* (or a reasonable default).
*
* @var string
*/
public $displayLanguage;
/**
* The language to display Gmail in, formatted as an RFC 3066 Language Tag
* (for example `en-GB`, `fr` or `ja` for British English, French, or Japanese
* respectively). The set of languages supported by Gmail evolves over time,
* so please refer to the "Language" dropdown in the Gmail settings for all
* available options, as described in the language settings help article. For
* a table of sample values, see [Manage language settings](https://developers
* .google.com/workspace/gmail/api/guides/language-settings). Not all Gmail
* clients can display the same set of languages. In the case that a user's
* display language is not available for use on a particular client, said
* client automatically chooses to display in the closest supported variant
* (or a reasonable default).
*
* @param string $displayLanguage
*/
public function setDisplayLanguage($displayLanguage)
{
$this->displayLanguage = $displayLanguage;
}
/**
* @return string
*/
public function getDisplayLanguage()
{
return $this->displayLanguage;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LanguageSettings::class, 'Google_Service_Gmail_LanguageSettings');
@@ -0,0 +1,71 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListCseIdentitiesResponse extends \Google\Collection
{
protected $collection_key = 'cseIdentities';
protected $cseIdentitiesType = CseIdentity::class;
protected $cseIdentitiesDataType = 'array';
/**
* Pagination token to be passed to a subsequent ListCseIdentities call in
* order to retrieve the next page of identities. If this value is not
* returned or is the empty string, then no further pages remain.
*
* @var string
*/
public $nextPageToken;
/**
* One page of the list of CSE identities configured for the user.
*
* @param CseIdentity[] $cseIdentities
*/
public function setCseIdentities($cseIdentities)
{
$this->cseIdentities = $cseIdentities;
}
/**
* @return CseIdentity[]
*/
public function getCseIdentities()
{
return $this->cseIdentities;
}
/**
* Pagination token to be passed to a subsequent ListCseIdentities call in
* order to retrieve the next page of identities. If this value is not
* returned or is the empty string, then no further pages remain.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCseIdentitiesResponse::class, 'Google_Service_Gmail_ListCseIdentitiesResponse');
@@ -0,0 +1,71 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListCseKeyPairsResponse extends \Google\Collection
{
protected $collection_key = 'cseKeyPairs';
protected $cseKeyPairsType = CseKeyPair::class;
protected $cseKeyPairsDataType = 'array';
/**
* Pagination token to be passed to a subsequent ListCseKeyPairs call in order
* to retrieve the next page of key pairs. If this value is not returned, then
* no further pages remain.
*
* @var string
*/
public $nextPageToken;
/**
* One page of the list of CSE key pairs installed for the user.
*
* @param CseKeyPair[] $cseKeyPairs
*/
public function setCseKeyPairs($cseKeyPairs)
{
$this->cseKeyPairs = $cseKeyPairs;
}
/**
* @return CseKeyPair[]
*/
public function getCseKeyPairs()
{
return $this->cseKeyPairs;
}
/**
* Pagination token to be passed to a subsequent ListCseKeyPairs call in order
* to retrieve the next page of key pairs. If this value is not returned, then
* no further pages remain.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCseKeyPairsResponse::class, 'Google_Service_Gmail_ListCseKeyPairsResponse');
@@ -0,0 +1,46 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListDelegatesResponse extends \Google\Collection
{
protected $collection_key = 'delegates';
protected $delegatesType = Delegate::class;
protected $delegatesDataType = 'array';
/**
* List of the user's delegates (with any verification status). If an account
* doesn't have delegates, this field doesn't appear.
*
* @param Delegate[] $delegates
*/
public function setDelegates($delegates)
{
$this->delegates = $delegates;
}
/**
* @return Delegate[]
*/
public function getDelegates()
{
return $this->delegates;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListDelegatesResponse::class, 'Google_Service_Gmail_ListDelegatesResponse');
@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListDraftsResponse extends \Google\Collection
{
protected $collection_key = 'drafts';
protected $draftsType = Draft::class;
protected $draftsDataType = 'array';
/**
* Token to retrieve the next page of results in the list.
*
* @var string
*/
public $nextPageToken;
/**
* Estimated total number of results.
*
* @var string
*/
public $resultSizeEstimate;
/**
* List of drafts. Note that the `Message` property in each `Draft` resource
* only contains an `id` and a `threadId`. The [`messages.get`](https://develo
* pers.google.com/workspace/gmail/api/v1/reference/users/messages/get) method
* can fetch additional message details.
*
* @param Draft[] $drafts
*/
public function setDrafts($drafts)
{
$this->drafts = $drafts;
}
/**
* @return Draft[]
*/
public function getDrafts()
{
return $this->drafts;
}
/**
* Token to retrieve the next page of results in the list.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* Estimated total number of results.
*
* @param string $resultSizeEstimate
*/
public function setResultSizeEstimate($resultSizeEstimate)
{
$this->resultSizeEstimate = $resultSizeEstimate;
}
/**
* @return string
*/
public function getResultSizeEstimate()
{
return $this->resultSizeEstimate;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListDraftsResponse::class, 'Google_Service_Gmail_ListDraftsResponse');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListFiltersResponse extends \Google\Collection
{
protected $collection_key = 'filter';
protected $filterType = Filter::class;
protected $filterDataType = 'array';
/**
* List of a user's filters.
*
* @param Filter[] $filter
*/
public function setFilter($filter)
{
$this->filter = $filter;
}
/**
* @return Filter[]
*/
public function getFilter()
{
return $this->filter;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListFiltersResponse::class, 'Google_Service_Gmail_ListFiltersResponse');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListForwardingAddressesResponse extends \Google\Collection
{
protected $collection_key = 'forwardingAddresses';
protected $forwardingAddressesType = ForwardingAddress::class;
protected $forwardingAddressesDataType = 'array';
/**
* List of addresses that may be used for forwarding.
*
* @param ForwardingAddress[] $forwardingAddresses
*/
public function setForwardingAddresses($forwardingAddresses)
{
$this->forwardingAddresses = $forwardingAddresses;
}
/**
* @return ForwardingAddress[]
*/
public function getForwardingAddresses()
{
return $this->forwardingAddresses;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListForwardingAddressesResponse::class, 'Google_Service_Gmail_ListForwardingAddressesResponse');
@@ -0,0 +1,90 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListHistoryResponse extends \Google\Collection
{
protected $collection_key = 'history';
protected $historyType = History::class;
protected $historyDataType = 'array';
/**
* The ID of the mailbox's current history record.
*
* @var string
*/
public $historyId;
/**
* Page token to retrieve the next page of results in the list.
*
* @var string
*/
public $nextPageToken;
/**
* List of history records. Any `messages` contained in the response will
* typically only have `id` and `threadId` fields populated.
*
* @param History[] $history
*/
public function setHistory($history)
{
$this->history = $history;
}
/**
* @return History[]
*/
public function getHistory()
{
return $this->history;
}
/**
* The ID of the mailbox's current history record.
*
* @param string $historyId
*/
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
/**
* @return string
*/
public function getHistoryId()
{
return $this->historyId;
}
/**
* Page token to retrieve the next page of results in the list.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListHistoryResponse::class, 'Google_Service_Gmail_ListHistoryResponse');
@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListLabelsResponse extends \Google\Collection
{
protected $collection_key = 'labels';
protected $labelsType = Label::class;
protected $labelsDataType = 'array';
/**
* List of labels. Note that each label resource only contains an `id`,
* `name`, `messageListVisibility`, `labelListVisibility`, and `type`. The [`l
* abels.get`](https://developers.google.com/workspace/gmail/api/v1/reference/
* users/labels/get) method can fetch additional label details.
*
* @param Label[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return Label[]
*/
public function getLabels()
{
return $this->labels;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListLabelsResponse::class, 'Google_Service_Gmail_ListLabelsResponse');
@@ -0,0 +1,91 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListMessagesResponse extends \Google\Collection
{
protected $collection_key = 'messages';
protected $messagesType = Message::class;
protected $messagesDataType = 'array';
/**
* Token to retrieve the next page of results in the list.
*
* @var string
*/
public $nextPageToken;
/**
* Estimated total number of results.
*
* @var string
*/
public $resultSizeEstimate;
/**
* List of messages. Note that each message resource contains only an `id` and
* a `threadId`. Additional message details can be fetched using the
* messages.get method.
*
* @param Message[] $messages
*/
public function setMessages($messages)
{
$this->messages = $messages;
}
/**
* @return Message[]
*/
public function getMessages()
{
return $this->messages;
}
/**
* Token to retrieve the next page of results in the list.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* Estimated total number of results.
*
* @param string $resultSizeEstimate
*/
public function setResultSizeEstimate($resultSizeEstimate)
{
$this->resultSizeEstimate = $resultSizeEstimate;
}
/**
* @return string
*/
public function getResultSizeEstimate()
{
return $this->resultSizeEstimate;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListMessagesResponse::class, 'Google_Service_Gmail_ListMessagesResponse');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListSendAsResponse extends \Google\Collection
{
protected $collection_key = 'sendAs';
protected $sendAsType = SendAs::class;
protected $sendAsDataType = 'array';
/**
* List of send-as aliases.
*
* @param SendAs[] $sendAs
*/
public function setSendAs($sendAs)
{
$this->sendAs = $sendAs;
}
/**
* @return SendAs[]
*/
public function getSendAs()
{
return $this->sendAs;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListSendAsResponse::class, 'Google_Service_Gmail_ListSendAsResponse');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListSmimeInfoResponse extends \Google\Collection
{
protected $collection_key = 'smimeInfo';
protected $smimeInfoType = SmimeInfo::class;
protected $smimeInfoDataType = 'array';
/**
* List of SmimeInfo.
*
* @param SmimeInfo[] $smimeInfo
*/
public function setSmimeInfo($smimeInfo)
{
$this->smimeInfo = $smimeInfo;
}
/**
* @return SmimeInfo[]
*/
public function getSmimeInfo()
{
return $this->smimeInfo;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListSmimeInfoResponse::class, 'Google_Service_Gmail_ListSmimeInfoResponse');
@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ListThreadsResponse extends \Google\Collection
{
protected $collection_key = 'threads';
/**
* Page token to retrieve the next page of results in the list.
*
* @var string
*/
public $nextPageToken;
/**
* Estimated total number of results.
*
* @var string
*/
public $resultSizeEstimate;
protected $threadsType = Thread::class;
protected $threadsDataType = 'array';
/**
* Page token to retrieve the next page of results in the list.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* Estimated total number of results.
*
* @param string $resultSizeEstimate
*/
public function setResultSizeEstimate($resultSizeEstimate)
{
$this->resultSizeEstimate = $resultSizeEstimate;
}
/**
* @return string
*/
public function getResultSizeEstimate()
{
return $this->resultSizeEstimate;
}
/**
* List of threads. Note that each thread resource does not contain a list of
* `messages`. The list of `messages` for a given thread can be fetched using
* the [`threads.get`](https://developers.google.com/workspace/gmail/api/v1/re
* ference/users/threads/get) method.
*
* @param Thread[] $threads
*/
public function setThreads($threads)
{
$this->threads = $threads;
}
/**
* @return Thread[]
*/
public function getThreads()
{
return $this->threads;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListThreadsResponse::class, 'Google_Service_Gmail_ListThreadsResponse');
+267
View File
@@ -0,0 +1,267 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class Message extends \Google\Collection
{
protected $collection_key = 'labelIds';
protected $classificationLabelValuesType = ClassificationLabelValue::class;
protected $classificationLabelValuesDataType = 'array';
/**
* The ID of the last history record that modified this message.
*
* @var string
*/
public $historyId;
/**
* The immutable ID of the message.
*
* @var string
*/
public $id;
/**
* The internal message creation timestamp (epoch ms), which determines
* ordering in the inbox. For normal SMTP-received email, this represents the
* time the message was originally accepted by Google, which is more reliable
* than the `Date` header. However, for API-migrated mail, it can be
* configured by client to be based on the `Date` header.
*
* @var string
*/
public $internalDate;
/**
* List of IDs of labels applied to this message.
*
* @var string[]
*/
public $labelIds;
protected $payloadType = MessagePart::class;
protected $payloadDataType = '';
/**
* The entire email message in an RFC 2822 formatted and base64url encoded
* string. Returned in `messages.get` and `drafts.get` responses when the
* `format=RAW` parameter is supplied.
*
* @var string
*/
public $raw;
/**
* Estimated size in bytes of the message.
*
* @var int
*/
public $sizeEstimate;
/**
* A short part of the message text.
*
* @var string
*/
public $snippet;
/**
* The ID of the thread the message belongs to. To add a message or draft to a
* thread, the following criteria must be met: 1. The requested `threadId`
* must be specified on the `Message` or `Draft.Message` you supply with your
* request. 2. The `References` and `In-Reply-To` headers must be set in
* compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822)
* standard. 3. The `Subject` headers must match.
*
* @var string
*/
public $threadId;
/**
* Classification Label values on the message. Available Classification Label
* schemas can be queried using the Google Drive Labels API. Each
* classification label ID must be unique. If duplicate IDs are provided, only
* one will be retained, and the selection is arbitrary. Only used for Google
* Workspace accounts. There's a limit of 20 Classification Label values per
* request. If the Classification Label values exceeds the maximum allowed
* number, the request fails.
*
* @param ClassificationLabelValue[] $classificationLabelValues
*/
public function setClassificationLabelValues($classificationLabelValues)
{
$this->classificationLabelValues = $classificationLabelValues;
}
/**
* @return ClassificationLabelValue[]
*/
public function getClassificationLabelValues()
{
return $this->classificationLabelValues;
}
/**
* The ID of the last history record that modified this message.
*
* @param string $historyId
*/
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
/**
* @return string
*/
public function getHistoryId()
{
return $this->historyId;
}
/**
* The immutable ID of the message.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* The internal message creation timestamp (epoch ms), which determines
* ordering in the inbox. For normal SMTP-received email, this represents the
* time the message was originally accepted by Google, which is more reliable
* than the `Date` header. However, for API-migrated mail, it can be
* configured by client to be based on the `Date` header.
*
* @param string $internalDate
*/
public function setInternalDate($internalDate)
{
$this->internalDate = $internalDate;
}
/**
* @return string
*/
public function getInternalDate()
{
return $this->internalDate;
}
/**
* List of IDs of labels applied to this message.
*
* @param string[] $labelIds
*/
public function setLabelIds($labelIds)
{
$this->labelIds = $labelIds;
}
/**
* @return string[]
*/
public function getLabelIds()
{
return $this->labelIds;
}
/**
* The parsed email structure in the message parts.
*
* @param MessagePart $payload
*/
public function setPayload(MessagePart $payload)
{
$this->payload = $payload;
}
/**
* @return MessagePart
*/
public function getPayload()
{
return $this->payload;
}
/**
* The entire email message in an RFC 2822 formatted and base64url encoded
* string. Returned in `messages.get` and `drafts.get` responses when the
* `format=RAW` parameter is supplied.
*
* @param string $raw
*/
public function setRaw($raw)
{
$this->raw = $raw;
}
/**
* @return string
*/
public function getRaw()
{
return $this->raw;
}
/**
* Estimated size in bytes of the message.
*
* @param int $sizeEstimate
*/
public function setSizeEstimate($sizeEstimate)
{
$this->sizeEstimate = $sizeEstimate;
}
/**
* @return int
*/
public function getSizeEstimate()
{
return $this->sizeEstimate;
}
/**
* A short part of the message text.
*
* @param string $snippet
*/
public function setSnippet($snippet)
{
$this->snippet = $snippet;
}
/**
* @return string
*/
public function getSnippet()
{
return $this->snippet;
}
/**
* The ID of the thread the message belongs to. To add a message or draft to a
* thread, the following criteria must be met: 1. The requested `threadId`
* must be specified on the `Message` or `Draft.Message` you supply with your
* request. 2. The `References` and `In-Reply-To` headers must be set in
* compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822)
* standard. 3. The `Subject` headers must match.
*
* @param string $threadId
*/
public function setThreadId($threadId)
{
$this->threadId = $threadId;
}
/**
* @return string
*/
public function getThreadId()
{
return $this->threadId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Message::class, 'Google_Service_Gmail_Message');
@@ -0,0 +1,155 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class MessagePart extends \Google\Collection
{
protected $collection_key = 'parts';
protected $bodyType = MessagePartBody::class;
protected $bodyDataType = '';
/**
* The filename of the attachment. Only present if this message part
* represents an attachment.
*
* @var string
*/
public $filename;
protected $headersType = MessagePartHeader::class;
protected $headersDataType = 'array';
/**
* The MIME type of the message part.
*
* @var string
*/
public $mimeType;
/**
* The immutable ID of the message part.
*
* @var string
*/
public $partId;
protected $partsType = MessagePart::class;
protected $partsDataType = 'array';
/**
* The message part body for this part, which may be empty for container MIME
* message parts.
*
* @param MessagePartBody $body
*/
public function setBody(MessagePartBody $body)
{
$this->body = $body;
}
/**
* @return MessagePartBody
*/
public function getBody()
{
return $this->body;
}
/**
* The filename of the attachment. Only present if this message part
* represents an attachment.
*
* @param string $filename
*/
public function setFilename($filename)
{
$this->filename = $filename;
}
/**
* @return string
*/
public function getFilename()
{
return $this->filename;
}
/**
* List of headers on this message part. For the top-level message part,
* representing the entire message payload, it will contain the standard RFC
* 2822 email headers such as `To`, `From`, and `Subject`.
*
* @param MessagePartHeader[] $headers
*/
public function setHeaders($headers)
{
$this->headers = $headers;
}
/**
* @return MessagePartHeader[]
*/
public function getHeaders()
{
return $this->headers;
}
/**
* The MIME type of the message part.
*
* @param string $mimeType
*/
public function setMimeType($mimeType)
{
$this->mimeType = $mimeType;
}
/**
* @return string
*/
public function getMimeType()
{
return $this->mimeType;
}
/**
* The immutable ID of the message part.
*
* @param string $partId
*/
public function setPartId($partId)
{
$this->partId = $partId;
}
/**
* @return string
*/
public function getPartId()
{
return $this->partId;
}
/**
* The child MIME message parts of this part. This only applies to container
* MIME message parts, for example `multipart`. For non- container MIME
* message part types, such as `text/plain`, this field is empty. For more
* information, see RFC 1521.
*
* @param MessagePart[] $parts
*/
public function setParts($parts)
{
$this->parts = $parts;
}
/**
* @return MessagePart[]
*/
public function getParts()
{
return $this->parts;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MessagePart::class, 'Google_Service_Gmail_MessagePart');
@@ -0,0 +1,104 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class MessagePartBody extends \Google\Model
{
/**
* When present, contains the ID of an external attachment that can be
* retrieved in a separate `messages.attachments.get` request. When not
* present, the entire content of the message part body is contained in the
* data field.
*
* @var string
*/
public $attachmentId;
/**
* The body data of a MIME message part as a base64url encoded string. May be
* empty for MIME container types that have no message body or when the body
* data is sent as a separate attachment. An attachment ID is present if the
* body data is contained in a separate attachment.
*
* @var string
*/
public $data;
/**
* Number of bytes for the message part data (encoding notwithstanding).
*
* @var int
*/
public $size;
/**
* When present, contains the ID of an external attachment that can be
* retrieved in a separate `messages.attachments.get` request. When not
* present, the entire content of the message part body is contained in the
* data field.
*
* @param string $attachmentId
*/
public function setAttachmentId($attachmentId)
{
$this->attachmentId = $attachmentId;
}
/**
* @return string
*/
public function getAttachmentId()
{
return $this->attachmentId;
}
/**
* The body data of a MIME message part as a base64url encoded string. May be
* empty for MIME container types that have no message body or when the body
* data is sent as a separate attachment. An attachment ID is present if the
* body data is contained in a separate attachment.
*
* @param string $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* Number of bytes for the message part data (encoding notwithstanding).
*
* @param int $size
*/
public function setSize($size)
{
$this->size = $size;
}
/**
* @return int
*/
public function getSize()
{
return $this->size;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MessagePartBody::class, 'Google_Service_Gmail_MessagePartBody');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class MessagePartHeader extends \Google\Model
{
/**
* The name of the header before the `:` separator. For example, `To`.
*
* @var string
*/
public $name;
/**
* The value of the header after the `:` separator. For example,
* `someuser@example.com`.
*
* @var string
*/
public $value;
/**
* The name of the header before the `:` separator. For example, `To`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The value of the header after the `:` separator. For example,
* `someuser@example.com`.
*
* @param string $value
*/
public function setValue($value)
{
$this->value = $value;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MessagePartHeader::class, 'Google_Service_Gmail_MessagePartHeader');
@@ -0,0 +1,121 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ModifyMessageRequest extends \Google\Collection
{
protected $collection_key = 'removeLabelIds';
protected $addClassificationLabelsType = ClassificationLabelValue::class;
protected $addClassificationLabelsDataType = 'array';
/**
* A list of IDs of labels to add to this message. You can add up to 100
* labels with each update.
*
* @var string[]
*/
public $addLabelIds;
/**
* A list of Classification Label values to remove from this message.
*
* @var string[]
*/
public $removeClassificationLabelIds;
/**
* A list IDs of labels to remove from this message. You can remove up to 100
* labels with each update.
*
* @var string[]
*/
public $removeLabelIds;
/**
* A list of classification label values to add. If a Classification Label
* with the same label ID is already applied to the message, fields with
* existing field IDs will be updated and fields with new field IDs will be
* added. There's a limit of 20 Classification Label values per request. If
* the message is already classified and the final total number of
* Classification Label values exceeds the maximum allowed number of
* Classification Label values per message, the modification fails.
*
* @param ClassificationLabelValue[] $addClassificationLabels
*/
public function setAddClassificationLabels($addClassificationLabels)
{
$this->addClassificationLabels = $addClassificationLabels;
}
/**
* @return ClassificationLabelValue[]
*/
public function getAddClassificationLabels()
{
return $this->addClassificationLabels;
}
/**
* A list of IDs of labels to add to this message. You can add up to 100
* labels with each update.
*
* @param string[] $addLabelIds
*/
public function setAddLabelIds($addLabelIds)
{
$this->addLabelIds = $addLabelIds;
}
/**
* @return string[]
*/
public function getAddLabelIds()
{
return $this->addLabelIds;
}
/**
* A list of Classification Label values to remove from this message.
*
* @param string[] $removeClassificationLabelIds
*/
public function setRemoveClassificationLabelIds($removeClassificationLabelIds)
{
$this->removeClassificationLabelIds = $removeClassificationLabelIds;
}
/**
* @return string[]
*/
public function getRemoveClassificationLabelIds()
{
return $this->removeClassificationLabelIds;
}
/**
* A list IDs of labels to remove from this message. You can remove up to 100
* labels with each update.
*
* @param string[] $removeLabelIds
*/
public function setRemoveLabelIds($removeLabelIds)
{
$this->removeLabelIds = $removeLabelIds;
}
/**
* @return string[]
*/
public function getRemoveLabelIds()
{
return $this->removeLabelIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ModifyMessageRequest::class, 'Google_Service_Gmail_ModifyMessageRequest');
@@ -0,0 +1,75 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ModifyThreadRequest extends \Google\Collection
{
protected $collection_key = 'removeLabelIds';
/**
* A list of IDs of labels to add to this thread. You can add up to 100 labels
* with each update.
*
* @var string[]
*/
public $addLabelIds;
/**
* A list of IDs of labels to remove from this thread. You can remove up to
* 100 labels with each update.
*
* @var string[]
*/
public $removeLabelIds;
/**
* A list of IDs of labels to add to this thread. You can add up to 100 labels
* with each update.
*
* @param string[] $addLabelIds
*/
public function setAddLabelIds($addLabelIds)
{
$this->addLabelIds = $addLabelIds;
}
/**
* @return string[]
*/
public function getAddLabelIds()
{
return $this->addLabelIds;
}
/**
* A list of IDs of labels to remove from this thread. You can remove up to
* 100 labels with each update.
*
* @param string[] $removeLabelIds
*/
public function setRemoveLabelIds($removeLabelIds)
{
$this->removeLabelIds = $removeLabelIds;
}
/**
* @return string[]
*/
public function getRemoveLabelIds()
{
return $this->removeLabelIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ModifyThreadRequest::class, 'Google_Service_Gmail_ModifyThreadRequest');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class ObliterateCseKeyPairRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ObliterateCseKeyPairRequest::class, 'Google_Service_Gmail_ObliterateCseKeyPairRequest');
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class PivKeyMetadata extends \Google\Model
{
/**
* @var string
*/
public $description;
/**
* @param string
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PivKeyMetadata::class, 'Google_Service_Gmail_PivKeyMetadata');
@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class PopSettings extends \Google\Model
{
/**
* Unspecified range.
*/
public const ACCESS_WINDOW_accessWindowUnspecified = 'accessWindowUnspecified';
/**
* Indicates that no messages are accessible via POP.
*/
public const ACCESS_WINDOW_disabled = 'disabled';
/**
* Indicates that unfetched messages received after some past point in time
* are accessible via POP.
*/
public const ACCESS_WINDOW_fromNowOn = 'fromNowOn';
/**
* Indicates that all unfetched messages are accessible via POP.
*/
public const ACCESS_WINDOW_allMail = 'allMail';
/**
* Unspecified disposition.
*/
public const DISPOSITION_dispositionUnspecified = 'dispositionUnspecified';
/**
* Leave the message in the `INBOX`.
*/
public const DISPOSITION_leaveInInbox = 'leaveInInbox';
/**
* Archive the message.
*/
public const DISPOSITION_archive = 'archive';
/**
* Move the message to the `TRASH`.
*/
public const DISPOSITION_trash = 'trash';
/**
* Leave the message in the `INBOX` and mark it as read.
*/
public const DISPOSITION_markRead = 'markRead';
/**
* The range of messages which are accessible via POP.
*
* @var string
*/
public $accessWindow;
/**
* The action that will be executed on a message after it has been fetched via
* POP.
*
* @var string
*/
public $disposition;
/**
* The range of messages which are accessible via POP.
*
* Accepted values: accessWindowUnspecified, disabled, fromNowOn, allMail
*
* @param self::ACCESS_WINDOW_* $accessWindow
*/
public function setAccessWindow($accessWindow)
{
$this->accessWindow = $accessWindow;
}
/**
* @return self::ACCESS_WINDOW_*
*/
public function getAccessWindow()
{
return $this->accessWindow;
}
/**
* The action that will be executed on a message after it has been fetched via
* POP.
*
* Accepted values: dispositionUnspecified, leaveInInbox, archive, trash,
* markRead
*
* @param self::DISPOSITION_* $disposition
*/
public function setDisposition($disposition)
{
$this->disposition = $disposition;
}
/**
* @return self::DISPOSITION_*
*/
public function getDisposition()
{
return $this->disposition;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PopSettings::class, 'Google_Service_Gmail_PopSettings');
+114
View File
@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class Profile extends \Google\Model
{
/**
* The user's email address.
*
* @var string
*/
public $emailAddress;
/**
* The ID of the mailbox's current history record.
*
* @var string
*/
public $historyId;
/**
* The total number of messages in the mailbox.
*
* @var int
*/
public $messagesTotal;
/**
* The total number of threads in the mailbox.
*
* @var int
*/
public $threadsTotal;
/**
* The user's email address.
*
* @param string $emailAddress
*/
public function setEmailAddress($emailAddress)
{
$this->emailAddress = $emailAddress;
}
/**
* @return string
*/
public function getEmailAddress()
{
return $this->emailAddress;
}
/**
* The ID of the mailbox's current history record.
*
* @param string $historyId
*/
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
/**
* @return string
*/
public function getHistoryId()
{
return $this->historyId;
}
/**
* The total number of messages in the mailbox.
*
* @param int $messagesTotal
*/
public function setMessagesTotal($messagesTotal)
{
$this->messagesTotal = $messagesTotal;
}
/**
* @return int
*/
public function getMessagesTotal()
{
return $this->messagesTotal;
}
/**
* The total number of threads in the mailbox.
*
* @param int $threadsTotal
*/
public function setThreadsTotal($threadsTotal)
{
$this->threadsTotal = $threadsTotal;
}
/**
* @return int
*/
public function getThreadsTotal()
{
return $this->threadsTotal;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Profile::class, 'Google_Service_Gmail_Profile');
@@ -0,0 +1,88 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\Profile;
use Google\Service\Gmail\WatchRequest;
use Google\Service\Gmail\WatchResponse;
/**
* The "users" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $users = $gmailService->users;
* </code>
*/
class Users extends \Google\Service\Resource
{
/**
* Gets the current user's Gmail profile. (users.getProfile)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return Profile
* @throws \Google\Service\Exception
*/
public function getProfile($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('getProfile', [$params], Profile::class);
}
/**
* Turn off push notification delivery for the given user mailbox. For more
* information, see [Configure push notifications in Gmail
* API](https://developers.google.com/workspace/gmail/api/guides/push).
* (users.stop)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function stop($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('stop', [$params]);
}
/**
* Set up or update a push notification watch on the given user mailbox. For
* more information, see [Configure push notifications in Gmail
* API](https://developers.google.com/workspace/gmail/api/guides/push).
* (users.watch)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param WatchRequest $postBody
* @param array $optParams Optional parameters.
* @return WatchResponse
* @throws \Google\Service\Exception
*/
public function watch($userId, WatchRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('watch', [$params], WatchResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Users::class, 'Google_Service_Gmail_Resource_Users');
@@ -0,0 +1,160 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\Draft;
use Google\Service\Gmail\ListDraftsResponse;
use Google\Service\Gmail\Message;
/**
* The "drafts" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $drafts = $gmailService->users_drafts;
* </code>
*/
class UsersDrafts extends \Google\Service\Resource
{
/**
* Creates a draft with the `DRAFT` label. For more information, see [Create and
* send draft
* emails](https://developers.google.com/workspace/gmail/api/guides/drafts).
* (drafts.create)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param Draft $postBody
* @param array $optParams Optional parameters.
* @return Draft
* @throws \Google\Service\Exception
*/
public function create($userId, Draft $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Draft::class);
}
/**
* Immediately and permanently deletes the specified draft. Does not simply
* trash it. For more information, see [Create and send draft
* emails](https://developers.google.com/workspace/gmail/api/guides/drafts).
* (drafts.delete)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the draft to delete.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified draft. For more information, see [Create and send draft
* emails](https://developers.google.com/workspace/gmail/api/guides/drafts).
* (drafts.get)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the draft to retrieve.
* @param array $optParams Optional parameters.
*
* @opt_param string format The format to return the draft in.
* @return Draft
* @throws \Google\Service\Exception
*/
public function get($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Draft::class);
}
/**
* Lists the drafts in the user's mailbox. For more information, see [Create and
* send draft
* emails](https://developers.google.com/workspace/gmail/api/guides/drafts).
* (drafts.listUsersDrafts)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param bool includeSpamTrash Include drafts from `SPAM` and `TRASH` in
* the results.
* @opt_param string maxResults Maximum number of drafts to return. This field
* defaults to 100. The maximum allowed value for this field is 500.
* @opt_param string pageToken Page token to retrieve a specific page of results
* in the list.
* @opt_param string q Only return draft messages matching the specified query.
* Supports the same query format as the Gmail search box. For example,
* `"from:someuser@example.com rfc822msgid: is:unread"`.
* @return ListDraftsResponse
* @throws \Google\Service\Exception
*/
public function listUsersDrafts($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListDraftsResponse::class);
}
/**
* Sends the specified, existing draft to the recipients in the `To`, `Cc`, and
* `Bcc` headers. For more information, see [Create and send draft
* emails](https://developers.google.com/workspace/gmail/api/guides/drafts).
* (drafts.send)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param Draft $postBody
* @param array $optParams Optional parameters.
* @return Message
* @throws \Google\Service\Exception
*/
public function send($userId, Draft $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('send', [$params], Message::class);
}
/**
* Replaces a draft's content. For more information, see [Create and send draft
* emails](https://developers.google.com/workspace/gmail/api/guides/drafts).
* (drafts.update)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the draft to update.
* @param Draft $postBody
* @param array $optParams Optional parameters.
* @return Draft
* @throws \Google\Service\Exception
*/
public function update($userId, $id, Draft $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('update', [$params], Draft::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersDrafts::class, 'Google_Service_Gmail_Resource_UsersDrafts');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\ListHistoryResponse;
/**
* The "history" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $history = $gmailService->users_history;
* </code>
*/
class UsersHistory extends \Google\Service\Resource
{
/**
* Lists the history of all changes to the given mailbox. History results are
* returned in chronological order (increasing `historyId`). For more
* information, see [Synchronize clients with
* Gmail](https://developers.google.com/workspace/gmail/api/guides/sync).
* (history.listUsersHistory)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param string historyTypes History types to be returned by the function
* @opt_param string labelId Only return messages with a label matching the ID.
* @opt_param string maxResults Maximum number of history records to return.
* This field defaults to 100. The maximum allowed value for this field is 500.
* @opt_param string pageToken Page token to retrieve a specific page of results
* in the list.
* @opt_param string startHistoryId Required. Returns history records after the
* specified `startHistoryId`. The supplied `startHistoryId` should be obtained
* from the `historyId` of a message, thread, or previous `list` response.
* History IDs increase chronologically but are not contiguous with random gaps
* in between valid IDs. Supplying an invalid or out of date `startHistoryId`
* typically returns an `HTTP 404` error code. A `historyId` is typically valid
* for at least a week, but in some rare circumstances may be valid for only a
* few hours. If you receive an `HTTP 404` error response, your application
* should perform a full sync. If you receive no `nextPageToken` in the
* response, there are no updates to retrieve and you can store the returned
* `historyId` for a future request.
* @return ListHistoryResponse
* @throws \Google\Service\Exception
*/
public function listUsersHistory($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListHistoryResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersHistory::class, 'Google_Service_Gmail_Resource_UsersHistory');
@@ -0,0 +1,146 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\Label;
use Google\Service\Gmail\ListLabelsResponse;
/**
* The "labels" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $labels = $gmailService->users_labels;
* </code>
*/
class UsersLabels extends \Google\Service\Resource
{
/**
* Creates a label. For more information, see [Manage
* labels](https://developers.google.com/workspace/gmail/api/guides/labels).
* (labels.create)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param Label $postBody
* @param array $optParams Optional parameters.
* @return Label
* @throws \Google\Service\Exception
*/
public function create($userId, Label $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Label::class);
}
/**
* Immediately and permanently deletes the specified label and removes it from
* any messages and threads that it's applied to. For more information, see
* [Manage
* labels](https://developers.google.com/workspace/gmail/api/guides/labels).
* (labels.delete)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the label to delete.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified label. For more information, see [Manage
* labels](https://developers.google.com/workspace/gmail/api/guides/labels).
* (labels.get)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the label to retrieve.
* @param array $optParams Optional parameters.
* @return Label
* @throws \Google\Service\Exception
*/
public function get($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Label::class);
}
/**
* Lists all labels in the user's mailbox. For more information, see [Manage
* labels](https://developers.google.com/workspace/gmail/api/guides/labels).
* (labels.listUsersLabels)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return ListLabelsResponse
* @throws \Google\Service\Exception
*/
public function listUsersLabels($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListLabelsResponse::class);
}
/**
* Patch the specified label. For more information, see [Manage
* labels](https://developers.google.com/workspace/gmail/api/guides/labels).
* (labels.patch)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the label to update.
* @param Label $postBody
* @param array $optParams Optional parameters.
* @return Label
* @throws \Google\Service\Exception
*/
public function patch($userId, $id, Label $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Label::class);
}
/**
* Updates the specified label. For more information, see [Manage
* labels](https://developers.google.com/workspace/gmail/api/guides/labels).
* (labels.update)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the label to update.
* @param Label $postBody
* @param array $optParams Optional parameters.
* @return Label
* @throws \Google\Service\Exception
*/
public function update($userId, $id, Label $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('update', [$params], Label::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersLabels::class, 'Google_Service_Gmail_Resource_UsersLabels');
@@ -0,0 +1,281 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\BatchDeleteMessagesRequest;
use Google\Service\Gmail\BatchModifyMessagesRequest;
use Google\Service\Gmail\ListMessagesResponse;
use Google\Service\Gmail\Message;
use Google\Service\Gmail\ModifyMessageRequest;
/**
* The "messages" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $messages = $gmailService->users_messages;
* </code>
*/
class UsersMessages extends \Google\Service\Resource
{
/**
* Deletes many messages by message ID. Provides no guarantees that messages
* were not already deleted or even existed at all. (messages.batchDelete)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param BatchDeleteMessagesRequest $postBody
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function batchDelete($userId, BatchDeleteMessagesRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('batchDelete', [$params]);
}
/**
* Modifies the labels and the Classification Label values on the specified
* messages. For administrators modifying messages for users in their
* organization, requests require authorization with a [service account](https:/
* /developers.google.com/identity/protocols/OAuth2ServiceAccount) that has
* [domain-wide delegation authority](https://developers.google.com/identity/pro
* tocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with
* the `https://www.googleapis.com/auth/gmail.modify.restricted` scope.
* (messages.batchModify)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param BatchModifyMessagesRequest $postBody
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function batchModify($userId, BatchModifyMessagesRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('batchModify', [$params]);
}
/**
* Immediately and permanently deletes the specified message. This operation
* cannot be undone. Prefer `messages.trash` instead. (messages.delete)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the message to delete.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified message. (messages.get)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the message to retrieve. This ID is usually
* retrieved using `messages.list`. The ID is also contained in the result when
* a message is inserted (`messages.insert`) or imported (`messages.import`).
* @param array $optParams Optional parameters.
*
* @opt_param string format The format to return the message in.
* @opt_param string metadataHeaders When given and format is `METADATA`, only
* include headers specified.
* @return Message
* @throws \Google\Service\Exception
*/
public function get($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Message::class);
}
/**
* Imports a message into only this user's mailbox, with standard email delivery
* scanning and classification similar to receiving via SMTP. This method
* doesn't perform SPF checks, so it might not work for some spam messages, such
* as those attempting to perform domain spoofing. This method does not send a
* message. Note that the maximum size of the message is 150 MB.
* (messages.import)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param Message $postBody
* @param array $optParams Optional parameters.
*
* @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and
* only visible in Google Vault to a Vault administrator. Only used for Google
* Workspace accounts.
* @opt_param string internalDateSource Source for Gmail's internal date of the
* message.
* @opt_param bool neverMarkSpam Ignore the Gmail spam classifier decision and
* never mark this email as SPAM in the mailbox.
* @opt_param bool processForCalendar Process calendar invites in the email and
* add any extracted meetings to the Google Calendar for this user.
* @return Message
* @throws \Google\Service\Exception
*/
public function import($userId, Message $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], Message::class);
}
/**
* Directly inserts a message into only this user's mailbox similar to `IMAP
* APPEND`, bypassing most scanning and classification. Does not send a message.
* For more information, see [Create and send email
* messages](https://developers.google.com/workspace/gmail/api/guides/sending).
* (messages.insert)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param Message $postBody
* @param array $optParams Optional parameters.
*
* @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and
* only visible in Google Vault to a Vault administrator. Only used for Google
* Workspace accounts.
* @opt_param string internalDateSource Source for Gmail's internal date of the
* message.
* @return Message
* @throws \Google\Service\Exception
*/
public function insert($userId, Message $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('insert', [$params], Message::class);
}
/**
* Lists the messages in the user's mailbox. For more information, see [List
* Gmail
* messages](https://developers.google.com/workspace/gmail/api/guides/list-
* messages). (messages.listUsersMessages)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param bool includeSpamTrash Include messages from `SPAM` and `TRASH` in
* the results.
* @opt_param string labelIds Only return messages with labels that match all of
* the specified label IDs. Messages in a thread might have labels that other
* messages in the same thread don't have. To learn more, see [Manage labels on
* messages and threads](https://developers.google.com/workspace/gmail/api/guide
* s/labels#manage_labels_on_messages_threads).
* @opt_param string maxResults Maximum number of messages to return. This field
* defaults to 100. The maximum allowed value for this field is 500.
* @opt_param string pageToken Page token to retrieve a specific page of results
* in the list.
* @opt_param string q Only return messages matching the specified query.
* Supports the same query format as the Gmail search box. For example,
* `"from:someuser@example.com rfc822msgid: is:unread"`. Parameter cannot be
* used when accessing the api using the gmail.metadata scope.
* @return ListMessagesResponse
* @throws \Google\Service\Exception
*/
public function listUsersMessages($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListMessagesResponse::class);
}
/**
* Modifies the labels and the Classification Label values on the specified
* message. For administrators modifying message for users in their
* organization, requests require authorization with a [service account](https:/
* /developers.google.com/identity/protocols/OAuth2ServiceAccount) that has
* [domain-wide delegation authority](https://developers.google.com/identity/pro
* tocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with
* the `https://www.googleapis.com/auth/gmail.modify.restricted` scope.
* (messages.modify)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the message to modify.
* @param ModifyMessageRequest $postBody
* @param array $optParams Optional parameters.
* @return Message
* @throws \Google\Service\Exception
*/
public function modify($userId, $id, ModifyMessageRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('modify', [$params], Message::class);
}
/**
* Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc`
* headers. For more information, see [Create and send email
* messages](https://developers.google.com/workspace/gmail/api/guides/sending).
* (messages.send)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param Message $postBody
* @param array $optParams Optional parameters.
* @return Message
* @throws \Google\Service\Exception
*/
public function send($userId, Message $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('send', [$params], Message::class);
}
/**
* Moves the specified message to the trash. (messages.trash)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the message to Trash.
* @param array $optParams Optional parameters.
* @return Message
* @throws \Google\Service\Exception
*/
public function trash($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('trash', [$params], Message::class);
}
/**
* Removes the specified message from the trash. (messages.untrash)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the message to remove from Trash.
* @param array $optParams Optional parameters.
* @return Message
* @throws \Google\Service\Exception
*/
public function untrash($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('untrash', [$params], Message::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersMessages::class, 'Google_Service_Gmail_Resource_UsersMessages');
@@ -0,0 +1,52 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\MessagePartBody;
/**
* The "attachments" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $attachments = $gmailService->users_messages_attachments;
* </code>
*/
class UsersMessagesAttachments extends \Google\Service\Resource
{
/**
* Gets the specified message attachment. (attachments.get)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $messageId The ID of the message containing the attachment.
* @param string $id The ID of the attachment.
* @param array $optParams Optional parameters.
* @return MessagePartBody
* @throws \Google\Service\Exception
*/
public function get($userId, $messageId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'messageId' => $messageId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], MessagePartBody::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersMessagesAttachments::class, 'Google_Service_Gmail_Resource_UsersMessagesAttachments');
@@ -0,0 +1,221 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\AutoForwarding;
use Google\Service\Gmail\ImapSettings;
use Google\Service\Gmail\LanguageSettings;
use Google\Service\Gmail\PopSettings;
use Google\Service\Gmail\VacationSettings;
/**
* The "settings" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $settings = $gmailService->users_settings;
* </code>
*/
class UsersSettings extends \Google\Service\Resource
{
/**
* Gets the auto-forwarding setting for the specified account. For more
* information, see [Manage email forwarding](https://developers.google.com/work
* space/gmail/api/guides/forwarding_settings). (settings.getAutoForwarding)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return AutoForwarding
* @throws \Google\Service\Exception
*/
public function getAutoForwarding($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('getAutoForwarding', [$params], AutoForwarding::class);
}
/**
* Gets IMAP settings. For more information, see [Configure POP and IMAP
* settings with the Gmail API](https://developers.google.com/workspace/gmail/ap
* i/guides/pop_imap_settings). (settings.getImap)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return ImapSettings
* @throws \Google\Service\Exception
*/
public function getImap($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('getImap', [$params], ImapSettings::class);
}
/**
* Gets language settings. For more information, see [Manage language
* settings](https://developers.google.com/workspace/gmail/api/guides/language-
* settings). (settings.getLanguage)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return LanguageSettings
* @throws \Google\Service\Exception
*/
public function getLanguage($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('getLanguage', [$params], LanguageSettings::class);
}
/**
* Gets POP settings. For more information, see [Configure POP and IMAP settings
* with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/
* pop_imap_settings). (settings.getPop)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return PopSettings
* @throws \Google\Service\Exception
*/
public function getPop($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('getPop', [$params], PopSettings::class);
}
/**
* Gets vacation responder settings. For more information, see [Manage vacation
* settings with the Gmail API](https://developers.google.com/workspace/gmail/ap
* i/guides/vacation_settings). (settings.getVacation)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return VacationSettings
* @throws \Google\Service\Exception
*/
public function getVacation($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('getVacation', [$params], VacationSettings::class);
}
/**
* Updates the auto-forwarding setting for the specified account. A verified
* forwarding address must be specified when auto-forwarding is enabled. For
* more information, see [Manage email forwarding](https://developers.google.com
* /workspace/gmail/api/guides/forwarding_settings). This method is only
* available to service account clients that have been delegated domain-wide
* authority. (settings.updateAutoForwarding)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param AutoForwarding $postBody
* @param array $optParams Optional parameters.
* @return AutoForwarding
* @throws \Google\Service\Exception
*/
public function updateAutoForwarding($userId, AutoForwarding $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateAutoForwarding', [$params], AutoForwarding::class);
}
/**
* Updates IMAP settings. For more information, see [Configure POP and IMAP
* settings with the Gmail API](https://developers.google.com/workspace/gmail/ap
* i/guides/pop_imap_settings). (settings.updateImap)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param ImapSettings $postBody
* @param array $optParams Optional parameters.
* @return ImapSettings
* @throws \Google\Service\Exception
*/
public function updateImap($userId, ImapSettings $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateImap', [$params], ImapSettings::class);
}
/**
* Updates language settings. For more information, see [Manage language
* settings](https://developers.google.com/workspace/gmail/api/guides/language-
* settings). If successful, the return object contains the `displayLanguage`
* that was saved for the user, which may differ from the value passed into the
* request. This is because the requested `displayLanguage` may not be directly
* supported by Gmail but have a close variant that is, and so the variant may
* be chosen and saved instead. (settings.updateLanguage)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param LanguageSettings $postBody
* @param array $optParams Optional parameters.
* @return LanguageSettings
* @throws \Google\Service\Exception
*/
public function updateLanguage($userId, LanguageSettings $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateLanguage', [$params], LanguageSettings::class);
}
/**
* Updates POP settings. For more information, see [Configure POP and IMAP
* settings with the Gmail API](https://developers.google.com/workspace/gmail/ap
* i/guides/pop_imap_settings). (settings.updatePop)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param PopSettings $postBody
* @param array $optParams Optional parameters.
* @return PopSettings
* @throws \Google\Service\Exception
*/
public function updatePop($userId, PopSettings $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updatePop', [$params], PopSettings::class);
}
/**
* Updates vacation responder settings. For more information, see [Manage
* vacation settings with the Gmail API](https://developers.google.com/workspace
* /gmail/api/guides/vacation_settings). (settings.updateVacation)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param VacationSettings $postBody
* @param array $optParams Optional parameters.
* @return VacationSettings
* @throws \Google\Service\Exception
*/
public function updateVacation($userId, VacationSettings $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateVacation', [$params], VacationSettings::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettings::class, 'Google_Service_Gmail_Resource_UsersSettings');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
/**
* The "cse" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $cse = $gmailService->users_settings_cse;
* </code>
*/
class UsersSettingsCse extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsCse::class, 'Google_Service_Gmail_Resource_UsersSettingsCse');
@@ -0,0 +1,177 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\CseIdentity;
use Google\Service\Gmail\ListCseIdentitiesResponse;
/**
* The "identities" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $identities = $gmailService->users_settings_cse_identities;
* </code>
*/
class UsersSettingsCseIdentities extends \Google\Service\Resource
{
/**
* Creates and configures a client-side encryption identity that's authorized to
* send mail from the user account. Google publishes the S/MIME certificate to a
* shared domain-wide directory so that people within a Google Workspace
* organization can encrypt and send mail to the identity. For administrators
* managing identities and keypairs for users in their organization, requests
* require authorization with a [service account](https://developers.google.com/
* identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation aut
* hority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount
* #delegatingauthority) to impersonate users with the
* `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (identities.create)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param CseIdentity $postBody
* @param array $optParams Optional parameters.
* @return CseIdentity
* @throws \Google\Service\Exception
*/
public function create($userId, CseIdentity $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CseIdentity::class);
}
/**
* Deletes a client-side encryption identity. The authenticated user can no
* longer use the identity to send encrypted messages. You cannot restore the
* identity after you delete it. Instead, use the CreateCseIdentity method to
* create another identity with the same configuration. For administrators
* managing identities and keypairs for users in their organization, requests
* require authorization with a [service account](https://developers.google.com/
* identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation aut
* hority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount
* #delegatingauthority) to impersonate users with the
* `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (identities.delete)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param string $cseEmailAddress The primary email address associated with the
* client-side encryption identity configuration that's removed.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $cseEmailAddress, $optParams = [])
{
$params = ['userId' => $userId, 'cseEmailAddress' => $cseEmailAddress];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Retrieves a client-side encryption identity configuration. For administrators
* managing identities and keypairs for users in their organization, requests
* require authorization with a [service account](https://developers.google.com/
* identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation aut
* hority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount
* #delegatingauthority) to impersonate users with the
* `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (identities.get)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param string $cseEmailAddress The primary email address associated with the
* client-side encryption identity configuration that's retrieved.
* @param array $optParams Optional parameters.
* @return CseIdentity
* @throws \Google\Service\Exception
*/
public function get($userId, $cseEmailAddress, $optParams = [])
{
$params = ['userId' => $userId, 'cseEmailAddress' => $cseEmailAddress];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CseIdentity::class);
}
/**
* Lists the client-side encrypted identities for an authenticated user. For
* administrators managing identities and keypairs for users in their
* organization, requests require authorization with a [service account](https:/
* /developers.google.com/identity/protocols/OAuth2ServiceAccount) that has
* [domain-wide delegation authority](https://developers.google.com/identity/pro
* tocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with
* the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (identities.listUsersSettingsCseIdentities)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The number of identities to return. If not provided,
* the page size will default to 20 entries.
* @opt_param string pageToken Pagination token indicating which page of
* identities to return. If the token is not supplied, then the API will return
* the first page of results.
* @return ListCseIdentitiesResponse
* @throws \Google\Service\Exception
*/
public function listUsersSettingsCseIdentities($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCseIdentitiesResponse::class);
}
/**
* Associates a different key pair with an existing client-side encryption
* identity. The updated key pair must validate against Google's [S/MIME
* certificate profiles](https://support.google.com/a/answer/7300887). For
* administrators managing identities and keypairs for users in their
* organization, requests require authorization with a [service account](https:/
* /developers.google.com/identity/protocols/OAuth2ServiceAccount) that has
* [domain-wide delegation authority](https://developers.google.com/identity/pro
* tocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with
* the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (identities.patch)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param string $emailAddress The email address of the client-side encryption
* identity to update.
* @param CseIdentity $postBody
* @param array $optParams Optional parameters.
* @return CseIdentity
* @throws \Google\Service\Exception
*/
public function patch($userId, $emailAddress, CseIdentity $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'emailAddress' => $emailAddress, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], CseIdentity::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsCseIdentities::class, 'Google_Service_Gmail_Resource_UsersSettingsCseIdentities');
@@ -0,0 +1,207 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\CseKeyPair;
use Google\Service\Gmail\DisableCseKeyPairRequest;
use Google\Service\Gmail\EnableCseKeyPairRequest;
use Google\Service\Gmail\ListCseKeyPairsResponse;
use Google\Service\Gmail\ObliterateCseKeyPairRequest;
/**
* The "keypairs" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $keypairs = $gmailService->users_settings_cse_keypairs;
* </code>
*/
class UsersSettingsCseKeypairs extends \Google\Service\Resource
{
/**
* Creates and uploads a client-side encryption S/MIME public key certificate
* chain and private key metadata for the authenticated user. For administrators
* managing identities and keypairs for users in their organization, requests
* require authorization with a [service account](https://developers.google.com/
* identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation aut
* hority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount
* #delegatingauthority) to impersonate users with the
* `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (keypairs.create)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param CseKeyPair $postBody
* @param array $optParams Optional parameters.
* @return CseKeyPair
* @throws \Google\Service\Exception
*/
public function create($userId, CseKeyPair $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CseKeyPair::class);
}
/**
* Turns off a client-side encryption key pair. The authenticated user can no
* longer use the key pair to decrypt incoming CSE message texts or sign
* outgoing CSE mail. To regain access, use the EnableCseKeyPair to turn on the
* key pair. After 30 days, you can permanently delete the key pair by using the
* ObliterateCseKeyPair method. For administrators managing identities and
* keypairs for users in their organization, requests require authorization with
* a [service account](https://developers.google.com/identity/protocols/OAuth2Se
* rviceAccount) that has [domain-wide delegation authority](https://developers.
* google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to
* impersonate users with the
* `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (keypairs.disable)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param string $keyPairId The identifier of the key pair to turn off.
* @param DisableCseKeyPairRequest $postBody
* @param array $optParams Optional parameters.
* @return CseKeyPair
* @throws \Google\Service\Exception
*/
public function disable($userId, $keyPairId, DisableCseKeyPairRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'keyPairId' => $keyPairId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('disable', [$params], CseKeyPair::class);
}
/**
* Turns on a client-side encryption key pair that was turned off. The key pair
* becomes active again for any associated client-side encryption identities.
* For administrators managing identities and keypairs for users in their
* organization, requests require authorization with a [service account](https:/
* /developers.google.com/identity/protocols/OAuth2ServiceAccount) that has
* [domain-wide delegation authority](https://developers.google.com/identity/pro
* tocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with
* the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (keypairs.enable)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param string $keyPairId The identifier of the key pair to turn on.
* @param EnableCseKeyPairRequest $postBody
* @param array $optParams Optional parameters.
* @return CseKeyPair
* @throws \Google\Service\Exception
*/
public function enable($userId, $keyPairId, EnableCseKeyPairRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'keyPairId' => $keyPairId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('enable', [$params], CseKeyPair::class);
}
/**
* Retrieves an existing client-side encryption key pair. For administrators
* managing identities and keypairs for users in their organization, requests
* require authorization with a [service account](https://developers.google.com/
* identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation aut
* hority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount
* #delegatingauthority) to impersonate users with the
* `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (keypairs.get)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param string $keyPairId The identifier of the key pair to retrieve.
* @param array $optParams Optional parameters.
* @return CseKeyPair
* @throws \Google\Service\Exception
*/
public function get($userId, $keyPairId, $optParams = [])
{
$params = ['userId' => $userId, 'keyPairId' => $keyPairId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CseKeyPair::class);
}
/**
* Lists client-side encryption key pairs for an authenticated user. For
* administrators managing identities and keypairs for users in their
* organization, requests require authorization with a [service account](https:/
* /developers.google.com/identity/protocols/OAuth2ServiceAccount) that has
* [domain-wide delegation authority](https://developers.google.com/identity/pro
* tocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with
* the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (keypairs.listUsersSettingsCseKeypairs)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The number of key pairs to return. If not provided,
* the page size will default to 20 entries.
* @opt_param string pageToken Pagination token indicating which page of key
* pairs to return. If the token is not supplied, then the API will return the
* first page of results.
* @return ListCseKeyPairsResponse
* @throws \Google\Service\Exception
*/
public function listUsersSettingsCseKeypairs($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCseKeyPairsResponse::class);
}
/**
* Deletes a client-side encryption key pair permanently and immediately. You
* can only permanently delete key pairs that have been turned off for more than
* 30 days. To turn off a key pair, use the DisableCseKeyPair method. Gmail
* can't restore or decrypt any messages that were encrypted by an obliterated
* key. Authenticated users and Google Workspace administrators lose access to
* reading the encrypted messages. For administrators managing identities and
* keypairs for users in their organization, requests require authorization with
* a [service account](https://developers.google.com/identity/protocols/OAuth2Se
* rviceAccount) that has [domain-wide delegation authority](https://developers.
* google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to
* impersonate users with the
* `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users
* managing their own identities and keypairs, requests require [hardware key
* encryption](https://support.google.com/a/answer/14153163) turned on and
* configured. (keypairs.obliterate)
*
* @param string $userId The requester's primary email address. To indicate the
* authenticated user, you can use the special value `me`.
* @param string $keyPairId The identifier of the key pair to obliterate.
* @param ObliterateCseKeyPairRequest $postBody
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function obliterate($userId, $keyPairId, ObliterateCseKeyPairRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'keyPairId' => $keyPairId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('obliterate', [$params]);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsCseKeypairs::class, 'Google_Service_Gmail_Resource_UsersSettingsCseKeypairs');
@@ -0,0 +1,126 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\Delegate;
use Google\Service\Gmail\ListDelegatesResponse;
/**
* The "delegates" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $delegates = $gmailService->users_settings_delegates;
* </code>
*/
class UsersSettingsDelegates extends \Google\Service\Resource
{
/**
* Adds a delegate with its verification status set directly to `accepted`,
* without sending any verification email. The delegate user must be a member of
* the same Google Workspace organization as the delegator user. For more
* information, see [Manage delegates](https://developers.google.com/workspace/g
* mail/api/guides/delegate_settings). Gmail imposes limitations on the number
* of delegates and delegators each user in a Google Workspace organization can
* have. These limits depend on your organization, but in general each user can
* have up to 25 delegates and up to 10 delegators. A delegate user must be
* referred to by their primary email address, and not an email alias. When a
* new delegate is created, there may be up to a one minute delay before the new
* delegate is available for use. This method is only available to service
* account clients that have been delegated domain-wide authority.
* (delegates.create)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param Delegate $postBody
* @param array $optParams Optional parameters.
* @return Delegate
* @throws \Google\Service\Exception
*/
public function create($userId, Delegate $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Delegate::class);
}
/**
* Removes the specified delegate (which can be of any verification status), and
* revokes any verification that may have been required for using it. For more
* information, see [Manage delegates](https://developers.google.com/workspace/g
* mail/api/guides/delegate_settings). A delegate user must be referred to by
* their primary email address, and not an email alias. This method is only
* available to service account clients that have been delegated domain-wide
* authority. (delegates.delete)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $delegateEmail The email address of the user to be removed as a
* delegate.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $delegateEmail, $optParams = [])
{
$params = ['userId' => $userId, 'delegateEmail' => $delegateEmail];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified delegate. For more information, see [Manage delegates](htt
* ps://developers.google.com/workspace/gmail/api/guides/delegate_settings). A
* delegate user must be referred to by their primary email address, and not an
* email alias. This method is only available to service account clients that
* have been delegated domain-wide authority. (delegates.get)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $delegateEmail The email address of the user whose delegate
* relationship is to be retrieved.
* @param array $optParams Optional parameters.
* @return Delegate
* @throws \Google\Service\Exception
*/
public function get($userId, $delegateEmail, $optParams = [])
{
$params = ['userId' => $userId, 'delegateEmail' => $delegateEmail];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Delegate::class);
}
/**
* Lists the delegates for the specified account. For more information, see
* [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/d
* elegate_settings). This method is only available to service account clients
* that have been delegated domain-wide authority.
* (delegates.listUsersSettingsDelegates)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return ListDelegatesResponse
* @throws \Google\Service\Exception
*/
public function listUsersSettingsDelegates($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListDelegatesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsDelegates::class, 'Google_Service_Gmail_Resource_UsersSettingsDelegates');
@@ -0,0 +1,105 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\Filter;
use Google\Service\Gmail\ListFiltersResponse;
/**
* The "filters" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $filters = $gmailService->users_settings_filters;
* </code>
*/
class UsersSettingsFilters extends \Google\Service\Resource
{
/**
* Creates a filter. Note: you can only create a maximum of 1,000 filters. For
* more information, see [Manage Gmail filters](https://developers.google.com/wo
* rkspace/gmail/api/guides/filter_settings). (filters.create)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param Filter $postBody
* @param array $optParams Optional parameters.
* @return Filter
* @throws \Google\Service\Exception
*/
public function create($userId, Filter $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Filter::class);
}
/**
* Immediately and permanently deletes the specified filter. For more
* information, see [Manage Gmail filters](https://developers.google.com/workspa
* ce/gmail/api/guides/filter_settings). (filters.delete)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $id The ID of the filter to be deleted.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets a filter. For more information, see [Manage Gmail filters](https://devel
* opers.google.com/workspace/gmail/api/guides/filter_settings). (filters.get)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $id The ID of the filter to be fetched.
* @param array $optParams Optional parameters.
* @return Filter
* @throws \Google\Service\Exception
*/
public function get($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Filter::class);
}
/**
* Lists the message filters of a Gmail user. For more information, see [Manage
* Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filte
* r_settings). (filters.listUsersSettingsFilters)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return ListFiltersResponse
* @throws \Google\Service\Exception
*/
public function listUsersSettingsFilters($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListFiltersResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsFilters::class, 'Google_Service_Gmail_Resource_UsersSettingsFilters');
@@ -0,0 +1,113 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\ForwardingAddress;
use Google\Service\Gmail\ListForwardingAddressesResponse;
/**
* The "forwardingAddresses" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $forwardingAddresses = $gmailService->users_settings_forwardingAddresses;
* </code>
*/
class UsersSettingsForwardingAddresses extends \Google\Service\Resource
{
/**
* Creates a forwarding address. If ownership verification is required, a
* message will be sent to the recipient and the resource's verification status
* will be set to `pending`; otherwise, the resource will be created with
* verification status set to `accepted`. For more information, see [Manage
* email forwarding](https://developers.google.com/workspace/gmail/api/guides/fo
* rwarding_settings). This method is only available to service account clients
* that have been delegated domain-wide authority. (forwardingAddresses.create)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param ForwardingAddress $postBody
* @param array $optParams Optional parameters.
* @return ForwardingAddress
* @throws \Google\Service\Exception
*/
public function create($userId, ForwardingAddress $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], ForwardingAddress::class);
}
/**
* Deletes the specified forwarding address and revokes any verification that
* may have been required. For more information, see [Manage email forwarding](h
* ttps://developers.google.com/workspace/gmail/api/guides/forwarding_settings).
* This method is only available to service account clients that have been
* delegated domain-wide authority. (forwardingAddresses.delete)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $forwardingEmail The forwarding address to be deleted.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $forwardingEmail, $optParams = [])
{
$params = ['userId' => $userId, 'forwardingEmail' => $forwardingEmail];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified forwarding address. For more information, see [Manage
* email forwarding](https://developers.google.com/workspace/gmail/api/guides/fo
* rwarding_settings). (forwardingAddresses.get)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $forwardingEmail The forwarding address to be retrieved.
* @param array $optParams Optional parameters.
* @return ForwardingAddress
* @throws \Google\Service\Exception
*/
public function get($userId, $forwardingEmail, $optParams = [])
{
$params = ['userId' => $userId, 'forwardingEmail' => $forwardingEmail];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], ForwardingAddress::class);
}
/**
* Lists the forwarding addresses for the specified account. For more
* information, see [Manage email forwarding](https://developers.google.com/work
* space/gmail/api/guides/forwarding_settings).
* (forwardingAddresses.listUsersSettingsForwardingAddresses)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return ListForwardingAddressesResponse
* @throws \Google\Service\Exception
*/
public function listUsersSettingsForwardingAddresses($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListForwardingAddressesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsForwardingAddresses::class, 'Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses');
@@ -0,0 +1,182 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\ListSendAsResponse;
use Google\Service\Gmail\SendAs;
/**
* The "sendAs" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $sendAs = $gmailService->users_settings_sendAs;
* </code>
*/
class UsersSettingsSendAs extends \Google\Service\Resource
{
/**
* Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail
* will attempt to connect to the SMTP service to validate the configuration
* before creating the alias. If ownership verification is required for the
* alias, a message will be sent to the email address and the resource's
* verification status will be set to `pending`; otherwise, the resource will be
* created with verification status set to `accepted`. If a signature is
* provided, Gmail will sanitize the HTML before saving it with the alias. For
* more information, see [Manage aliases and signatures with the Gmail API](http
* s://developers.google.com/workspace/gmail/api/guides/alias_and_signature_sett
* ings). This method is only available to service account clients that have
* been delegated domain-wide authority. (sendAs.create)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param SendAs $postBody
* @param array $optParams Optional parameters.
* @return SendAs
* @throws \Google\Service\Exception
*/
public function create($userId, SendAs $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], SendAs::class);
}
/**
* Deletes the specified send-as alias. Revokes any verification that may have
* been required for using it. For more information, see [Manage aliases and
* signatures with the Gmail API](https://developers.google.com/workspace/gmail/
* api/guides/alias_and_signature_settings). This method is only available to
* service account clients that have been delegated domain-wide authority.
* (sendAs.delete)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The send-as alias to be deleted.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $sendAsEmail, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified send-as alias. Fails with an HTTP 404 error if the
* specified address is not a member of the collection. For more information,
* see [Manage aliases and signatures with the Gmail API](https://developers.goo
* gle.com/workspace/gmail/api/guides/alias_and_signature_settings).
* (sendAs.get)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The send-as alias to be retrieved.
* @param array $optParams Optional parameters.
* @return SendAs
* @throws \Google\Service\Exception
*/
public function get($userId, $sendAsEmail, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], SendAs::class);
}
/**
* Lists the send-as aliases for the specified account. The result includes the
* primary send-as address associated with the account as well as any custom
* "from" aliases. For more information, see [Manage aliases and signatures with
* the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias
* _and_signature_settings). (sendAs.listUsersSettingsSendAs)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return ListSendAsResponse
* @throws \Google\Service\Exception
*/
public function listUsersSettingsSendAs($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListSendAsResponse::class);
}
/**
* Patch the specified send-as alias. For more information, see [Manage aliases
* and signatures with the Gmail API](https://developers.google.com/workspace/gm
* ail/api/guides/alias_and_signature_settings). (sendAs.patch)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The send-as alias to be updated.
* @param SendAs $postBody
* @param array $optParams Optional parameters.
* @return SendAs
* @throws \Google\Service\Exception
*/
public function patch($userId, $sendAsEmail, SendAs $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], SendAs::class);
}
/**
* Updates a send-as alias. If a signature is provided, Gmail will sanitize the
* HTML before saving it with the alias. For more information, see [Manage
* aliases and signatures with the Gmail API](https://developers.google.com/work
* space/gmail/api/guides/alias_and_signature_settings). Addresses other than
* the primary address for the account can only be updated by service account
* clients that have been delegated domain-wide authority. (sendAs.update)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The send-as alias to be updated.
* @param SendAs $postBody
* @param array $optParams Optional parameters.
* @return SendAs
* @throws \Google\Service\Exception
*/
public function update($userId, $sendAsEmail, SendAs $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('update', [$params], SendAs::class);
}
/**
* Sends a verification email to the specified send-as alias address. The
* verification status must be `pending`. For more information, see [Manage
* aliases and signatures with the Gmail API](https://developers.google.com/work
* space/gmail/api/guides/alias_and_signature_settings). This method is only
* available to service account clients that have been delegated domain-wide
* authority. (sendAs.verify)
*
* @param string $userId User's email address. The special value "me" can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The send-as alias to be verified.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function verify($userId, $sendAsEmail, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail];
$params = array_merge($params, $optParams);
return $this->call('verify', [$params]);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsSendAs::class, 'Google_Service_Gmail_Resource_UsersSettingsSendAs');
@@ -0,0 +1,139 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\ListSmimeInfoResponse;
use Google\Service\Gmail\SmimeInfo;
/**
* The "smimeInfo" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $smimeInfo = $gmailService->users_settings_sendAs_smimeInfo;
* </code>
*/
class UsersSettingsSendAsSmimeInfo extends \Google\Service\Resource
{
/**
* Deletes the specified S/MIME config for the specified send-as alias. For more
* information, see [Manage S/MIME certificates with the Gmail
* API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).
* (smimeInfo.delete)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The email address that appears in the "From:"
* header for mail sent using this alias.
* @param string $id The immutable ID for the SmimeInfo.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $sendAsEmail, $id, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified S/MIME config for the specified send-as alias. For more
* information, see [Manage S/MIME certificates with the Gmail
* API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).
* (smimeInfo.get)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The email address that appears in the "From:"
* header for mail sent using this alias.
* @param string $id The immutable ID for the SmimeInfo.
* @param array $optParams Optional parameters.
* @return SmimeInfo
* @throws \Google\Service\Exception
*/
public function get($userId, $sendAsEmail, $id, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], SmimeInfo::class);
}
/**
* Insert (upload) the given S/MIME config for the specified send-as alias. Note
* that `pkcs12` format is required for the key. For more information, see
* [Manage S/MIME certificates with the Gmail
* API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).
* (smimeInfo.insert)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The email address that appears in the "From:"
* header for mail sent using this alias.
* @param SmimeInfo $postBody
* @param array $optParams Optional parameters.
* @return SmimeInfo
* @throws \Google\Service\Exception
*/
public function insert($userId, $sendAsEmail, SmimeInfo $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('insert', [$params], SmimeInfo::class);
}
/**
* Lists S/MIME configs for the specified send-as alias. For more information,
* see [Manage S/MIME certificates with the Gmail
* API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).
* (smimeInfo.listUsersSettingsSendAsSmimeInfo)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The email address that appears in the "From:"
* header for mail sent using this alias.
* @param array $optParams Optional parameters.
* @return ListSmimeInfoResponse
* @throws \Google\Service\Exception
*/
public function listUsersSettingsSendAsSmimeInfo($userId, $sendAsEmail, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListSmimeInfoResponse::class);
}
/**
* Sets the default S/MIME config for the specified send-as alias. For more
* information, see [Manage S/MIME certificates with the Gmail
* API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).
* (smimeInfo.setDefault)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $sendAsEmail The email address that appears in the "From:"
* header for mail sent using this alias.
* @param string $id The immutable ID for the SmimeInfo.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function setDefault($userId, $sendAsEmail, $id, $optParams = [])
{
$params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('setDefault', [$params]);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersSettingsSendAsSmimeInfo::class, 'Google_Service_Gmail_Resource_UsersSettingsSendAsSmimeInfo');
@@ -0,0 +1,166 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail\Resource;
use Google\Service\Gmail\ListThreadsResponse;
use Google\Service\Gmail\ModifyThreadRequest;
use Google\Service\Gmail\Thread;
/**
* The "threads" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Google\Service\Gmail(...);
* $threads = $gmailService->users_threads;
* </code>
*/
class UsersThreads extends \Google\Service\Resource
{
/**
* Immediately and permanently deletes the specified thread. Any messages that
* belong to the thread are also deleted. This operation cannot be undone.
* Prefer `threads.trash` instead. For more information, see [Manage
* threads](https://developers.google.com/workspace/gmail/api/guides/threads).
* (threads.delete)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id ID of the Thread to delete.
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function delete($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params]);
}
/**
* Gets the specified thread. For more information, see [Manage
* threads](https://developers.google.com/workspace/gmail/api/guides/threads).
* (threads.get)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the thread to retrieve.
* @param array $optParams Optional parameters.
*
* @opt_param string format The format to return the messages in.
* @opt_param string metadataHeaders When given and format is METADATA, only
* include headers specified.
* @return Thread
* @throws \Google\Service\Exception
*/
public function get($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Thread::class);
}
/**
* Lists the threads in the user's mailbox. For more information, see [Manage
* threads](https://developers.google.com/workspace/gmail/api/guides/threads).
* (threads.listUsersThreads)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param bool includeSpamTrash Include threads from `SPAM` and `TRASH` in
* the results.
* @opt_param string labelIds Only return threads with labels that match all of
* the specified label IDs.
* @opt_param string maxResults Maximum number of threads to return. This field
* defaults to 100. The maximum allowed value for this field is 500.
* @opt_param string pageToken Page token to retrieve a specific page of results
* in the list.
* @opt_param string q Only return threads matching the specified query.
* Supports the same query format as the Gmail search box. For example,
* `"from:someuser@example.com rfc822msgid: is:unread"`. Parameter cannot be
* used when accessing the api using the gmail.metadata scope.
* @return ListThreadsResponse
* @throws \Google\Service\Exception
*/
public function listUsersThreads($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListThreadsResponse::class);
}
/**
* Modifies the labels applied to the thread. This applies to all messages in
* the thread. For more information, see [Manage
* threads](https://developers.google.com/workspace/gmail/api/guides/threads).
* (threads.modify)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the thread to modify.
* @param ModifyThreadRequest $postBody
* @param array $optParams Optional parameters.
* @return Thread
* @throws \Google\Service\Exception
*/
public function modify($userId, $id, ModifyThreadRequest $postBody, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('modify', [$params], Thread::class);
}
/**
* Moves the specified thread to the trash. Any messages that belong to the
* thread are also moved to the trash. For more information, see [Manage
* threads](https://developers.google.com/workspace/gmail/api/guides/threads).
* (threads.trash)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the thread to Trash.
* @param array $optParams Optional parameters.
* @return Thread
* @throws \Google\Service\Exception
*/
public function trash($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('trash', [$params], Thread::class);
}
/**
* Removes the specified thread from the trash. Any messages that belong to the
* thread are also removed from the trash. For more information, see [Manage
* threads](https://developers.google.com/workspace/gmail/api/guides/threads).
* (threads.untrash)
*
* @param string $userId The user's email address. The special value `me` can be
* used to indicate the authenticated user.
* @param string $id The ID of the thread to remove from Trash.
* @param array $optParams Optional parameters.
* @return Thread
* @throws \Google\Service\Exception
*/
public function untrash($userId, $id, $optParams = [])
{
$params = ['userId' => $userId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('untrash', [$params], Thread::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UsersThreads::class, 'Google_Service_Gmail_Resource_UsersThreads');
+273
View File
@@ -0,0 +1,273 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class SendAs extends \Google\Model
{
/**
* Unspecified verification status.
*/
public const VERIFICATION_STATUS_verificationStatusUnspecified = 'verificationStatusUnspecified';
/**
* The address is ready to use as a send-as alias.
*/
public const VERIFICATION_STATUS_accepted = 'accepted';
/**
* The address is awaiting verification by the owner.
*/
public const VERIFICATION_STATUS_pending = 'pending';
/**
* A name that appears in the "From:" header for mail sent using this alias.
* For custom "from" addresses, when this is empty, Gmail will populate the
* "From:" header with the name that is used for the primary address
* associated with the account. If the admin has disabled the ability for
* users to update their name format, requests to update this field for the
* primary login will silently fail.
*
* @var string
*/
public $displayName;
/**
* Whether this address is selected as the default "From:" address in
* situations such as composing a new message or sending a vacation auto-
* reply. Every Gmail account has exactly one default send-as address, so the
* only legal value that clients may write to this field is `true`. Changing
* this from `false` to `true` for an address will result in this field
* becoming `false` for the other previous default address.
*
* @var bool
*/
public $isDefault;
/**
* Whether this address is the primary address used to login to the account.
* Every Gmail account has exactly one primary address, and it cannot be
* deleted from the collection of send-as aliases. This field is read-only.
*
* @var bool
*/
public $isPrimary;
/**
* An optional email address that is included in a "Reply-To:" header for mail
* sent using this alias. If this is empty, Gmail will not generate a "Reply-
* To:" header.
*
* @var string
*/
public $replyToAddress;
/**
* The email address that appears in the "From:" header for mail sent using
* this alias. This is read-only for all operations except create.
*
* @var string
*/
public $sendAsEmail;
/**
* An optional HTML signature that is included in messages composed with this
* alias in the Gmail web UI. This signature is added to new emails only.
*
* @var string
*/
public $signature;
protected $smtpMsaType = SmtpMsa::class;
protected $smtpMsaDataType = '';
/**
* Whether Gmail should treat this address as an alias for the user's primary
* email address. This setting only applies to custom "from" aliases.
*
* @var bool
*/
public $treatAsAlias;
/**
* Indicates whether this address has been verified for use as a send-as
* alias. Read-only. This setting only applies to custom "from" aliases.
*
* @var string
*/
public $verificationStatus;
/**
* A name that appears in the "From:" header for mail sent using this alias.
* For custom "from" addresses, when this is empty, Gmail will populate the
* "From:" header with the name that is used for the primary address
* associated with the account. If the admin has disabled the ability for
* users to update their name format, requests to update this field for the
* primary login will silently fail.
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Whether this address is selected as the default "From:" address in
* situations such as composing a new message or sending a vacation auto-
* reply. Every Gmail account has exactly one default send-as address, so the
* only legal value that clients may write to this field is `true`. Changing
* this from `false` to `true` for an address will result in this field
* becoming `false` for the other previous default address.
*
* @param bool $isDefault
*/
public function setIsDefault($isDefault)
{
$this->isDefault = $isDefault;
}
/**
* @return bool
*/
public function getIsDefault()
{
return $this->isDefault;
}
/**
* Whether this address is the primary address used to login to the account.
* Every Gmail account has exactly one primary address, and it cannot be
* deleted from the collection of send-as aliases. This field is read-only.
*
* @param bool $isPrimary
*/
public function setIsPrimary($isPrimary)
{
$this->isPrimary = $isPrimary;
}
/**
* @return bool
*/
public function getIsPrimary()
{
return $this->isPrimary;
}
/**
* An optional email address that is included in a "Reply-To:" header for mail
* sent using this alias. If this is empty, Gmail will not generate a "Reply-
* To:" header.
*
* @param string $replyToAddress
*/
public function setReplyToAddress($replyToAddress)
{
$this->replyToAddress = $replyToAddress;
}
/**
* @return string
*/
public function getReplyToAddress()
{
return $this->replyToAddress;
}
/**
* The email address that appears in the "From:" header for mail sent using
* this alias. This is read-only for all operations except create.
*
* @param string $sendAsEmail
*/
public function setSendAsEmail($sendAsEmail)
{
$this->sendAsEmail = $sendAsEmail;
}
/**
* @return string
*/
public function getSendAsEmail()
{
return $this->sendAsEmail;
}
/**
* An optional HTML signature that is included in messages composed with this
* alias in the Gmail web UI. This signature is added to new emails only.
*
* @param string $signature
*/
public function setSignature($signature)
{
$this->signature = $signature;
}
/**
* @return string
*/
public function getSignature()
{
return $this->signature;
}
/**
* An optional SMTP service that will be used as an outbound relay for mail
* sent using this alias. If this is empty, outbound mail will be sent
* directly from Gmail's servers to the destination SMTP service. This setting
* only applies to custom "from" aliases.
*
* @param SmtpMsa $smtpMsa
*/
public function setSmtpMsa(SmtpMsa $smtpMsa)
{
$this->smtpMsa = $smtpMsa;
}
/**
* @return SmtpMsa
*/
public function getSmtpMsa()
{
return $this->smtpMsa;
}
/**
* Whether Gmail should treat this address as an alias for the user's primary
* email address. This setting only applies to custom "from" aliases.
*
* @param bool $treatAsAlias
*/
public function setTreatAsAlias($treatAsAlias)
{
$this->treatAsAlias = $treatAsAlias;
}
/**
* @return bool
*/
public function getTreatAsAlias()
{
return $this->treatAsAlias;
}
/**
* Indicates whether this address has been verified for use as a send-as
* alias. Read-only. This setting only applies to custom "from" aliases.
*
* Accepted values: verificationStatusUnspecified, accepted, pending
*
* @param self::VERIFICATION_STATUS_* $verificationStatus
*/
public function setVerificationStatus($verificationStatus)
{
$this->verificationStatus = $verificationStatus;
}
/**
* @return self::VERIFICATION_STATUS_*
*/
public function getVerificationStatus()
{
return $this->verificationStatus;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SendAs::class, 'Google_Service_Gmail_SendAs');
@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class SignAndEncryptKeyPairs extends \Google\Model
{
/**
* The ID of the CseKeyPair that encrypts signed outgoing mail.
*
* @var string
*/
public $encryptionKeyPairId;
/**
* The ID of the CseKeyPair that signs outgoing mail.
*
* @var string
*/
public $signingKeyPairId;
/**
* The ID of the CseKeyPair that encrypts signed outgoing mail.
*
* @param string $encryptionKeyPairId
*/
public function setEncryptionKeyPairId($encryptionKeyPairId)
{
$this->encryptionKeyPairId = $encryptionKeyPairId;
}
/**
* @return string
*/
public function getEncryptionKeyPairId()
{
return $this->encryptionKeyPairId;
}
/**
* The ID of the CseKeyPair that signs outgoing mail.
*
* @param string $signingKeyPairId
*/
public function setSigningKeyPairId($signingKeyPairId)
{
$this->signingKeyPairId = $signingKeyPairId;
}
/**
* @return string
*/
public function getSigningKeyPairId()
{
return $this->signingKeyPairId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SignAndEncryptKeyPairs::class, 'Google_Service_Gmail_SignAndEncryptKeyPairs');
+192
View File
@@ -0,0 +1,192 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class SmimeInfo extends \Google\Model
{
/**
* Encrypted key password, when key is encrypted.
*
* @var string
*/
public $encryptedKeyPassword;
/**
* When the certificate expires (in milliseconds since epoch).
*
* @var string
*/
public $expiration;
/**
* The immutable ID for the SmimeInfo.
*
* @var string
*/
public $id;
/**
* Whether this SmimeInfo is the default one for this user's send-as address.
*
* @var bool
*/
public $isDefault;
/**
* The S/MIME certificate issuer's common name.
*
* @var string
*/
public $issuerCn;
/**
* PEM formatted X509 concatenated certificate string (standard base64
* encoding). Format used for returning key, which includes public key as well
* as certificate chain (not private key).
*
* @var string
*/
public $pem;
/**
* PKCS#12 format containing a single private/public key pair and certificate
* chain. This format is only accepted from client for creating a new
* SmimeInfo and is never returned, because the private key is not intended to
* be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword
* should be set appropriately.
*
* @var string
*/
public $pkcs12;
/**
* Encrypted key password, when key is encrypted.
*
* @param string $encryptedKeyPassword
*/
public function setEncryptedKeyPassword($encryptedKeyPassword)
{
$this->encryptedKeyPassword = $encryptedKeyPassword;
}
/**
* @return string
*/
public function getEncryptedKeyPassword()
{
return $this->encryptedKeyPassword;
}
/**
* When the certificate expires (in milliseconds since epoch).
*
* @param string $expiration
*/
public function setExpiration($expiration)
{
$this->expiration = $expiration;
}
/**
* @return string
*/
public function getExpiration()
{
return $this->expiration;
}
/**
* The immutable ID for the SmimeInfo.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Whether this SmimeInfo is the default one for this user's send-as address.
*
* @param bool $isDefault
*/
public function setIsDefault($isDefault)
{
$this->isDefault = $isDefault;
}
/**
* @return bool
*/
public function getIsDefault()
{
return $this->isDefault;
}
/**
* The S/MIME certificate issuer's common name.
*
* @param string $issuerCn
*/
public function setIssuerCn($issuerCn)
{
$this->issuerCn = $issuerCn;
}
/**
* @return string
*/
public function getIssuerCn()
{
return $this->issuerCn;
}
/**
* PEM formatted X509 concatenated certificate string (standard base64
* encoding). Format used for returning key, which includes public key as well
* as certificate chain (not private key).
*
* @param string $pem
*/
public function setPem($pem)
{
$this->pem = $pem;
}
/**
* @return string
*/
public function getPem()
{
return $this->pem;
}
/**
* PKCS#12 format containing a single private/public key pair and certificate
* chain. This format is only accepted from client for creating a new
* SmimeInfo and is never returned, because the private key is not intended to
* be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword
* should be set appropriately.
*
* @param string $pkcs12
*/
public function setPkcs12($pkcs12)
{
$this->pkcs12 = $pkcs12;
}
/**
* @return string
*/
public function getPkcs12()
{
return $this->pkcs12;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SmimeInfo::class, 'Google_Service_Gmail_SmimeInfo');
+164
View File
@@ -0,0 +1,164 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class SmtpMsa extends \Google\Model
{
/**
* Unspecified security mode.
*/
public const SECURITY_MODE_securityModeUnspecified = 'securityModeUnspecified';
/**
* Communication with the remote SMTP service is unsecured. Requires port 25.
*/
public const SECURITY_MODE_none = 'none';
/**
* Communication with the remote SMTP service is secured using SSL.
*/
public const SECURITY_MODE_ssl = 'ssl';
/**
* Communication with the remote SMTP service is secured using STARTTLS.
*/
public const SECURITY_MODE_starttls = 'starttls';
/**
* The hostname of the SMTP service. Required.
*
* @var string
*/
public $host;
/**
* The password that will be used for authentication with the SMTP service.
* This is a write-only field that can be specified in requests to create or
* update SendAs settings; it is never populated in responses.
*
* @var string
*/
public $password;
/**
* The port of the SMTP service. Required.
*
* @var int
*/
public $port;
/**
* The protocol that will be used to secure communication with the SMTP
* service. Required.
*
* @var string
*/
public $securityMode;
/**
* The username that will be used for authentication with the SMTP service.
* This is a write-only field that can be specified in requests to create or
* update SendAs settings; it is never populated in responses.
*
* @var string
*/
public $username;
/**
* The hostname of the SMTP service. Required.
*
* @param string $host
*/
public function setHost($host)
{
$this->host = $host;
}
/**
* @return string
*/
public function getHost()
{
return $this->host;
}
/**
* The password that will be used for authentication with the SMTP service.
* This is a write-only field that can be specified in requests to create or
* update SendAs settings; it is never populated in responses.
*
* @param string $password
*/
public function setPassword($password)
{
$this->password = $password;
}
/**
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* The port of the SMTP service. Required.
*
* @param int $port
*/
public function setPort($port)
{
$this->port = $port;
}
/**
* @return int
*/
public function getPort()
{
return $this->port;
}
/**
* The protocol that will be used to secure communication with the SMTP
* service. Required.
*
* Accepted values: securityModeUnspecified, none, ssl, starttls
*
* @param self::SECURITY_MODE_* $securityMode
*/
public function setSecurityMode($securityMode)
{
$this->securityMode = $securityMode;
}
/**
* @return self::SECURITY_MODE_*
*/
public function getSecurityMode()
{
return $this->securityMode;
}
/**
* The username that will be used for authentication with the SMTP service.
* This is a write-only field that can be specified in requests to create or
* update SendAs settings; it is never populated in responses.
*
* @param string $username
*/
public function setUsername($username)
{
$this->username = $username;
}
/**
* @return string
*/
public function getUsername()
{
return $this->username;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SmtpMsa::class, 'Google_Service_Gmail_SmtpMsa');
+111
View File
@@ -0,0 +1,111 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class Thread extends \Google\Collection
{
protected $collection_key = 'messages';
/**
* The ID of the last history record that modified this thread.
*
* @var string
*/
public $historyId;
/**
* The unique ID of the thread.
*
* @var string
*/
public $id;
protected $messagesType = Message::class;
protected $messagesDataType = 'array';
/**
* A short part of the message text.
*
* @var string
*/
public $snippet;
/**
* The ID of the last history record that modified this thread.
*
* @param string $historyId
*/
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
/**
* @return string
*/
public function getHistoryId()
{
return $this->historyId;
}
/**
* The unique ID of the thread.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* The list of messages in the thread.
*
* @param Message[] $messages
*/
public function setMessages($messages)
{
$this->messages = $messages;
}
/**
* @return Message[]
*/
public function getMessages()
{
return $this->messages;
}
/**
* A short part of the message text.
*
* @param string $snippet
*/
public function setSnippet($snippet)
{
$this->snippet = $snippet;
}
/**
* @return string
*/
public function getSnippet()
{
return $this->snippet;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Thread::class, 'Google_Service_Gmail_Thread');
@@ -0,0 +1,230 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class VacationSettings extends \Google\Model
{
/**
* Flag that controls whether Gmail automatically replies to messages.
*
* @var bool
*/
public $enableAutoReply;
/**
* An optional end time for sending auto-replies (epoch ms). When this is
* specified, Gmail will automatically reply only to messages that it receives
* before the end time. If both `startTime` and `endTime` are specified,
* `startTime` must precede `endTime`.
*
* @var string
*/
public $endTime;
/**
* Response body in HTML format. Gmail will sanitize the HTML before storing
* it. If both `response_body_plain_text` and `response_body_html` are
* specified, `response_body_html` will be used.
*
* @var string
*/
public $responseBodyHtml;
/**
* Response body in plain text format. If both `response_body_plain_text` and
* `response_body_html` are specified, `response_body_html` will be used.
*
* @var string
*/
public $responseBodyPlainText;
/**
* Optional text to prepend to the subject line in vacation responses. In
* order to enable auto-replies, either the response subject or the response
* body must be nonempty.
*
* @var string
*/
public $responseSubject;
/**
* Flag that determines whether responses are sent to recipients who are not
* in the user's list of contacts.
*
* @var bool
*/
public $restrictToContacts;
/**
* Flag that determines whether responses are sent to recipients who are
* outside of the user's domain. This feature is only available for Google
* Workspace users.
*
* @var bool
*/
public $restrictToDomain;
/**
* An optional start time for sending auto-replies (epoch ms). When this is
* specified, Gmail will automatically reply only to messages that it receives
* after the start time. If both `startTime` and `endTime` are specified,
* `startTime` must precede `endTime`.
*
* @var string
*/
public $startTime;
/**
* Flag that controls whether Gmail automatically replies to messages.
*
* @param bool $enableAutoReply
*/
public function setEnableAutoReply($enableAutoReply)
{
$this->enableAutoReply = $enableAutoReply;
}
/**
* @return bool
*/
public function getEnableAutoReply()
{
return $this->enableAutoReply;
}
/**
* An optional end time for sending auto-replies (epoch ms). When this is
* specified, Gmail will automatically reply only to messages that it receives
* before the end time. If both `startTime` and `endTime` are specified,
* `startTime` must precede `endTime`.
*
* @param string $endTime
*/
public function setEndTime($endTime)
{
$this->endTime = $endTime;
}
/**
* @return string
*/
public function getEndTime()
{
return $this->endTime;
}
/**
* Response body in HTML format. Gmail will sanitize the HTML before storing
* it. If both `response_body_plain_text` and `response_body_html` are
* specified, `response_body_html` will be used.
*
* @param string $responseBodyHtml
*/
public function setResponseBodyHtml($responseBodyHtml)
{
$this->responseBodyHtml = $responseBodyHtml;
}
/**
* @return string
*/
public function getResponseBodyHtml()
{
return $this->responseBodyHtml;
}
/**
* Response body in plain text format. If both `response_body_plain_text` and
* `response_body_html` are specified, `response_body_html` will be used.
*
* @param string $responseBodyPlainText
*/
public function setResponseBodyPlainText($responseBodyPlainText)
{
$this->responseBodyPlainText = $responseBodyPlainText;
}
/**
* @return string
*/
public function getResponseBodyPlainText()
{
return $this->responseBodyPlainText;
}
/**
* Optional text to prepend to the subject line in vacation responses. In
* order to enable auto-replies, either the response subject or the response
* body must be nonempty.
*
* @param string $responseSubject
*/
public function setResponseSubject($responseSubject)
{
$this->responseSubject = $responseSubject;
}
/**
* @return string
*/
public function getResponseSubject()
{
return $this->responseSubject;
}
/**
* Flag that determines whether responses are sent to recipients who are not
* in the user's list of contacts.
*
* @param bool $restrictToContacts
*/
public function setRestrictToContacts($restrictToContacts)
{
$this->restrictToContacts = $restrictToContacts;
}
/**
* @return bool
*/
public function getRestrictToContacts()
{
return $this->restrictToContacts;
}
/**
* Flag that determines whether responses are sent to recipients who are
* outside of the user's domain. This feature is only available for Google
* Workspace users.
*
* @param bool $restrictToDomain
*/
public function setRestrictToDomain($restrictToDomain)
{
$this->restrictToDomain = $restrictToDomain;
}
/**
* @return bool
*/
public function getRestrictToDomain()
{
return $this->restrictToDomain;
}
/**
* An optional start time for sending auto-replies (epoch ms). When this is
* specified, Gmail will automatically reply only to messages that it receives
* after the start time. If both `startTime` and `endTime` are specified,
* `startTime` must precede `endTime`.
*
* @param string $startTime
*/
public function setStartTime($startTime)
{
$this->startTime = $startTime;
}
/**
* @return string
*/
public function getStartTime()
{
return $this->startTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(VacationSettings::class, 'Google_Service_Gmail_VacationSettings');
@@ -0,0 +1,164 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class WatchRequest extends \Google\Collection
{
/**
* Only get push notifications for message changes relating to labelIds
* specified.
*/
public const LABEL_FILTER_ACTION_include = 'include';
/**
* Get push notifications for all message changes except those relating to
* labelIds specified.
*/
public const LABEL_FILTER_ACTION_exclude = 'exclude';
/**
* Only get push notifications for message changes relating to labelIds
* specified.
*/
public const LABEL_FILTER_BEHAVIOR_include = 'include';
/**
* Get push notifications for all message changes except those relating to
* labelIds specified.
*/
public const LABEL_FILTER_BEHAVIOR_exclude = 'exclude';
protected $collection_key = 'labelIds';
/**
* Filtering behavior of `labelIds list` specified. This field is deprecated
* because it caused incorrect behavior in some cases; use
* `label_filter_behavior` instead.
*
* @deprecated
* @var string
*/
public $labelFilterAction;
/**
* Filtering behavior of `labelIds list` specified. This field replaces
* `label_filter_action`; if set, `label_filter_action` is ignored.
*
* @var string
*/
public $labelFilterBehavior;
/**
* List of label_ids to restrict notifications about. By default, if
* unspecified, all changes are pushed out. If specified then dictates which
* labels are required for a push notification to be generated.
*
* @var string[]
*/
public $labelIds;
/**
* A fully qualified Google Cloud Pub/Sub API topic name to publish the events
* to. This topic name **must** already exist in Cloud Pub/Sub and you
* **must** have already granted gmail "publish" permission on it. For
* example, "projects/my-project-identifier/topics/my-topic-name" (using the
* Cloud Pub/Sub "v1" topic naming format). Note that the "my-project-
* identifier" portion must exactly match your Google developer project id
* (the one executing this watch request).
*
* @var string
*/
public $topicName;
/**
* Filtering behavior of `labelIds list` specified. This field is deprecated
* because it caused incorrect behavior in some cases; use
* `label_filter_behavior` instead.
*
* Accepted values: include, exclude
*
* @deprecated
* @param self::LABEL_FILTER_ACTION_* $labelFilterAction
*/
public function setLabelFilterAction($labelFilterAction)
{
$this->labelFilterAction = $labelFilterAction;
}
/**
* @deprecated
* @return self::LABEL_FILTER_ACTION_*
*/
public function getLabelFilterAction()
{
return $this->labelFilterAction;
}
/**
* Filtering behavior of `labelIds list` specified. This field replaces
* `label_filter_action`; if set, `label_filter_action` is ignored.
*
* Accepted values: include, exclude
*
* @param self::LABEL_FILTER_BEHAVIOR_* $labelFilterBehavior
*/
public function setLabelFilterBehavior($labelFilterBehavior)
{
$this->labelFilterBehavior = $labelFilterBehavior;
}
/**
* @return self::LABEL_FILTER_BEHAVIOR_*
*/
public function getLabelFilterBehavior()
{
return $this->labelFilterBehavior;
}
/**
* List of label_ids to restrict notifications about. By default, if
* unspecified, all changes are pushed out. If specified then dictates which
* labels are required for a push notification to be generated.
*
* @param string[] $labelIds
*/
public function setLabelIds($labelIds)
{
$this->labelIds = $labelIds;
}
/**
* @return string[]
*/
public function getLabelIds()
{
return $this->labelIds;
}
/**
* A fully qualified Google Cloud Pub/Sub API topic name to publish the events
* to. This topic name **must** already exist in Cloud Pub/Sub and you
* **must** have already granted gmail "publish" permission on it. For
* example, "projects/my-project-identifier/topics/my-topic-name" (using the
* Cloud Pub/Sub "v1" topic naming format). Note that the "my-project-
* identifier" portion must exactly match your Google developer project id
* (the one executing this watch request).
*
* @param string $topicName
*/
public function setTopicName($topicName)
{
$this->topicName = $topicName;
}
/**
* @return string
*/
public function getTopicName()
{
return $this->topicName;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(WatchRequest::class, 'Google_Service_Gmail_WatchRequest');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Gmail;
class WatchResponse extends \Google\Model
{
/**
* When Gmail will stop sending notifications for mailbox updates (epoch
* millis). Call `watch` again before this time to renew the watch.
*
* @var string
*/
public $expiration;
/**
* The ID of the mailbox's current history record.
*
* @var string
*/
public $historyId;
/**
* When Gmail will stop sending notifications for mailbox updates (epoch
* millis). Call `watch` again before this time to renew the watch.
*
* @param string $expiration
*/
public function setExpiration($expiration)
{
$this->expiration = $expiration;
}
/**
* @return string
*/
public function getExpiration()
{
return $this->expiration;
}
/**
* The ID of the mailbox's current history record.
*
* @param string $historyId
*/
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
/**
* @return string
*/
public function getHistoryId()
{
return $this->historyId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(WatchResponse::class, 'Google_Service_Gmail_WatchResponse');